Loro's Avatar

Loro

@loro.dev.bsky.social

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

173 Followers  |  6 Following  |  4 Posts  |  Joined: 06.11.2024  |  1.3976

Latest posts by loro.dev on Bluesky

Video thumbnail

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.

30.04.2025 07:28 β€” πŸ‘ 19    πŸ” 4    πŸ’¬ 1    πŸ“Œ 0
Preview
Release loro-crdt@1.3.0 Β· loro-dev/loro Minor Changes ddafb7e: feat: diff, applyDiff, and revertTo #610 Add new version-control-related primitives: diff(from, to): calculate the difference between two versions. The returned results ha...

github.com/loro-dev/lor...

09.01.2025 08:48 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image Post image

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.

09.01.2025 08:48 β€” πŸ‘ 14    πŸ” 3    πŸ’¬ 1    πŸ“Œ 0

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

26.11.2024 19:05 β€” πŸ‘ 12    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0

πŸ™Œ

24.11.2024 13:59 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Container Overwrites
When initializing child containers in parallel, overwrites can occur instead of automatic merging. For example:

const doc = new LoroDoc();
const map = doc.getMap("map");
 
// Parallel initialization of child containers
const docB = doc.fork();
const textA = doc.getMap("map").setContainer("text", new LoroText());
textA.insert(0, "A");
const textB = docB.getMap("map").setContainer("text", new LoroText());
textB.insert(0, "B");
 
doc.import(docB.export({ mode: "update" }));
// Result: Either { "meta": { "text": "A" } } or { "meta": { "text": "B" } }
This behavior can lead to serious data loss issues. If a container holds significant data or even the entire document's content, overwriting it could result in unexpected loss of important information. While the complete editing history is preserved and allows for potential recovery of user data, the recovery process can be complex.

Container Overwrites When initializing child containers in parallel, overwrites can occur instead of automatic merging. For example: const doc = new LoroDoc(); const map = doc.getMap("map"); // Parallel initialization of child containers const docB = doc.fork(); const textA = doc.getMap("map").setContainer("text", new LoroText()); textA.insert(0, "A"); const textB = docB.getMap("map").setContainer("text", new LoroText()); textB.insert(0, "B"); doc.import(docB.export({ mode: "update" })); // Result: Either { "meta": { "text": "A" } } or { "meta": { "text": "B" } } This behavior can lead to serious data loss issues. If a container holds significant data or even the entire document's content, overwriting it could result in unexpected loss of important information. While the complete editing history is preserved and allows for potential recovery of user data, the recovery process can be complex.

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:

06.11.2024 11:34 β€” πŸ‘ 10    πŸ” 1    πŸ’¬ 2    πŸ“Œ 1

πŸ¦‹

06.11.2024 06:19 β€” πŸ‘ 7    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
Preview
Loro 1.0 Announcing Loro 1.0: Introducing a stable encoding schema, 10-100x faster document import, advanced version control, and more for efficient real-time collaboration and local-first software development...

Loro 1.0 is here!

Introducing stable binary document format, blazing-fast import speed, Git-like shallow clone, enhanced version control, and more.

loro.dev/blog/v1.0

23.10.2024 18:15 β€” πŸ‘ 43    πŸ” 9    πŸ’¬ 3    πŸ“Œ 5

@loro.dev is following 6 prominent accounts