3 ms·
I poked around your code; it's quite clean and readable! I've never heard of Avro, but it looks really interesting. Could you enlighten me on some use cases, a
by cmpb 11y ago
I poked around your code; it's quite clean and readable!
I've never heard of Avro, but it looks really interesting. Could you enlighten me on some use cases, and situations where it really shines?
- mtth 11y agoThanks! I like to think of Avro in two (related) parts: + A very compact binary serialization, which lets you efficiently store or transfer data over the wire. (Avro actually also defines a way to encode your data as JSON in cases when you need a human-readable representation.) + A way to define "data types". For example this schema [1] defines what we expect a "Human" entry to look like, and we can now do things like check whether we are missing any information, make sure all fields are valid, sort, efficiently copy objects, etc. This is glossing over many things (files, RPC, ...) but I hope this helps a bit! You can find a lot more information in the official Avro documentation [2] if you're curious. [1] https://github.com/mtth/avsc/blob/master/etc/benchmarks/schemas/Human.avsc https://github.com/mtth/avsc/blob/master/etc/benchmarks/sche... [2] https://avro.apache.org/docs/current/index.html https://avro.apache.org/docs/current/index.html