Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Usage ----- node ./main.js [number of consumers] Example: node ./main.js 3 The General Idea ---------------- Let's say you have a bunch of consumers polling a changes feed. You want to divide the work between the consumers evenly, so you decide to base it on the documents' _id since they are just big hexidecimal numbers. Flow ---- - Take in the results of /_uuids (from a file) - Grab the last 4 characters of each id - Converts that hex number to decimal - Take the remainder of that decimal number divided by the number of nodes - Output distribution