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.
| SOAP | XML-RPC + Pickle | XMLRPC | XML-RPC + Hacks | |
| Secure | x | x | 1 | |
| Supports long int | x | x | 2 | |
| Supports non-string dict key | x | x | 3 | |
| Supports custom types | x | x | 4 | |
| Cross platform | x | x | 5 | |
| Fast | x | 6 | ||
| Small | x | 7 | ||
| Low implementation cost | x | x | 8 |
- XML-RPC provides this by default.
- Patch the xmlrpclib to write longs as a string, e.g., "10L".
- Punt by writing all non-string keys as strings, e.g., IPv4Address,10.0.0.1. This makes a lot of things simpler.
- Design extensible protocol to do this.
- Test with Java.
- sgmlop is 2x faster than standard parser. Did not try cElementTree.
- Encode, then use zlib on result. Bzip provides minimal size reduction with a significant increase in running time.
- 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.
