Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 22, 2013 04:50 PM by DamianEdwards
Jan 20, 2013 03:06 PM|LINK
For a project thay I'm working on I have a need to synchronize the state of a web page across potentially hundreds or even thousands of different clients. The changes to the state can orginate on any client at any time and needs to be propgated to all
other clients in as real time as possible.
Since we're hosted in Azure it would make sense to leverage the service bus to handle the 'scale out' portion since we already have two WFEs and will likely add more in the future. This has got me wondering about what gaurentees SignalR makes in terms
of how messages are delivered, specifically if they arrive in the same order on every client.
EX) If I have clients, 1 - 10, connected to server A and clients 11 - 20 connected to server B. Client 1 sends a message at the same time as client 11. Will all of the clients recieved the messages in the same order? (regardless of what they may be)
I haven't been able to find any relevant documentation so any help would be greatly appreciated.
Jan 22, 2013 04:50 PM|LINK
SignalR doesn't guarantee message ordering, but it makes "best effort". Messages from a given source (client) will always be delivered in the order they were sent (were "sent" is the moment they are pushed to the message bus after they arrive to the server
from the client). Messages from different clients however will be sent in the order they were received from those clients. Remember that even sends from the same client can overlap while in transit from the client to server.
It's best to think of SignalR as equivalent to a socket. It is not a reliable or durable messaging system like Service Bus. If your app needs proper messaging semantics you'll need to layer them on top of the SignalR connection yourself.