A Gentle Introduction to CRDTs

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • cr-sqlite

    Convergent, Replicated SQLite. Multi-writer and CRDT support for SQLite

  • The linked projects (https://vlcn.io and https://github.com/vlcn-io/cr-sqlite) are both extremely impressive, and open up the possibility of adding "multiplayer" to smaller projects that rely on SQLite for local storage—including web apps, via a WASM build of SQLite.

  • Strut

    Strut - An Impress.js and Bespoke.js Presentation Editor

  • Yep! That was one plan for deploying cr-sqlite to a server.

    D1, unfortunately, doesn't support loading extensions into SQLite.

    fly.io, and their replicated sqlite solution, does however!

    I've been using fly.io to run cr-sqlite in the cloud and act as a sync server for non peer to peer use cases. Eventually I'll have finished up a re-write of strut.io[1] atop vlcn/cr-sqlite which'll serve as a good end to end example of how to make applications with this sort of architecture.

    Some discussion about this setup on their forums: https://community.fly.io/t/litefs-many-tens-to-hundreds-of-t...

    [1] https://github.com/tantaman/strut

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • Pentive

    Collaborative Spaced Repetition

  • I'm using cr-sqlite right now in my Anki clone: https://github.com/AlexErrant/Pentive

    It's basically an offline-first flashcard webapp. CR-Sqlite allows for incremental syncing.

    With Anki (the app from which I'm taking my inspiration), syncing is _not_ incremental - basically it just copies SQLite files around. So for example, the app could be on an iPhone with cards a card `A` reviewed, but the app on an iPad could make changes to the template on which card `A` is based, and that's enough to cause a conflict - you must take changes from only the iPad or only the iPhone. (To be clear - Anki does have some incremental syncing capabilities - I'm picking an intentionally pathological example.) CR-SQLite will mean that everything is incremental, however.

    Basically makes 3 way merges a breeze (or n-way merges, really).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts