distributed-counters
offix
distributed-counters | offix | |
---|---|---|
1 | 2 | |
6 | 771 | |
- | - | |
10.0 | 0.0 | |
almost 11 years ago | about 1 year ago | |
Erlang | TypeScript | |
- | 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.
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
offix
-
Downsides of Offline First
Yeah,I'm trying to implement an electron offline first app that syncs, there seems to readymade solution.
Stuff like https://github.com/aerogear/offix seem to be in the right direction of what I'm looking for but not nearly mature enough.
I don't want to pu to much effort on the app so I would like something more or less ready made, preferably with graphql apis.
Any suggestions welcome.
-
Is GraphQL a wrong choice for offline-first apps?
I ended up with Offix and had to do optimistic cache handling, and I wrote up my experiences in a GitHub ticket on their repo with code as guidance for others. https://github.com/aerogear/offix/issues/715
What are some alternatives?
absurd-sql - sqlite3 in ur indexeddb (hopefully a better backend soon)
howtographql - The Fullstack Tutorial for GraphQL
shelf
destreamer - Save Microsoft Stream videos for offline enjoyment.
apollo-log - A logging extension for the Apollo GraphQL Server
noms - The versioned, forkable, syncable database
crdt-example-app - A full implementation of CRDTs using hybrid logical clocks and a demo app that uses it
cashew - 🐿 A flexible and straightforward library that caches HTTP requests in Angular
redux-saga - An alternative side effect model for Redux apps
apollo-cache-persist - 🎏 Simple persistence for all Apollo Cache implementations
apollo-mocked-provider - Automatically mock GraphQL data with a mocked ApolloProvider