mkscrg / hashring Goto Github PK
View Code? Open in Web Editor NEWAn experiment in consistent hashing with radix trees
License: Other
An experiment in consistent hashing with radix trees
License: Other
In the comments in the code you claim O(1) lookup performance. I don't believe this is correct or even possible.
In lookup, you're using IntMap.splitLookup. This is O(log n) which is what I'd expect given that it's a tree structure. But that would correspond to O(NR) if N is the number of nodes added.
Maybe I'm missing something, but I can't see how your lookups (or indeed any space-efficient implementation of CH) can be O(1).
Hey Mike,
Just noticed your library while researching for a consistent hashing solution. Looks real nice!
I do have one question though - isn't it a problem that the hashable package does not promise to produce consistent values across program runs? Wouldn't this mean that 3 separate nodes looking at the same list of servers may find their messages in different nodes?
Cheers,
Oz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.