This page describes both the current design of the Tycoon RPC system and how it evolved to this state.

RPC is a critical subsystem for any distributed system like Tycoon. The table below summarizes some of the desirable characteristics for an RPC system. Currently, there do not appear to be any pre-packaged RPC systems that provide all of these characteristics.

SOAPXML-RPC + PickleXMLRPCXML-RPC + Hacks
Securex x1
Supports long intxx 2
Supports non-string dict keyxx 3
Supports custom typesxx 4
Cross platformx x5
Fast x 6
Small x 7
Low implementation cost xx8
  1. XML-RPC provides this by default.
  2. Patch the xmlrpclib to write longs as a string, e.g., "10L".
  3. Punt by writing all non-string keys as strings, e.g., IPv4Address,10.0.0.1. This makes a lot of things simpler.
  4. Design extensible protocol to do this.
  5. Test with Java.
  6. sgmlop is 2x faster than standard parser. Did not try cElementTree.
  7. Encode, then use zlib on result. Bzip provides minimal size reduction with a significant increase in running time.
  8. Changes were minimal.

An unexpected source of inefficiency was excessive stirring of the random number pools. The collective effect of these changes is that the new XML-RPC is the same speed as the pickle serialization for large data structures and 50% faster for very small ones. Given the increase in security and cross-platform compatibility and that the change took ~3 days, this was a worthwhile change.