GithubHelp home page GithubHelp logo

Why the random strategy choice? about lseqtree HOT 2 OPEN

tleb avatar tleb commented on July 28, 2024
Why the random strategy choice?

from lseqtree.

Comments (2)

Chat-Wane avatar Chat-Wane commented on July 28, 2024

Sorry for the delay, I just read the issue.

In this implementation, the strategy is alternated as you described, for the sake of simplicity. However, in the paper, the strategy is chosen at random; one per depth in the underlying tree. The reason is the following: it is very easy to challenge the global allocation strategy if you know which sub-allocation strategy is used at which position in the sequence. For instance, if you know that the strategy is boundary+ you will insert new characters in front of each other. After a few, you will invert the insertion pattern, for you know that boundary- is the new sub-allocation function in use at this position.
So it is mostly to make life difficult to malicious users (assuming that they do not know the generated identifiers).

It is worth noting that even with a randomized strategy choice, a malicious user could challenge easily the allocation strategy by inserting between the 'boundary'. However, using LSeq, the difference between 'normally-generated' identifiers (log^2 of the number of insertions) and 'maliciously-generated' identifiers (number of insertions^2) is such that you could detect them and act accordingly.

My final goal is to implement LSEQ in Go. :)

Nice! Do you plan to write a distributed collaborative editor in Go or is it just for fun?

from lseqtree.

tleb avatar tleb commented on July 28, 2024

Thanks for all those infos, I'll stick with the alternating solution then.

Nice! Do you plan to write a distributed collaborative editor in Go or is it just for fun?

It's for fun, but if I find a nice project I could make us of this in, I won't hesitate. But first, I need to grasp every detail of LSEQ to make my implementation.

from lseqtree.

Related Issues (18)

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.