This project collects Java implementations of the most popular and best performing consistent hashing algorithms for non-peer-to-peer contexts.
The implemented algorithms are:
- [1997] ring hash by D. Karger et al.
- [1998] rendezvous hash by Thaler and Ravishankar
- [2014] jump hash by Lamping and Veach
- [2015] multi-probe hash by Appleton and O’Reilly
- [2016] maglev hash by D. E. Eisenbud
- [2020] anchor hash by Gal Mendelson et al.
- [2021] dx hash by Chaos Dong and Fang Wang
Each implementation is divided into two classes:
- Each Engine class (e.g., AnchorEngine) contains an accurate implementation of the algorithm as described in the related paper. These classes do not make any consistency check to keep the performance as close as possible to what was claimed in the related papers.
- Each Hash class (e.g., AnchorHash) is a wrapper of the related Engine class allowing every implementation to match the same interface. These classes also perform all the consistency checks needed to grant a safe execution.