Part of the proposed interfaces were implemented between 2020 and 2024 while building an integration with Kubernetes. This project extends their usage to demonstrate a more general approach to managing and integrating them into a software system.
The application demonstrates a protocol that allows background operations to be managed and custom-frequency message loops to be configured. The Web.Common.dll assembly provides two controllers, each of which works with a single service assigned to it.
In this demo, both services from the Common.dll are registered in a singleton scope. The demo contains a custom topology that is generated from Node.exe by varying environmental variables within a PowerShell 7.0 script. The executables run on different ports and, the protocol binds them together.
The purpose of demo is to show a convenient and minimal web interface for retrieving a complex structure from background jobs across multiple multithreaded services.
To start the demo, execute the following script from the project's root folder.
.\StartAll.ps1Fig. 1 - Hierarchy of modules.
Fig. 2 -
JSON Graph
{
"status": 5,
"exception": null,
"data": {
"data": "Operation completed on localhost:5000",
"childResults": [
{
"status": 5,
"exception": null,
"data": {
"data": "Operation completed on localhost:5001",
"childResults": [
{
"status": 5,
"exception": null,
"data": {
"data": "Operation completed on localhost:5002",
"childResults": [
{
"status": 5,
"exception": null,
"data": {
"data": "Operation completed on localhost:5003",
"childResults": []
}
}
]
}
},
{
"status": 5,
"exception": null,
"data": {
"data": "Operation completed on localhost:5003",
"childResults": []
}
}
]
}
},
{
"status": 5,
"exception": null,
"data": {
"data": "Operation completed on localhost:5002",
"childResults": [
{
"status": 5,
"exception": null,
"data": {
"data": "Operation completed on localhost:5003",
"childResults": []
}
}
]
}
},
{
"status": 5,
"exception": null,
"data": {
"data": "Operation completed on localhost:5003",
"childResults": []
}
}
]
}
}Fig. 3 - Example of the output produced by a background operation created inside the onNode action. The status field shows the TaskStatus.RanToCompletion value, and the data field contains the actual graph shown in Fig. 2.
Output generated by calling the BuildDataTree extension
{
"status": 5,
"exception": null,
"data": "Operation completed on localhost:5000-->Operation completed on localhost:5001-->Operation completed on localhost:5002-->Operation completed on localhost:5003\r\n"
"Operation completed on localhost:5000-->Operation completed on localhost:5001-->Operation completed on localhost:5003\r\n"
"Operation completed on localhost:5000-->Operation completed on localhost:5002-->Operation completed on localhost:5003\r\n"
"Operation completed on localhost:5000-->Operation completed on localhost:5003\r\n"
}Fig. 4 - Example of the output produced by returning the result from the onNode action, using the BuildDataTree extension. The output has been formatted to improve readability.

