|
Algorithm 2 Dynamic adaptation to new services. |
| Let be the node requesting the service . |
| Given a new service with processing unit and related QoS such that each is a finite set of n quality choices for the attribute, expressed in decreasing order of preference, for all k QoS dimensions. Let be a global variable that stores the set of available nodes in the cluster. |
| Let be the sub cluster that will provide the new service. |
| Let broadcast to the local network the request for nodes to register adding them to . |
| while do
|
| for each do
|
| Let be the QoS delivered by node
|
| if is higher (in all its dimensions) than Q then
|
| if can accommodate such service along existing ones then
|
|
|
| end if
|
| end if
|
| end for
|
| end while
|
| return
|