Overview
Features
Download
Documentation
Community
Add-Ons & Services

Websocket sending Asynchronous messages to all the clients

A general discussion forum.

Websocket sending Asynchronous messages to all the clients

Postby praveenv4k » 26 Jul 2012, 03:59

Hi,

I just tried the WebSocketServer Sample that comes with the library and now I would like to send event based messages asynchronously from the server to all the clients.
Do I need to have a list of clients that are now connected to the server to do it? Which is the best way to do this?

Praveen
praveenv4k
 
Posts: 2
Joined: 26 Jul 2012, 03:55

Re: Websocket sending Asynchronous messages to all the clien

Postby Giovani » 30 Nov 2012, 17:49

I would like to know the awnser to!
Thanks.
Giovani
 
Posts: 5
Joined: 26 Nov 2012, 19:45

Re: Websocket sending Asynchronous messages to all the clien

Postby alex » 02 Dec 2012, 21:03

I have not yet done any concrete work, but this would be my line of thinking:

Whatever notification model you choose, the key to be able to scale (i.e. not waste a thread per observer) is to modify the sample request handler to only register/unregister with a global notification facility and die. Obviously, the global notification facility will have to maintain the list of registered web sockets and their associations with events of interest. See Notifications and Events for available notification options.

Hope this helps.
alex
 
Posts: 1116
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron