|
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.
|