While working on a RPG game prototype based on ASP.NET I started experimenting with SignalR. This library was a perfect fit as it allows pushing data from server to clients in a very easy way (read: with just a few lines of code) and of course server method invocations from clients through JavaScript. Unfortunately SignalR is not providing a direct and intuitive way of gluing together application specific (server side) objects with the SignalR internal connections. This means that at any time you know how many clients are connected but you have absolutely no idea who they are. A client is basically a connection. A connection has a unique connectionId so you can distinguish clients but that's about it. Even worse, each time a client reconnects it gets a new connection id. In real world applications you have a bunch high level objects like: users, accounts, players etc. that are required to be in sync with client connections. So the problem is how to...
Comments
Post a Comment