Skip to content

Comment on Ask HN: Experience with Protocol Buffers

Comments

Check out Avro, too. With both Protocol Buffers and Thrift, it's really hard to evolve schemas because you won't be able to read data written with an earlier version of the schema. Avro has the speed of binary while being flexible enough to read older data with later versions of the schema.

That's a misconception. If you design your schema properly, evolving it isn't a problem. We use protocol buffers (forced to because we're integrating with Google) and in the schema, everything is marked as optional so they can add or remove fields in future versions of the schema. This puts the onus on your code to properly handle missing fields, but that's the same problem you'll face with any schema that can be changed. Google has changed the schema multiple times and we've had periods where our code hasn't been updated yet. It works just fine.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.