statebox_riak
jdd
statebox_riak | jdd | |
---|---|---|
1 | 2 | |
48 | 967 | |
- | - | |
10.0 | 6.9 | |
over 10 years ago | 13 days ago | |
Erlang | JavaScript | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
statebox_riak
-
You might not need a CRDT
This is a cool approach. It reminds me of statebox by mochimedia: https://github.com/mochi/statebox_riak.
If I'm understanding correctly, it requires the mutations to be deterministic in order for the nodes to converge.
Replicache (replicache.dev - my thing) takes a similar approach except it does not requires the mutations to be deterministic, which is very useful because it enables, e.g., authenticated operations on the server.
Both the idea here and Replicache's approach are closely related to game networking. If you are interested in these ideas, a really excellent set of content is: https://www.gabrielgambetta.com/client-server-game-architect....
jdd
-
Translation of a JSON file
Without, try something like https://www.jsondiff.com/ - it should recognize the keys and point out differences visually.
-
You might not need a CRDT
> What's difficult is to ensure that the converged state is renderable as richtext. For example, is there a table cell that was inserted where a column was deleted?
Yes. This is one of the fundamental limitations of working at a textual level, which is sort of the local optimum that *nix ended up in. JSON particular gets suuuuper fucked up if you don't merge/rebase carefully. There's no real syntax for it to grab onto and diff doesn't understand the concept of indentation or commas, so it just turns into an ocean of line-swapping and incorrect block-swapping. Diff also does an excruciatingly poor job in the very common case when everyone is appending to the same area (let's say, the end of the file).
This is pretty much just an inherent weakness of textual matching, what you need is to work on trees of lexical token nodes, or some type of object structure stream like powershell.
In some cases patience-diff can help, it tries to generate big blocks of changed ranges, hopefully some of the hunks being syntactically well-formed commits. There is also JSON-diff which implements such a lexical-tree diff model for diff files, similar to the "jq" util. I think that's also viable for other lexable languages too.
https://github.com/zgrossbart/jdd
What are some alternatives?
plane - A distributed system for running WebSocket services at scale.
pigeon - Diff, patch, merge, and synchronize JSON documents with an Automerge-compatible interface
peritext - A CRDT for asynchronous rich-text collaboration, where authors can work independently and then merge their changes.
aper - A Rust data structure library built on state machines.
diamond-types - The world's fastest CRDT. WIP.
automerge-perf - Performance tests for Automerge