kvandake / lexorank-ts

A reference implementation of a list ordering system like JIRA's Lexorank algorithm
197 stars 27 forks source link

Document how to use buckets #26

Open nirvdrum opened 1 year ago

nirvdrum commented 1 year ago

While looking at the source, I noticed that LexoRank.max() returns the max value for the first bucket and not the max value permissible. I thought maybe this was a bug because the library sets up three buckets. However, the library also can't call LexoRank.between() with two LexoRank instances corresponding to different buckets.

I was under the impression buckets were used to expand the range of possible values or possibly to shard values or help out database indices. But, it looks like the only way to get out of BUCKET_0 is to manually create the LexoRank with a reference to another LexoRankBucket. Can you please clarify the role buckets play and how they should be used?

bhargavgohil25 commented 1 year ago

Yeah. It would be really helpful to include lexorank bucket documentation.

RishiSargar commented 1 year ago

Yes, It would really helpful get more information on how to apply rebalancing with the help of buckets

episage commented 10 months ago

Buckets are solution to lack of atomic transactions in NoSQL system. You keep using bucket 0 and recreate/rebalance in 1, then switch to using 1. All operations on 0 must be paused while doing it.