pigeon
jdd
pigeon | jdd | |
---|---|---|
4 | 2 | |
54 | 967 | |
- | - | |
0.0 | 6.9 | |
over 1 year ago | 10 days ago | |
JavaScript | JavaScript | |
- | 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.
pigeon
-
You might not need a CRDT
We have used Automerge a bunch, but found that there is a threshold where beyond a given document size, performance gets exponentially worse, until even trivial updates take many seconds' worth of CPU. That is often how it works when the document end state is exclusively the sum of all the edits that have ever happened.
Our answer was to reimplement the Automerge API with different mechanics underneath that allows for a "snapshots + recent changes" paradigm, instead of "the doc is the sum of all changes". That way performance doesn't have to degrade over time as changes accumulate.
Project is here: https://github.com/frameable/pigeon, with some benchmarks: https://github.com/frameable/pigeon/wiki/Benchmarks in the wiki...
-
Pigeon - Fast diff, patch, merge, and synchronizing JSON documents with an Automerge-compatible interface in JavaScript
Some benchmarks are here: https://github.com/frameable/pigeon/wiki/Benchmarks
- Show HN: Pigeon–Fast diff, patch, merge for JSON with an Automerge-like API
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.
peritext - A CRDT for asynchronous rich-text collaboration, where authors can work independently and then merge their changes.
statebox_riak - Convenience library that makes it easier to use statebox with riak, extracted from best practices in our production code at Mochi Media.
aper - A Rust data structure library built on state machines.
automerge-perf - Performance tests for Automerge
diamond-types - The world's fastest CRDT. WIP.