Search code examples
c#.netperformancesignalrduplex

signalR performance game data refreshing in real time


I heard of SignalR library which provide duplex communication in .NET . I want to develop some game (in web browser), let's say 2 users move their points on canvas in real time. Both players need to have refreshed canvas as fast as possible. Would signalR handle it?

I read few topics on the internet where people hate it because of low performance. I'd like try it if it would handle it.


Solution

  • If you have to stay with .net Stack, then SignalR would be one of your main choices and if you want to make it faster use OWIN self-host app rather than ordinary web app which needs to be hosted on IIS. So, you can remove tons of overheads. Here you can find a tutorial on how to implement self-host SignalR:

    http://www.asp.net/signalr/overview/deployment/tutorial-signalr-self-host

    Otherwise, if you can choose you're tech stack I'd suggest using SocketIO which is faster (in most of the senarios) and is a full-stack (NodeJs and Browser) javascript library.

    Here you can find a comparison between these 2 techs :

    http://stevendavistechnotes.blogspot.com.au/2016/05/comparison-signalr-vs-socketio.html