I m trying to learn new technology called Web Sockets. I ve got the setup (pywebsocket as Apache2 module) working and I m playing with examples. http://code.google.com/p/websocket-sample/wiki/samples?ts=1262888726&updated=samples
One thing is bothering me - all the examples use shared file to monitor changes in message counter, counter of users.
So basically when I connect to ws://localhost/chat with 2 browsers 2 instances of chat_wsh.py (websock handlers) will be running. Right? And they all will be accessing file/database for count.
It might be a silly question, but I m not a network guru - is it possible to broadcast a message to all connections from one handler.
For example: User from chat sends a message - message through websocket gets to websocket handler which in turn broadcasts info that new message is received to all other chat instances, eliminating thus the need for each instance to constantly check on one shared file/database.
I hope I make sense :)