Claudio Cherubino's blog Life of a Googler


Ruby outperforms Python with Project Voldemort

If you are performing some statistical analysis on a huge amount of data (try thinking about Twitter data) then the database can become a real bottleneck and that's the reason why the interest on the NoSQL movement is quickly growing.

One of the most popular distributed key-value store that tries to overcome this problem is Project Voldemort, an open-source project based on Amazon Dynamo and sponsored by LinkedIn that uses it for some high-scalability storage problems.

Project Voldemort is written in Java and also provides the developers with C++ and Python client libraries to access the store. One thing that (strangely) was missing is the support for the Ruby language, mainly because of the lack of a stable Google Prototocol Buffers implementation for this language.

There is however a gem called ruby_protobuf, that besides being in alpha release, turned out to be reliable enough for my purpose of porting Project Voldemort Python client library to Ruby.

The library I wrote is called voldemort-ruby-client and is now released under the Apache 2.0 License on Google Code, so it is absolutely free for you to experiment with it.

While writing the library I also ported the Python test cases to Ruby and I found the latter to be 3000 times faster than the former!
Does anybody have a suggestion for the reason of this outstanding improvement?

In my machine the Ruby client performs about 2 millions PUT (or GET) requests per second against the 6 hundreds of the Python client.
Is there anybody else willing to repeat the benchmark on his machine and publish the results?

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment


No trackbacks yet.