Modern distributed systems and networks (e.g., smart and connected health, smart grid, sensor networks, etc.) should perform real-time learning, decision-making, and control. Often the properties (other names: variables, fields) and actions (other names: methods, functions) of each system or network component cannot be clearly defined in advance. In addition, the network topology among these components may dynamically change over time. Therefore, hard-coding the properties, actions, and neighbors of every network component becomes cumbersome in the presence of such uncertainty as they need to be added, updated, or removed under dynamically-changing circumstances. For example, a patient model with “body temperature” property may need to add “blood glucose level” property when the continuous glucose monitoring (CGM) data become available from a wearable CGM device. Since a human body can have virtually an unlimited number of properties, it is not possible or even necessary to hard-code them in advance. For the same reason, actions can be decoupled and outsourced without being hard-coded. In this case, each network component consumes external action services which provide 1) knowledge via relational/logical operations (e.g., hyperglycemia is diagnosed when the blood glucose level is greater than 200 mg/dL) for high-level decision making and 2) engineering algorithms such as adaptive system identification and model predictive control for physical model-based tasks (e.g., controlling blood glucose levels so that they become below 200 mg/dL). Two example action services (PID control as a Service and LMS adaptive parameter estimation as a Service) can be found at https://github.com/yshin1209/EaaS.
Since actions are not tightly coupled to individual components, they can readily be adapted to changes and/or updates in knowledge and engineering algorithms. Although a microservice framework enables independent scalability and flexibility compared to traditional monolithic approaches, the properties and actions of each microservice are still tightly coupled within each microservice. In this context, we propose “nanoservices” as a new computing paradigm for distributed and adaptive complex systems. Our lab is currently developing cloud-enabled RESTful APIs that researchers can use to readily develop customized distributed and adaptive networks by creating objects (actors) and adding or removing the properties, actions, and neighbors in real-time and without downtime (a powerful feature enabled by a microservice orchestration platform such as Azure Service Fabric). While collective decision making can be done through this cloud-enabled network, the knowledge, model, and algorithm learned in the collective process can be deployed to each network component using the Internet of Things/Web of Things/Edge Computing in an event-driven fashion to achieve better speed, reliability, and security. We use Azure Service Fabric, Service Fabric Actor Model, Azure IoT Hub, Azure IoT Edge, and Azure Event Grid which provide an integrated development environment to increase productivity, interoperability, and security. Since nanoservices are very fine-grained, their overhead (communications, maintenance, etc.) can be expensive and we are also exploring the trade-offs between the utility and cost of the proposed approach.