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

Vincent de Phily vincent.dephily@REDACTED
Tue Aug 23 12:03:29 CEST 2011


On Monday 22 August 2011 11:31:44 Mike Oxford wrote:
> BERT is pretty much a "known good quantity" but protobuf is more
> efficient on the wire.
> 
> Anyone have thoughts on which to go with?
> 
> Also, along the BERT side, does anyone have recommendations on AS3 and
> Java implementations of the marshallers?
> 
> The downside(s) to protobuf - hard IDLs and you have to build the
> project and generators.
> The downside(s) to BERT - less efficient on the wire (verbosity.)

Also take a look at bjson, and one of my favourite : msgpack. BERT is rather 
unique in supporting atoms, which *nice* and can reduce encoded size a lot 
(but that's less significant if you compress). For encoded size, I have yet to 
see anything beat UPER (asn1).

A few things to consider :
* Bench size and speed with a mockup of your data : different formats are
  better for different types of data. Add compression to your tests.
* Think about format extensibility. It's easy enough with self-described
  formats like bert or msgpack, but gets more complicated with protobuf or
  asn1.
* The initial hurdle of dealing with a grammar and generators is well paid off
  by having data validation and nicer api (mostly via #records{}) later on.
* If you need to speak with the outside world, self-describing formats will
  make your life easyer.
-- 
Vincent de Phily



More information about the erlang-questions mailing list