Hacker News new | past | comments | ask | show | jobs | submit login

Common alternatives are Apache Avro, MessagePack, FlatBuffers, and Thrift.

I have no idea which is best. Frankly it seems like there are too many choices.

Probably MessagePack, since it is JSON-like and I've actually heard of it.




Avro has some really cool features like inbuilt schemas, schema versioning and migration (e.g. deprecating or renaming fields) but you pay for them with more overhead than MessagePack.


Protocol Buffers have schemas too (though versioning and ensuring compatibility is quite messy and requires understanding internals). And it has less overhead than MesssagePack.

I'm not sure what Avro is doing, but as a rule schema enables you to have less overhead, rather than more. The main advantage of MessagePack over schema-based formats is that it's dead-simple and mostly compatible with JSON. Schema-based formats usually need either a code generator or maintaining an annotated version of your data classes and making sure they match the schema.

(Of course, with JSON or MessagePack you might still end up using a serialization library and something like JSON Schema).


Oh, as I understand it Avro's schemas aren't just "built in" as in supported as a first-class part of the protocol, but rather that each message includes with it the schema needed to interpret it. This adds overhead to every message (it's still a binary protocol, though) but crucially it avoids a whole category of hassles around schema distribution and updating.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: