Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor NodeLocator hash and lookup and provide faster implementations #160

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jasonk000
Copy link
Member

Three commits

  1. extract the existing hashing function and the sort/lookup function to distinct components
  2. add a BFS-organized layout for lookups
  3. optimize the hashing function to avoid Charset lookup

A HashRingAlgorithm defines the algorithm that will be used to split a
node into a ring. It assumes the ring will be Ketama-styled in that one
node can be responsible for multiple keyspace ranges. Hash-rings can
also be 'Simple' when they have a 1:1 mapping (one node receives one
keyspace).

A NodeLocatorLookup carries the data layout and associated search
functions to locate a node for a given hash in the hashring.

We also wire in the EVCacheNodeLocator to use the existing default
implementations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant