Git Product home page Git Product logo

Comments (2)

hackerwins avatar hackerwins commented on July 28, 2024

Other CRDT libraries garbage collection and tombstone.

Y.js:

We can't garbage collect deleted structs (tombstones) while ensuring a unique order of the structs. But we can 1. merge preceeding structs into a single struct to reduce the amount of meta information, 2. we can delete content from the struct if it is deleted, and 3. we can garbage collect tombstones if we don't care about the order of the structs anymore (e.g. if the parent was deleted).

https://github.com/yjs/yjs/blob/705dce78384bac8f25fa11d05e3b2551325a5d26/README.md#yjs-crdt-algorithm

Automerge

Yes, RGA uses tombstones. I think this is okay for now, as in most cases, the tombstones are not really the dominant cost. Also, I think it is desirable to retain history (so you can see what was changed when), and that requires remembering deleted parts of the document anyway.
automerge/automerge#221 (comment)

from yorkie.

hackerwins avatar hackerwins commented on July 28, 2024

Yorkie's GC logic looks like this:

  • Agent returns MinPulledTicket to the client in the response of PushPull API
    • find min_pulled_server_seq
      document `d1` server_seq: 10
      client `c1` server_seq: 5
      client `c2` server_seq: 7
      
      min_pulled_server_seq: 5
      
    • create MinPulledTicket, time.Ticket of min_pulled_server_seq
  • The client purge elements(marked with tombstone) that were removed earlier than the MinPulledTimeTicket received in response to PushPull.

from yorkie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.