Google OpenSources Protocol Buffer

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Google OpenSources Protocol Buffer

Post 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...
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Post by betajaen »

I was just reading about it a few hours ago. I was damned impressed.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

Wait a minute. Source code is automatically generated for the possible keys? Nice.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post 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
User avatar
RedEyeCoder
Gnome
Posts: 344
Joined: Sat Jun 16, 2007 7:29 am
Location: Brisbane, Australia

Post by RedEyeCoder »

Wow this looks really really nice!
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Post 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.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
Post Reply