crdt-example-app
distributed-counters
Our great sponsors
crdt-example-app | distributed-counters | |
---|---|---|
2 | 1 | |
567 | 6 | |
- | - | |
0.0 | 10.0 | |
over 1 year ago | almost 11 years ago | |
JavaScript | Erlang | |
- | - |
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.
crdt-example-app
-
Downsides of Offline First
* https://www.youtube.com/watch?v=DEcwa68f-jY
And his demo implementation (and annotated fork):
* https://github.com/jlongster/crdt-example-app
-
Why do Webdevs keep trying to kill REST?
Better protocols lead to improved UX (eliminating user-facing errors and offering faster updates) and DX (shifting errors left) and they're so relevant to the "why are you avoiding REST" debate that I split them out to their own category. Technically of course, whatever protocol you use may be a layer atop of REST - if you have a separate layer (like CRDTs) that handles syncing/conflict resolution, then that is the protocol you are really using.
distributed-counters
-
Downsides of Offline First
I was also a "true believer" in CRDTs for a long time, implementing my first ones in Erlang about 9 years ago[1], but my opinion of where they fit has changed significantly.
The one issue with CRDT that I find is rarely mentioned and often ignored is the case where you've deployed these data structures that include merge logic to a set of participating nodes that you can't necessarily update at will. Think phones that people don't update, or IOT/sensor devices like electric meters or other devices "in the wild".
When you include merge logic – really any code or rules that dictate what happens when the the data of 2 or more CRDTs are merged – and you have bugs in this code running on devices you can never update, this can be a huge mess. Sure you can implement simple counters easily (like the ones I linked to), and you can even use model checking to validate them. But what about complex tree logic like for edits made to a document? Conflict resolution logic? Distributed file system operations? These are already very complex and hard to get right without multiple versions involved and unfixable bugs causing mayhem.
Having to deal with these bugs in the context of a fleet of participants on a wide range of versions of the code, the combinatorial explosion of the number of possible interactions and effects of these differing versions and bugs taken together can really become impossible to manage.
I'd be interested to hear from folks who have experience with these kinds of issues and how they have dealt with them, especially if they are still convinced that CRDTs were the right choice.
[1] https://github.com/nicolasff/distributed-counters
What are some alternatives?
absurd-sql - sqlite3 in ur indexeddb (hopefully a better backend soon)
offix - GraphQL Offline Client and Server
supabase - The open source Firebase alternative.
hotwire-rails - Use Hotwire in your Ruby on Rails app
shelf
redux-offline - Build Offline-First Apps for Web and React Native
RxDB - A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/
noms - The versioned, forkable, syncable database