|
Algorithm 1. Registration of Candidate for Server Placement of a Certain Service |
| 1 |
Input: |
| 2 |
an input service |
| 3 |
the set of edge nodes |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
fordo
|
| 8 |
of servers |
| 9 |
|
| 10 |
// The set of assignments for of servers consists of sets of key-value pairs |
| 11 |
// key: a server, value: a node running the server |
| 12 |
// i.e.,
|
| 13 |
for each
do
|
| 14 |
|
| 15 |
|
| 16 |
// The set of mapping information for assignment , consists of sets of key-value pairs |
| 17 |
// key: a client, value: a server mapped with the client |
| 18 |
// i.e.,
|
| 19 |
for each
do
|
| 20 |
|
| 21 |
|
| 22 |
for each
do
|
| 23 |
the server mapped with client
|
| 24 |
|
| 25 |
|
| 26 |
end for
|
| 27 |
for each
do
|
| 28 |
|
| 29 |
|
| 30 |
end for
|
| 31 |
|
| 32 |
|
| 33 |
end for
|
| 34 |
end for
|
| 35 |
|
| 36 |
if
then break
|
| 37 |
end for |
| 38 |
|
| 39 |
Output: |
| 40 |
return
|