If there are large data set of computing tasks each with a unique numeric ID, what are some ways to mathematically assign each task based on numeric ID to a different worker process on multiple machines?
-
For example: Suppose I have a database of 1 million tasks to be performed. I have 100 machines that can perform 1 task per second. These tasks need to be near equally be divided among all workers, but the workers need to compute based on tasks numeric id if the task needs to be performed by them. Any clues?
-
Answer:
You want a hash function. A simple choice would be mod, so machine id = task id % 100.
Anon User at Quora Visit the source
Related Q & A:
- How to Login to Stackoverflow in Chrome with a different Google ID than the one I'm using for Chrome?Best solution by Meta Stack Overflow
- How to read large data set at hourly interval?Best solution by stackoverflow.com
- how to add a form with a unique id on jquery?Best solution by Stack Overflow
- How do I change my my Yahoo ID to a different name, but still have the same account?Best solution by Yahoo! Answers
- How do I change my yahoo ID to a different name?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.