News for hackers. Stuff that matters.
Re:Building a BFT JSON CRDT by jackyzhao on Monday November 21, 2022 @03:30PM (#33697515)
Hey! Author of the post responding here :) Unfortunately max/min-length is a global invariant and not one that can be reinforced by CRDTs without coordination

bloom-lang.net is a really cool project working on trying to figure out what types of program state actually require coordination at compile time

Re:Building a BFT JSON CRDT by jitl on Monday November 21, 2022 @05:36PM (#33699108)
Right - I think what Sam is wondering about is if there’s a better way to maintain some of those invariants when decoding the CRDT data or at least preserve user intent with more fidelity by taking the invariants into account. For example, if a ProseMirror schema says “figure can have one caption child”, then a CRDT library can assist by making Child a LWW register instead of an array; or picking the last item in the array instead of the first when limiting length.
Re:Building a BFT JSON CRDT by jackyzhao on Monday November 21, 2022 @06:22PM (#33699608)
Ah gotcha. This would be a cool area of research! Not sure if I know of many people working on that right now
Re:Building a BFT JSON CRDT by jitl on Monday November 21, 2022 @10:13PM (#33701317)
To me it seems mostly a composition problem; we need a better way of expressing these kinds of application constraints in a formal schema so we can encode/decode application data structures to CRDTs without requiring invasive intermixing of the two concerns in a way that explodes complexity of both the app and the CRDT details.