Imagine such situation that we have one scheduling system(1 Host) and, for example, 6 computers (workers) intended to perform instruction from scheduling system.
In typical situation we may use task = new Task(name, computingSize, communicationSize)
. If we want that worker1 starts to process task we usually use task.send(mailboxOfWorker1)
.
But what about situation when all data is stored on worker1 Host. How can we send instructions from scheduling system(Master
) to worker1 to start to process some task(name, compSize, commSize)
(when data of task is stored on worker1
). Or for example such situation, how can we send instruction from scheduling system to worker1
like that -- firstly download data from worker2
, then (after retrieving data from worker2
) start to execute them (on worker1)?
I think that there is two questions in your question.
First, you want to have worker1 to send tasks to worker2. This is perfectly legal, nothing prevents you from doing so. There is many example of this in the examples, such as token_ring
.
Then, you want to have some extra information attached to the task. This is perfectly legal too. In Java, the best is to declare a new class derivating Task, and adding the extra fields you need. This is done in many examples too, such as bittorrent
, chord
or kademlia
...