OpenGamma is an interesting startup headquartered here in London. They provide open source software for analytics and risk analysis for the financial service industry. As that’s right up my alley I decided to start looking at their code this Friday. Among all that code there’s one project which looked like a good starting point, namely Fudge Proto. I took my usual approach and read what documentation I felt was relevant while browsing the source code at the same time. Experimenting with the code and learning by examples has always worked for me, so in no time I had some code up and running.
In brief you can compare the purpose of Fudge Proto to that of Google Protocol Buffers and Apache Thrift. You have one or more objects and can then easily serialize these, store them, send them over a network, and deserialize them again when needed. The target output format would typically be binary. Binary is beneficial over for instance XML and JSON as it’s more compact. It should generally also be quicker to parse as the format is more fixed with less fuss. Of course it’s not easily human readable, but that’s not the point either.
Fudge Proto and the underlying Fudge Messaging system is fairly young, with version 0.3 released early this year. I wanted to see how it stacks up to Google’s Protocol Buffers. I understand Protocol Buffers is heavily used internally at Google and given Google’s scale I’m sure it’s heavily optimized. Although I’ve dealt with serialization before, and also designed some low level messaging systems for use on very limited devices, I’m not claiming to be an expert on any of these systems. Therefore, should you spot some obvious issues in my experimentations later on, feel free to contact me by email or leave a comment. I’ll be happy to rerun these tests with improvements to both Protocol Buffers and Fudge Proto.