Algorithm for deploying services in a group due to the given cost for best average response time.
- install python3
pip3 install -r requirements.txt
- prepare your data. change the parameters in the
main
function ofmain.py
Follow the comments in the
main
function ofmain.py
to organize your data in files
{
"index": 0, # index in given function list
"svcIndex": 0, # index of the service
"input": 0, # input data size
"output": 0 # output data size
}
A dict describes the service dependencies
{
${caller function index}: {
${called function index}: 3.2, # each function may depend on many other functions with call coefficient
...
},
...
}
A dict describes how many requests of each function should be solved considering call coefficients between functions
{
${function index}: 0,
...
}
{
${server index}: {
${function index}: 0,
...
},
...
}
{
"index": 0, # index in given service list
"res": {
"cpu": 0,
"ram": 0
},
"ability": 0, # throughput with given resource
"id": id # unique service id. Not necessary in the algorithm
}
{
"index": 0, # index in given node list
"res": {
"cpu": 0,
"ram": 0
}
}
{
${fromIndex}: {
${toIndex}: {
"delay": 0,
"bandwidth": 0
}
}
}
{
'cpu': 0.0,
'ram': 0.0,
'max': 0.0
}
{
"svcList": [services],
"funList": [functions],
"funChains": chains,
"nodeList": [servers],
"connections": [connections],
"users": user requirements,
"abilityConstraints": ability constraints
}