Hi Guys,
I'm looking into building a distributed application and would like some advice on the best way to go about it.
My system will comprise of a central management web application where tasks will be defined, and a number of task runners which will be installed on different machines to processes those tasks.
What I need to work out is how to distribute the tasks to the clients? Should I just create a queue of tasks, and the task runners constantly poll the queue to see if a new task is ready? What would be the best way to ensure a task is only processed by one task runner? How could I also ensure tasks get evenly distributed between the task runners, so that one task runner doesn't end up processing loads, and other only process a handfull?
The only other approach I could think of is that each task runner makes a TCP connection to the server and registers it's interest, then when a new task is ready, the web app chooses a task runner and pushes the task down to that task runner to process?
Anybody got any other ideas? pointers? or comments?
Many thanks
Matt