A simple multithreaded Python

Job ID: 32995074

Budget: €30 – €250 EUR

Different system should be able to log in to a controller node. The controller should be able to detect the different Systems from each other and their instances. The registering of the Systems sghould happen without authentification. Every other communication should happen through one token for the service. The controller as well as the worker nodes should detect when one of them is disconnected (Heartbeat). If the controller finds out about a lost connection it should try and reconnect to the service. The processes that were not finished yet with the programm should be marked as not completed. When reconnecting to the same worker node the controller should know it is not a new worker node and keep the same work progress. The worker should get the same tasks that it lost or didnt complete. Controller and the systems must exchange a heartbeat. If a heartbeat is more than a few seconds gone the communication should be marked as failed.
Every System is specialised to work a different Task or different group of tasks. The controller should make a kind of balancing of the work between the worker nodes. The controller should also be able to show at any point the state of the tasks in a table.

Example
One App (App_A) gets two float variables (a and b) . The app has following functions:
Add = a + b, Sub = a – b, Mul = a * b, Div = a / b
Another App (App_B)gets three float variables (a, b and c) . The app has following functions:
Add = a + b + c, Sub = a – b - c, Mul = a * b * c, Div = a / b / c

These app will get started to test in each three different instances. The Controller knows also App_A_1 App_A_2 and App_A_3 as well as Application App_B_1, App_B_2 und App_B_3.
If one would send per Postman this json
{App_A: {a=1,b=9, add=True, Sub= True, Mul = True, Div = False},
App_A: {a=2,b=8, add=True, Sub= True, Mul = False, Div =True},
App_A: {a=3,b=7, add=True, Sub= False, Mul = True, Div = True },
App_A: {a=4,b=6, add= False, Sub= True, Mul = True, Div = False},
App_A: {a=5,b=5, add=True, Sub= True, Mul = False, Div = False },
App_A: {a=6,b=4, add=True, Sub= False, Mul = False, Div = False},
App_A: {a=7,b=3, add= False, Sub= False, Mul = True, Div = False},
App_A: {a=8,b=2, add= False, Sub= True, Mul = False, Div = False},
App_A: {a=9,b=1, add= False, Sub= True, Mul = True, Div = False },

App_B: {a=1,b=9,c=4 , add=True, Sub= True, Mul = True, Div = False},
App_B: {a=2,b=8,c=5, add=True, Sub= True, Mul = False, Div =True},
App_B: {a=3,b=7,c=6, add=True, Sub= False, Mul = True, Div = True },
App_B: {a=4,b=6,c=7, add= False, Sub= True, Mul = True, Div = False},
App_B: {a=5,b=5,c=8, add=True, Sub= True, Mul = False, Div = False },
App_B: {a=6,b=4,c=9, add=True, Sub= False, Mul = False, Div = False},
App_B: {a=7,b=3,c=1, add= False, Sub= False, Mul = True, Div = False},
App_B: {a=8,b=2,c=2, add= False, Sub= True, Mul = False, Div = False},
App_B: {a=9,b=1,c=3, add= False, Sub= True, Mul = True, Div = False }}

The controller should build this matrix:
Look the file for the matrix.
The controller should update the table in a regular basis.
Related categories: Python Software Architecture Micropython