News for hackers. Stuff that matters.
Re:Jailbreaking RabbitOS: Uncovering secret logs, and GPL vi... by LeoPanthera on Wednesday July 17, 2024 @05:51PM (#40990694)
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.

Re:Jailbreaking RabbitOS: Uncovering secret logs, and GPL vi... by ForHackernews on Wednesday July 17, 2024 @06:08PM (#40990816)
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.
Re:Jailbreaking RabbitOS: Uncovering secret logs, and GPL vi... by unscaled on Thursday July 18, 2024 @01:24AM (#40992730)
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).

Re:Jailbreaking RabbitOS: Uncovering secret logs, and GPL vi... by ForHackernews on Thursday July 18, 2024 @05:26PM (#40999920)
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.