Google protocol buffers



Hi,

In case you didn't see it, Google released their "protocol buffers" as
open source the other day:

    http://code.google.com/p/protobuf/
    http://code.google.com/apis/protocolbuffers/docs/overview.html

One of the big weaknesses in Beagle is that the messaging system
between beagled and beagled-index-helper and between beagled and
clients is a slow, bloated XML format.  It seems like protobufs are an
ideal replacement for this.

Google's implementation outputs stubs for C++, Java, and Python -- no
C# -- but there is plenty of demand for a C# generator and at least
one person says he's working on it:

    http://groups.google.com/group/protobuf/browse_thread/thread/957a0aee416e8b44/2791c6776a8fcff8?lnk=raot#2791c6776a8fcff8

If you look at the Java generator:

    http://code.google.com/p/protobuf/source/browse/trunk/src/google/protobuf/compiler/java/

you'll see that the files are almost entirely simple print statements.
 As Java and C# are very similar, it should be trivial to hack up a
quick C# generator.  There would be some additional work on the Beagle
side to send and parse these (as the XmlSerializer in C# does a lot of
the work for us now), but I think the win would be tremendous.  It
would be interesting to compare the speed differences between the
protobuf and XML, and I'd also be curious to see how it stacks up
against D-Bus.

If it's a good fit, large chunks of libbeagle could be replaced to use
the C++-generated protobufs and maybe a native Python implementation
would be fairly straightforward as well.

Joe


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]