Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
automerge-rs
Discontinued Rust implementation of automerge [Moved to: https://github.com/automerge/automerge]
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
So exciting! Strangely enough, a couple of hours before this release, we just managed to wrap our heads around Yjs after playing with it on and off for a few weeks!
For anyone not up to date with the world of CRDTs, Seph Gentle's two blog posts have become legendary:
* https://josephg.com/blog/crdts-are-the-future/
* https://josephg.com/blog/crdts-go-brrr/
these are also worth checking out:
* https://github.com/y-crdt/y-crdt (rust implementation started by the creator of Yjs, Kevin Jahns)
* https://github.com/y-crdt/ypy (python bindings for the rust implementation)
* https://github.com/josephg/diamond-types (Seph Gentle's rust implementation of YATA, the algorith behind Yjs)
See also, Autosurgeon (with a 0.3.0 release today), which is a higher level API on top of Automerge for Rust:
I'm building a mobile app with a server backend, and I was looking for resources to build them in an offline-first way (since unlike on the browser, people expect to use apps offline, if they can, such as fitness or habit trackers).
I found the concept of conflict-free relational data types (CRDTS) interesting as it allows you to have fully offline experiences while also having a conflict-free syncing experience. I was looking for some good libraries and came across automerge [0] and yrs [1], but both had some rough APIs as they're primarily low-level Rust libraries that are wrapped by higher-level TypeScript APIs.
Autosurgeon wraps the low-level API of automerge to make it much more ergonomic, closer to the TypeScript experience, but in Rust of course. You can for example use `struct`s which autosurgeon will serialize and deserialize automatically, which is not present in base automerge, which focuses more on string keys and arbitrary values.
I am planning on using this together with Flutter and flutter_rust_bridge [2] in order to use this same Rust library everywhere. In this case, the server just becomes another (albeit more privileged) client.
[0] https://github.com/automerge/automerge-rs
[1] https://github.com/y-crdt/y-crdt
[2] https://github.com/fzyzcjy/flutter_rust_bridge
diamond-types (for reference for others [0]) still only supports plain text, is that right? I was thinking of using it for more general use cases such as an offline habit tracker, which isn't text of course, but I was interested to hear more on the progress towards other data types such as generic JSON data.
Currently for this use case I've been using autosurgeon [1] so far which has a nice Rust API for structs, even if it might be slower than yjs (or yrs, its Rust implementation) or diamond-types.
[0] https://github.com/josephg/diamond-types
[1] https://github.com/automerge/autosurgeon
See also, Autosurgeon (with a 0.3.0 release today), which is a higher level API on top of Automerge for Rust:
I'm building a mobile app with a server backend, and I was looking for resources to build them in an offline-first way (since unlike on the browser, people expect to use apps offline, if they can, such as fitness or habit trackers).
I found the concept of conflict-free relational data types (CRDTS) interesting as it allows you to have fully offline experiences while also having a conflict-free syncing experience. I was looking for some good libraries and came across automerge [0] and yrs [1], but both had some rough APIs as they're primarily low-level Rust libraries that are wrapped by higher-level TypeScript APIs.
Autosurgeon wraps the low-level API of automerge to make it much more ergonomic, closer to the TypeScript experience, but in Rust of course. You can for example use `struct`s which autosurgeon will serialize and deserialize automatically, which is not present in base automerge, which focuses more on string keys and arbitrary values.
I am planning on using this together with Flutter and flutter_rust_bridge [2] in order to use this same Rust library everywhere. In this case, the server just becomes another (albeit more privileged) client.
[0] https://github.com/automerge/automerge-rs
[1] https://github.com/y-crdt/y-crdt
[2] https://github.com/fzyzcjy/flutter_rust_bridge
See also, Autosurgeon (with a 0.3.0 release today), which is a higher level API on top of Automerge for Rust:
I'm building a mobile app with a server backend, and I was looking for resources to build them in an offline-first way (since unlike on the browser, people expect to use apps offline, if they can, such as fitness or habit trackers).
I found the concept of conflict-free relational data types (CRDTS) interesting as it allows you to have fully offline experiences while also having a conflict-free syncing experience. I was looking for some good libraries and came across automerge [0] and yrs [1], but both had some rough APIs as they're primarily low-level Rust libraries that are wrapped by higher-level TypeScript APIs.
Autosurgeon wraps the low-level API of automerge to make it much more ergonomic, closer to the TypeScript experience, but in Rust of course. You can for example use `struct`s which autosurgeon will serialize and deserialize automatically, which is not present in base automerge, which focuses more on string keys and arbitrary values.
I am planning on using this together with Flutter and flutter_rust_bridge [2] in order to use this same Rust library everywhere. In this case, the server just becomes another (albeit more privileged) client.
[0] https://github.com/automerge/automerge-rs
[1] https://github.com/y-crdt/y-crdt
[2] https://github.com/fzyzcjy/flutter_rust_bridge
So exciting! Strangely enough, a couple of hours before this release, we just managed to wrap our heads around Yjs after playing with it on and off for a few weeks!
For anyone not up to date with the world of CRDTs, Seph Gentle's two blog posts have become legendary:
* https://josephg.com/blog/crdts-are-the-future/
* https://josephg.com/blog/crdts-go-brrr/
these are also worth checking out:
* https://github.com/y-crdt/y-crdt (rust implementation started by the creator of Yjs, Kevin Jahns)
* https://github.com/y-crdt/ypy (python bindings for the rust implementation)
* https://github.com/josephg/diamond-types (Seph Gentle's rust implementation of YATA, the algorith behind Yjs)
You’re right, there doesn’t seem to be a PHP SDK yet. This is unholy, but perhaps you could execute it in a node environment with v8js. https://github.com/phpv8/v8js
Otherwise I think you’d be looking at a headless browser in the test runner.
Related posts
- Autosurgeon 0.3.0, use conflict-free replicated data types (CRDTs) to build offline-first apps with an easy-to-use API based on Automerge
- Show HN: Modyfi – a multiplayer design platform built in Rust and wgpu
- Synchronizing local state with the database
- Show HN: Pg_CRDT – an experimental CRDT extension for Postgres
- Rust JavaScript Interoperability? Or can I use OrbitDB from Rust?