12/05/2011

Protocol Buffers in Ruby

ちょっとしたサーバ・クライアントのプログラムを書こうかな、と思ったら、Google さんの Protocol Buffers を思い出した。
Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler.
実際に、Google さんのシステムでいっぱい使われてるらしい(Protocol Buffers の Overview より)。
Protocol buffers are now Google's lingua franca for data – at time of writing, there are 48,162 different message types defined in the Google code tree across 12,183.proto files. They're used both in RPC systems and for persistent storage of data in a variety of storage systems.
でも、Google さんのページにある実装は C++ か、Java か Python 用の Protocol Buffers ライブラリで、僕はどの言語も書けないんだよね。。。と思って、サードパーティの実装 Wiki を見たら、Ruby の実装がある!!
ぱっと見た感じ、beefcake はちょっと機能面でものたりない感じ?ruby-protobufruby-protocol-buffers はどっちもよさげなんだけど、RPC のためのサーバ・クライアントのクラスが定義されてることと、Author(s) の方々が日本人っぽいお名前で勝手に親しみを感じたから ruby-protobuf を使うことにした!

しっかし、みんな自分で実装したものを GitHub に公開していて、すごいなあ。来年の目標は GitHub デビューにしようかな。。

0 件のコメント:

コメントを投稿