zx

@zxch3n.com

Founder of @Loro.dev https://github.com/zxch3n

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 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.

BildBild

Ok, a rundown of how we get p2p ATProtocol going: 1. Run *standard* ATProto services, locally 2. Use p2p to holepunch TCP connections 3. Add a thin layer for peering management Bundle all that up in an app, and we have a recipe for adding resilience & scaling to Bluesky. 🧵 teim:

diagram showing how two phones will use a new app called "skyroh" to talk to each other over p2p communications channels, and the regular bluesky API

Myers diff may generate weird deltas like the following example. It will make concurrent text updates generate weird merge results. Any suggestions? My current thought is to implement an A* search on top of the edit graph that punishes noncontinuous edits

Bild

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:

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.

AT Protocol 貌似也能合法地在大陆部署,因为审核是去中心化的,可以选择性收录账户和内容

If an app needs to support end-to-end encryption, what kind of key management would provide the best UX? Considering that users are likely to forget passwords or lose key files.