[erlang-questions] BERT vs protobuf in the erlang world

Tomas Abrahamsson tomas.abrahamsson@REDACTED
Wed Aug 24 15:09:13 CEST 2011


> Any chance of sharing your erlang generator for protobuf.?

Here's yet another erlang generator for protobuf:

   https://github.com/tomas-abrahamsson/gpb

(shameless self-plug :) )
We've used it at work for quite some time now.
The parser handles most cases I've come across.[*]
and the encoder/decoder is fully compatible with
google protobuf as far as I know, also packed fields and
negative enums. I originally wrote it because I needed
support for messages in messages, which I couldn't find
in any other protobuf library at that time. Since then,
encoding/decoding performance has been a bit of an issue.

There are also some QuickCheck properties here[**]
for verifying encoding/decoding and also for compability
with 'protoc' of Google protobuf. Works with QuickCheck-mini.
Many thanks to Thomas Arts for writing a fair part of the
generators for message definitions and messages!

[*] The parser is a yecc/leex parser, so it gets confused
if proto-reserved words such as int32 occur as for example
a message name. I expect this to be pretty rare in practice.
It correctly parses and handles the descriptor.proto file in
protobuf.

[**] https://github.com/tomas-abrahamsson/gpb-eqc


BRs
Tomas



More information about the erlang-questions mailing list