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

Anton Lavrik <>
Wed Aug 24 05:25:43 CEST 2011


On Tue, Aug 23, 2011 at 6:38 PM, Mark Geib <> wrote:
> Any chance of sharing your erlang generator for protobuf.? We have
> been using protobuf with erlang for a while and F-I-I-I-ghting with
> the generation of erlang code for our protobufs. Or, a pointer to a
> quality generator some one else knows of would be appreciated.

Piqi [1] generates pretty good Protocol Buffers (de)serialization
Erlang code. It relies on native Protocol Buffers compiler for parsing
.proto files and strives for 100% compatibility with Protocol Buffers.
Piqi also supports custom Erlang names and has some other features
making it more convenient for Erlang users.

As far as I can tell, the other Protocol Buffers implementations [2]
are less optimized, doesn't generate type specs (meaning it is not
usable with Dialyzer) and doesn't handle some corner cases correctly.
For instance, non-packed fields don't seem to be recognized by packed
field deserializers.

[1] http:/piqi.org/doc/erlang
[2] https://github.com/basho/erlang_protobuffs and similar GitHub forks

Anton



More information about the erlang-questions mailing list