Archived

This forum has been archived. Please start a new discussion on GitHub.

Dynamic adapt to change of node count

Hello everyone.

I want to implement such a scenario: there is a dispatcher service in ICEGRID responsible for dispatch tasks to several nodes according to a map relationship. When a new node is added or an old node is down, the dispatcher should update its map relationship between tasks and nodes, aka, the dispatcher should dynamically adapt to the change of node count.

In this scenario, each node is running on each PC and the dispatcher service is running on a different PC. All the nodes are similar but handle different task according to a task ID. For example, there are three nodes n1, n2 and 6 tasks t1, t2, t3, t4. At the beginning, n1 is responsible for t1, t3 and n2 is responsible for t2, t4. The map relationship of node and task is made by dispatcher. When n2 is down, dispatcher should update the relationship and let n1 responsible for t1~t4.
Besides, each node should have only one server instance, because there is a queue in each node and I want to always get the queue size, if there are several server instances using replica of ICEGRID, I can not make sure which queue I am using.

My question is that if there is any available solution of ICE. If there is no, I want to use observers design pattern to implement that. So I will have a registNode() function in dispatcher service and when a node is added it will call this function in node constructor. But I am not sure what data type to register, is it should be a proxy of that node?

Thank you very much.

Comments