- Home /
What are my options for real-time networking to a backend service in 2017?
Hey guys. I've been researching a good way to handle real-time connection to a backend service (non-unity app) for the next reinstallment of my project.
I've looked into:
signalR - would be great, but from what I gathered the available 2.0 client does not support WS but only long polling
websockets - great again, but the websocket-sharp that was once available on the asset store is gone all the photon/unet crap - not for my use case, my server will be a normal app (I want to go with C#/nHibernate combo)
socket.io - from what i've read there are only old libraries for that
tcp sockets - really?
Anyway, if someone's got some experience in that and could recommend something that'd be great! Ideally, I'd love to have a functionality on the server side resembling Routes/Hubs for multiple controllers instead of rolling that on my own with pure sockets.
are you deploying as WebGL, or as native (ie iOS, Android) ?
if you're not doing WebGL, i'd suggest TCP sockets.
if you are doing WebGL then WebSockets or LongPolling would be options.
i'd consider looking at LongPolling. a while ago i was able to slap together a fairly performant long-polling chat service using NodeJS + Express and just standard Unity Web Requests; no plugins needed. It took about a day.
the advantage w/ long-polling is that it uses standard HTTP channels, which are widely supported compared to the various flavors of sockets.