Comments (2)
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.
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)
- Improve time complexity of getIndex
- Space improvement of node HOT 1
- Factorize lseq.get(i) && lseq.get(i+1) in insert
- Specification of functions applyInsert and applyRemove HOT 1
- Delay conversion fromNodetoId
- Run code within browsers
- Performance comparison between lseqarray and lseqtree
- Fast access to the last index used
- Mutable subCounters HOT 6
- Byzantine LSEQ-Node.add problem HOT 3
- LSEQ + Tombstones HOT 3
- Inefficient LSEQNode.getIndex
- A few "scary" questions... HOT 4
- Does this library use Tombstones? HOT 3
- Error: Cannot find module 'lodash.merge'
- Optimize json output by adding toJSON()
- add toText() method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lseqtree.