state
y-websocket
state | y-websocket | |
---|---|---|
2 | 1 | |
176 | 436 | |
2.8% | 2.5% | |
0.0 | 7.1 | |
over 1 year ago | 13 days ago | |
TypeScript | JavaScript | |
- | MIT License |
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.
state
-
Show HN: SyncedStore CRDT – build multiplayer collaborative apps for React / Vue
Hi! Great questions :)
First of all, SyncedStore does not implement any CRDT algorithms. Credits for this go to Yjs [1] (and its author Kevin), which it uses as underlying CRDT.
Yjs and Automerge are (afaik) the two most commonly used CRDT implementations. Both have their pros and cons, but Yjs has focused a lot on performance [2].
Automerge has a bit friendlier "Immer style" [3] API. I'm not too familiar with @localfirst/state, but it seems to add a Redux style API on top of Automerge.
My approach with SyncedStore was really to provide an API on top of Yjs that's as simple as possible to use in React / Vue / Svelte or plain JS app. I.e.: only use a single React Hook to observe changes, and use regular Javascript assigments to update values. The API is inspired mostly by Reactive Programming libraries such as MobX [4] (from the same author as Immer).
Hope you're still following along :) Maybe it helps to compare the TODO-MVC applications, as both SyncedStore (https://github.com/YousefED/SyncedStore/tree/main/examples) and @localfirst/state (https://github.com/local-first-web/state/tree/main/examples/...) have implemented these as examples!
[1]: https://github.com/yjs/yjs
y-websocket
What are some alternatives?
automerge - A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
SyncedStore - SyncedStore CRDT is an easy-to-use library for building live, collaborative applications that sync automatically.
MobX - Simple, scalable state management.
automerge-rs - Rust implementation of automerge [Moved to: https://github.com/automerge/automerge]
yjs - Shared data types for building collaborative software
y-webrtc - WebRTC Connector for Yjs
swarmbase - swarmbase is a peer-to-peer dweb database with access control
crdt-benchmarks - A collection of CRDT benchmarks