Loro

Loro

@loro.dev

Reimagine state management with CRDTs https://github.com/loro-dev/loro

212 followers6 following10 posts

New in Loro: Mergeable Containers! Concurrent Map child container creations no longer overwrite. This surprising overwrite issue existed in Loro, Yjs, and Automerge. Happy to finally ship a solution!

View full thread

The fix: make the child ID independent of the creation OpId. We reuse Loro’s Root Container idea: identity from a unique string. For mergeable children, that string encodes the parent LoroMap + key, so both peers derive the same ID.

New in Loro: Mergeable Containers! Concurrent Map child container creations no longer overwrite. This surprising overwrite issue existed in Loro, Yjs, and Automerge. Happy to finally ship a solution!

Root cause: normal child Container IDs include an OpId. So if two peers create a child container concurrently, they get different IDs. When both write to the same LoroMap key, one child can overwrite the other.

The Loro Protocol repo is now open source! It contains documentation for the wire protocol, along with TypeScript and Rust implementations of WebSocket clients and servers. The protocol allows reusing a single connection to join multiple CRDT rooms, such as Loro documents or the Ephemeral Store.

Loro reposted

Loro Inspector is here! Now you can directly browse the current state and complete edit history of your Loro documents in the browser. You can also use this tool to time travel to any version in the history of your Loro document.

New version control primitives have been added to Loro: - diff(from, to): calculate the differences between any two versions - revertTo(version): Generate ops to revert to the target version - applyDiff(diff): Apply differences You can use them to implement functions like git squash and revert.

Loro reposted

The slides for the talk are available here: loro-slidev.vercel.app

Yonz@yonz.bsky.social

Join us for #LoFi/21 on Tuesday, November 26th, 2024, @ 8 AM PST 👉🏽 lofi.so. We have yet another exciting lineup featuring Felicia Chang (x/@felchang) from x/@jamsockethq, Sahil Lalani (x/@SahilLalani0) and Zixuan Chen (x/@zx_loro) from x/@loro_dev #localfirst #lofi #meetup

Loro reposted

You may experience data loss due to the following issues caused by incorrect usage of CRDTs libraries, regardless of whether you're using Loro, Automerge, or Yjs. Here is how to avoid them:

You are up to date.