What is the best way to make a browser=based chat server with a python back-end?
For the reverse-AJAX type of pushing, I found autobahn and Twisted, but is there a good way to push information from one client to all other clients?
The tutorials for Twisted and Autobahn all seemed to indicate a 1-1 connection between a single python instance and a single client.
Follow-up question: Is there a way to configure apache to allow clients to connect to a web socket that is on port 80, if apache is already on port 80? So something like ws:domain/foo.py, insted of having to specify a different port.
Autobahn doesn’t use “reverse-AJAX” (whatever that’s supposed to be ;), but WebSockets.
You can easily broadcast messages sent by clients to all connected clients using a couple of lines:
http://www.tavendo.de/autobahn/tutorial/broadcast.html
https://github.com/oberstet/Autobahn/tree/master/demo/broadcast
This is pure WebSockets.
You can also do much more sophisticated stuff, general Publish & Subscribe with Autobahn using WAMP (WebSockets Application Messaging Protocol) over WebSockets which Autobahn also provides.
Please see the other tutorials on our site .