Python Desktop Server Weblog 18.10.2004

a picture of myself

Münsterland.org

2004-10-18

TooFPy: native pickle based RPC mechanism

TooFPy (in CVS) now has it's own native python RPC mechanism. What it does is it marshalls the call as a tuple (methodname, args, opts) that is pickled and base64 encoded. The result is returned directly as a base64 encoded pickle, too. This native RPC mechanism is much faster than XML based mechanisms, since you just can use standard libraries with fast algorithms (it uses cPickle, if available). Additionally exceptions are better supported (with XMLRPC you just get a standard error code, with SOAP you only get the faultType exception, with PickleRPC you get all exceptions as they happen on the server).

Due to the multi-protocol-nature of TooFPy you don't loose portability: if you use Python both on the client and the server, you can use the new PickleRPC mechanism. If you use other languages on the client, you just use SOAP or XMLRPC, whatever suits your need. All methods are available through all protocols and the validation wrappers and programming by contract wrappers are used the same way regardless of the protocol you use.

Additionally the TooFPy code was restructured so that adding new protocols is very easy. PickleRPC can be seen as a sample implementation for this extensibility. The code includes a client module that you can use in your own programs.

This post references topics: tools xml_rpc
posted at 12:57:04    #
October 2004
MoTuWeThFrSaSu
     1 2 3
4 5 6 7 8 910
11121314151617
18192021222324
25262728293031
Feb
2004
 Nov
2004

This is the Python Desktop Server weblog.


(Donations will be used by the author to buy stuff, fullfill selfish wishes or do other silly recreational things. You have been warned.).
The PyDS is
OSI Certified Open Source Software

Python Powered

XML-Image

© 2004-2007, Georg Bauer