Skip to content
Prototyping CRDT
TypeScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs/design-decisions
packages
.gitignore
README.md
docker-compose.yml
lerna.json
package.json
yarn.lock

README.md

Purpose:

  • Prototype to test implementing CRDT into Logbook

Open Source Examples

Y.js

Notes:

  • Hard to deconstruct

Conclave

https://conclave-team.github.io/conclave-site/

Conclave is a peer-to-peer, real-time, collaborative text editor built from scratch in JavaScript. Intrigued by collaborative text editors such as Google Docs, we set out to build our own. This case study walks you through our journey from the initial idea to our research of current academic literature and finally to our design and implementation of the final product.

Notes:

  • No longer maintained

Algorithms

  • CRDT
  • Diff

CRDT

Also known as:

  • Conflict-free replicated data type
  • Commutative replicated data type
  • Convergent replicated data type

See packages/shared/src/CRDTStructure.ts

Properties:

  • Every character/token has some metadata:
    • token
    • franctional index position
    • non unique id
    • window

Links:

Diff

Problems with diff package:

  • Uses different keywords than the paper
  • Uses let when it should use const
  • Has "callback" support
  • Has large inline functions execEditLength
  • The while loop can be easily forgotten
  • function extractCommon modifies the state of an argument
  • Uses an array as a map
  • Makes it hard to understand the paper that it is based on
  • Assign multiple variables on the same line
  • Uses similar worded variables, bestPath and basePath
  • Undefined variable: useLongestToken
You can’t perform that action at this time.