Algorithm 2 Suggest optimal pod placement using coupling and dependency |
-
Require:
DataFrame , DataFrame , List of Nodes , Mean Threshold , Weight X, Weight Y
-
Ensure:
Optimal Pod Placement
-
1:
-
2:
-
3:
-
4:
Sort pods by total communication and coupling count in descending order
-
5:
for each in do
-
6:
for each in do
-
7:
if and then
-
8:
Append to
-
9:
end if
-
10:
end for
-
11:
end for
-
12:
Sort by combined count in descending order
-
13:
for each in do
-
14:
-
15:
Append to
-
16:
end for
-
17:
for each in do
-
18:
Node containing in
-
19:
Node containing in
-
20:
if then
-
21:
if then
-
22:
Move to
-
23:
Remove from
-
24:
else
-
25:
Move to
-
26:
Remove from
-
27:
end if
-
28:
end if
-
29:
end for
-
30:
return
|