Page 1 of 1

Google OpenSources Protocol Buffer

Posted: Tue Jul 08, 2008 10:50 pm
by Klaim
http://code.google.com/apis/protocolbuf ... rview.html
Protocol buffers are a flexible, efficient, automated mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages. You can even update your data structure without breaking deployed programs that are compiled against the "old" format.
:shock:




The .proto exemples makes me think of the .material for ogre...

Posted: Tue Jul 08, 2008 10:54 pm
by betajaen
I was just reading about it a few hours ago. I was damned impressed.

Posted: Tue Jul 08, 2008 11:04 pm
by nikki
Wait a minute. Source code is automatically generated for the possible keys? Nice.

Posted: Tue Jul 08, 2008 11:07 pm
by Klaim
I was thinking that it would be an interesting alternative to boost::serialize + xml or other kind of serialization alternative...

...i'm currently looking in the doc if there is some crypting options for critical data.

edit> No crypting, but i guess it's not a problem to crypt the generated data directly.

edit2> Wow google is doing a lot of interesting thing today O___O : http://www.gamasutra.com/php-bin/news_i ... tory=19333

Posted: Wed Jul 09, 2008 12:54 am
by RedEyeCoder
Wow this looks really really nice!

Posted: Wed Jul 09, 2008 5:29 am
by syedhs
The idea of this could be coming from ASN.1. In short, you merely describe how the data is expected to be, some of them are compulsory while others could be optional. There are fixed/variable length data, and you can have unlimited nested 'structure'. The ASN.1 parser (could be command line) is fed with this definition and generate the code for you, be it C++ or Java.

It is nice to see this to emerge in the simpler form, and I may use it in future.