1. 17
  1.  

  2. 4

    Here’s a little context on Delta and the linked blog post:

    Delta is a format to describe documents’ contents and how it changes over time. This is a core piece of technology at Slab, that powers our real-time collaboration engine, thanks to the built-in support for Operational Transform (think multiple users working together in Google docs).

    Though we’ve been using it internally for almost 4 years now, we’re finally open-sourcing it to the wider Elixir community.

    Feel free to reach out if you have any questions or feedback!

    1. 1

      What kind of networking does the OT use underneath? e.g. are you using some form of epidemic broadcast?

      1. 1

        This library just implements the core OT format and algorithms, and not any networking component.

        Though at Slab, we use this with Phoenix Channels on top of a custom GenServer & Supervisor and it has worked out great for us.

      2. 1

        Do Google docs still use OTs? I thought they moved away from them about a decade ago because they hit the problem everyone hits just after they’ve invested a lot in OTs: that they hit combinatorial problems when you have a lot of operations and they all need to compose.

        1. 2

          AFAIK Google Docs still uses OT, though they have probably moved away from the extremely rich data model supported by Wave early on. A visible artifact of this is that for each doc, there is a server coordinating updates, and with a large number of clients it can get overloaded (“Editing is temporarily disabled”). OT requires a centralized server to handle the propagation of updates.

          CRDTs, conversely, allow a flatter topology in which the server is more like just another client. As you can imagine, having a centralized authority simplifies things, so CRDTs are generally more complex than OTs with equivalent operations, and were for a long time considered infeasible for real-time editing and similar use cases.

          1. 1

            Yes AFAWK they still use OT and never moved for realtime text editing.

            To implement transform for OT you do need to consider all interactions between the different operations so the complexity is n^2 where n is the number of operations (although many combinations may be similar). Google Wave ran into this issue and was a common criticism even amongst their own engineering team. That’s why our design only includes 3 operations: insert, delete, and retain. A tradeoff example is: there is no replace operation. To effectively implement replace you would use insert + delete. There are subtle differences between a replace and a insert+delete but we did not feel they were worth the complexity it would create.