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

Michael Truog mjtruog@REDACTED
Wed Aug 24 00:42:39 CEST 2011


I think a properly done ASN.1 file can be self-describing and can provide great documentation of a protocol.  It gives you a lot of freedom and has been well tested within the Erlang distribution.  The one good thing about protobufs is their handling of floating point makes more sense for general use (no embedded compatibility problems), it doesn't actually change the base of the number, internally, which would then alter the precision.

On 08/23/2011 01:17 PM, Jon Watte wrote:
> Protobuf is fully self-described, and fully forwards/backwards compatible, in that it can carry through "unknown" members of a structure, including the semantic of the fields. ASN1 is generally not fully self-described, because it only describes type, not semantic, for each field.
>
> Sincerely,
>
> jw
>
> --
> Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable.
>
>
>
> On Tue, Aug 23, 2011 at 3:03 AM, Vincent de Phily <vincent.dephily@REDACTED <mailto:vincent.dephily@REDACTED>> wrote:
>
>     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
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110823/15b72134/attachment.htm>


More information about the erlang-questions mailing list