Live data from Hacker News

Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

github.com

1–10 of 174 posts

Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

#2
This reminds me a lot of Avro:

https://avro.apache.org/docs/current/

They both have self-describing schemas, support for binary values, JSON-interoperability, basic type systems (Ion seems to support a few more field types), field annotations, support for schema evolution, code generation not necessary, etc.

I think Avro has the additional advantages of being production-tested in many different companies, a fully-JSON schema, support for many languages, RPC baked into the spec, and solid performance numbers found across the web.

I can't really see why I'd prefer Ion. It looks like an excellent piece of software with plenty of tests, no doubt, but I think I could do without "clobs", "sexprs", and "symbols" at this level of representation, and it might actually be better if I do. Am I missing something?

Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

#3
Is there a source for benchmarks/reviews for the various ways to represent data? As far as I see it, there are a lot of them that I'd like to hear pros/cons for: json, edn + transit (my fave), yaml, google protobufs, thrift (?), as well as Ion.

And where does Ion fit here?

Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

#4
post #2

This reminds me a lot of Avro: https://avro.apache.org/docs/current/ They both have self-describing schemas, support for binary values, JSON-interoperability, basic type systems (Ion seems to support a few more field types), field annotations, support for schema evolution, code generation not necessary, etc. I think Avro has the additional advantages of being production-tested in many different companies, a fully-JSO…

Amazon invented Ion because yaml, Avro, etc. didn't exist at the time. Ion is actually pretty old.

The timing of open-sourcing it mystifies me a bit. Maybe Amazon is trying to become more open-source friendly, like Microsoft did?

Perhaps more likely: they're planning on making some internal APIs that use ION heavily public?

Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

#5
Interestingly enough a JSON alternative named "ION" was just posted as a Show HN[0] about three months ago.

So now not only do we have the problem of redundant and mutually incompatible protocols (cue obligatory xkcd), but that we have so many such protocols that name collision is becoming an extra problem.

[0] https://news.ycombinator.com/item?id=11027319

Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

#6
post #5

Interestingly enough a JSON alternative named "ION" was just posted as a Show HN[0] about three months ago. So now not only do we have the problem of redundant and mutually incompatible protocols (cue obligatory xkcd), but that we have so many such protocols that name collision is becoming an extra problem. [0] https://news.ycombinator.com/item?id=11027319

I mentioned this Ion in that thread, if anyone is interested in the ensuing discussion: https://news.ycombinator.com/item?id=11028205

Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

#7
post #2

This reminds me a lot of Avro: https://avro.apache.org/docs/current/ They both have self-describing schemas, support for binary values, JSON-interoperability, basic type systems (Ion seems to support a few more field types), field annotations, support for schema evolution, code generation not necessary, etc. I think Avro has the additional advantages of being production-tested in many different companies, a fully-JSO…

> but I think I could do without "clobs", "sexprs", and "symbols" at this level of representation

I'm by no means a real Lisp programmer, but even I find S-Expressions more natural to write and process. And the simplicity of it allows for great editing tools too. This may be personal, but I always found JSON clunky.

Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

#8
A question for frontend devs: Will H2 being binary on the wire inspire more use of binary data representations as well, with conversion to JSON only on the client? Passing around JSON or XML across a big SOA (or micro-services) architecture is a waste of cycles and doesn't have types attached for reliability and security.

Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset

#10
Binary values can be stored as base64 in regular old JSON as well. Yes that is bigger but same as email/MIME binary chunks are converted to base64. Email messages and attachments are handled this way, we do this everyday. Base64 does bloat by 40%ish, so the larger content could be compressed/decompressed prior to base64 encoding it and vice versa or even encrypted/decrypted on either end in software/app layer.

No need for a new protocol when doing it that way for basic things, if you need more binary (busy messaging/real-time) there are plenty of alternatives to JSON.

I love the simplicity of JSON, so do others and it is successful so many try to attach on to that success. The success part was that it was so damn simple though, most attachments just complicate and add verbosity, echoes back to XML and SOAP wars which spawned the plain and simple JSON. Adding complexity is easy and anyone can do it, good engineers take complexity and make it simple, that is damn difficult.

Post reply on HN