
Simple client/server system of message boxes. Useful for automatic notifications using the console client or also handy for posting between friends. Under the hood there is a simple but fairly complete RPC Python library used for all the communication.
The content of the messages is sent cyphered by the XTEA algorithm. The server dumps periodically the messages boxes to disk for persistent storage. On server reloading, this content is restored.
There are two levels in the communication. The low level is used to send objects between peers with automatic serialization. The high level allows to publish and unpublish objects from the objects server, this way any client can make a remote procedure call for one of these published objects. Also the raised exceptions are propagated back to the clients in a transparent manner.
The Objects Link is a buffered communication channel based on objects
inter-exchange. It permits a full-duplex communication point-to-point.
With a simple interface, you gain access to a double synchronized queue
to send/receive objects with automatic serialization.
Look at file objects_link.py to know more about the interface.
The RPC Link is a simple RPC suite to share objects between peers
through a central server, working as a object hub. Once an object is published
on the hub, all the clients can invoke any method in a remote manner. Thanks
to the Python dynamic nature and its reflective properties, remote objects
are cleaned exposed as local objects on the client side.
Look at file rpc_link.py to know more about the interface. Run
python rpc_link.py to start the built-in hub server.
It has two limitations:
pickle.obj.__foo__() must be avoided
because there is no way to intercept implicit calls to them in order to make
them over the RPC link. So, str(obj) and alike calls should be invoked in an
explicitly manner in order to work correctly. Use obj.__str__() or
better, use custom methods.Take a look at directory test/, it has some examples of how to use all the
RPC layer.
Run one of these:
python setup.py install
python setup.py install --prefix=/usr/local
For Ubuntu an additional parameter is needed:
python setup.py install --prefix=/usr/local --install-layout=deb
To create the tarball from the repository, run:
python setup.py sdist
Use the run-whatsup-server.sh script as root. The server will drop
privileges as soon as possible. The log and cache files are created in
/tmp. By default the TCP 21 port is used, also the script will restart
the server if it dies. The messages are periodically copied to disk to
preserve them between restarts. This companion script launch the daemon
with nohup on a loop in order to restart automatically the daemon in case
of crash happens.
See:
whtsp.py -h
whatsup-server.py -h
If no message is specified, a what's up! is sent. For anything else,
pray and wait, although it never works.
Version 1.1, tested with Python 2.5 and 2.6.
WTFPLv2 (DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE version 2). See COPYING.
Feel free to drop me an email for anything related to this program.
Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
100% bug free (find as many as you want, it won't cost anything).
Last modified date: Sun Aug 8 17:19:30 CEST 2010