Reputation: 15925
I keep getting comet when I search for this, but comet seems to complex for my needs, i.e. 100 users max with probably 10 users online at a time.
Is there are better solution for my requirements, i.e. be able to push data to clients, probably between 10-20 clients max at a time.
Upvotes: 1
Views: 845
Reputation: 2170
If you're not married to Internet Explorer, there's at least one .NET implementation of a WebSockets server out there. That will handle Webkit browsers (Chrome and Safari) and Firefox 4, but leave IE users stranded, or at least restricted to pull technology (AJAX/AJAJ).
Upvotes: 0
Reputation: 61773
I also think Comet/bayeux might be a little too complex, but simple long-polling should get the job done.
You could use get_lock as some sort of blocking wait.
Upvotes: 2
Reputation: 2209
you can use a short polling approach where the client requests new data e.g. every second, and then the server sends data back whenever there is any. The client needs to store the id or timespan of the last updated data and then keep asking the server if there is anything newer than that.
Since you said you don't have many users, I think this approach is the simplest and easiest to implement.
Upvotes: 0
Reputation: 294277
No there isn't. When you take into consideration all the issues regarding NAT traversal, Firewalls and client side security restrictions, the only solution left is to have the client initiate the HTTP request and wait for a response that will 'push' back the data. Ie. Comet.
Upvotes: 1