Today's popular data formats are either

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-10-27 10:00:02

Today's popular data formats are either "one-way" or "RPC". "One-way" is something like CSV or JSON. I can dump my data into such format, send it to somebody, never see it again. If they send me back my JSON with some changes, that might be a problem. "RPC" formats are likes of Protobuf, Capnproto, etc. Those are "I tell you, you tell me" formats to exchange pre-agreed messages.

RDX is the greatest-common-denominator data format. Systems should be able to import/export data from/to RDX, be it the entire state or separate patches.

RDX is a very algebraic data format on the inside. First, it employs CRDTs, Commutative Replicated Data Types. That means, any two versions of an object can merge deterministically. Second, its basic constructs are neatly orthogonal and arbitrarily composable. For example, {"a":"map"} is not a primitive, it is {"a","set"} "of":"tuples". Tuples "can":"be":"standalone", or they <"can":"nest">:<"in":"other">:"tuples" or [{"any"}, <"other":"containers">].

RDX has a text variant, RDX-Jsonish which is as readable as JSON. There is also a binary variant RDX-TLV which is the most straightforward Type-Length-Value. Variants correspond 1:1.

Leave a Comment