Publish/Subscribe Lib for Python?
Ville Vainio
ville at spammers.com
Sat Feb 28 05:39:12 EST 2004
>>>>> "Adrian" == Adrian B <borg at swirve.com> writes:
Adrian> Does anyone know of a framework or library that will
Adrian> enable me to use publish/subscribe comms? I want to
Adrian> create a server (using Python) running on a Unix box that
Adrian> will accept client connections (from GUIs built with
Adrian> wxPython) and publish realtime data updates to them. Any
Adrian> advice on where to start?
This is easy w/o any special libraries, if it is indeed all you have
to do.
Some options:
- Clients open TCP socket to server as a "subscription", server dumps
all the changes to all the connected TCP sockets.
- Clients register their host, port addrs with server, server sends
updates to all the subscribed clients in UDP packets.
- UDP broadcasts might work too, haven't tried it.
Or, you could use something like CORBA (omniORB) for more complicated
scenarios.
Googling also revealed:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81614
But beware: OSE, which that recipe relies on, seems to be licensed
under QPL.
--
Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list
mailing list