December 12, 2023
Michael Grieves introduced the concept of digital twins in 2002 for use in manufacturing and product lifecycle management. Over the last two decades, their use has expanded to monitoring physical devices, such as industrial robots, for preventive maintenance and to tracking physical assets (for example, with Azure Digital Twins). More recently, ScaleOut Software has pioneered the use of digital twins to track thousands of entities, from IoT devices to ecommerce shoppers, and analyze trends in real time.
To help accelerate the development of applications using digital twins, ScaleOut Software is open-sourcing its object-oriented Java and C# APIs for implementing digital twins and a development workbench for testing applications. These APIs use the digital twin concept to simplify the design of applications for both real-time analytics and simulation. Both APIs and workbench are open-sourced under the Apache 2.0 license.
After testing using the workbench, developers can deploy digital twin applications to the ScaleOut Digital Twins™ in-memory platform to run at scale and host thousands of digital twins. The platform also provides advanced capabilities such as connections to messaging hubs, data aggregation and visualization, alerting, persistence, and performance scaling.
Widely accepted open-source APIs for constructing digital twins have not yet emerged. Likely because digital twin applications have focused on asset management, most APIs take the form of model definition languages such as those in Azure Digital Twins and UA Cloud Twin. While this approach enables the creation of complex, rich asset hierarchies (such as the components of an office building), it does not take full advantage of the power of digital twins to track live entities.
In its digital twin definition, Gartner recognized that digital twins align with object-oriented principles by encapsulating both the state and processes for a physical object. Adopting this view and integrating digital twins into object-oriented applications enable them to easily implement highly dynamic functions, such as real-time analytics of telemetry from physical entities and simulations. Instead of requiring complex model definitions, simple, object-oriented APIs let developers easily create digital twins within their applications.
The digital twin concept and object-oriented principles work together to simplify the construction of applications. Digital twins help motivate the object decomposition within an application, and the object model helps structure digital twins. For example, when tracking telemetry from vehicles in a fleet or simulating their behavior, software objects naturally represent digital twins of the vehicles. The application developer implements an object-oriented model of a vehicle, including its state properties and the code needed to analyze incoming telemetry or simulate behavior. Then the application dynamically creates instances of this model to serve as digital twins of actual vehicles:
ScaleOut’s open-source digital twin APIs define a simple, object-oriented model consisting of the state properties for an instance of a digital twin and two abstract methods:
Here is a depiction of the two types of digital twins in this object-oriented model:
The left-hand model enables the creation of applications for real-time monitoring of physical entities, like IoT devices, vehicles, and ecommerce shoppers. Each digital twin receives messages from a physical entity (called a data source) and analyzes them using its state information. For example, it can keep track of historical telemetry from a device to identify unusual trends. Using ProcessMessages(), the digital twin can send messages back to its data source for control or alerting. It can also send messages to other digital twins, such as a supervisor digital twin that is monitoring a collection of digital twins and issuing commands to its subordinates.
The right-hand model implements time-driven simulations using digital twins to implement entities, like airline passengers, planes, and airports in a simulation of an airline’s operations. In addition to maintaining state information, each digital twin uses the ProcessModel() method to receive time events from the simulation controller (implemented in the workbench or production platform). This method processes the digital twin’s simulation model at a given simulation time and exchanges messages with other digital twins. It also uses ProcessMessages() to receive and process messages from other digital twins in the simulation. (When used for simulation, digital twins are just a special case of actors that correspond to physical entities.)
Using this straightforward object-oriented technique, developers can easily construct applications using multiple digital models that enable the creation of numerous instances. For example, a traffic control simulation can comprise digital models of vehicles, roadway segments, intersections, and traffic signals. Instances of these models can interact by exchanging messages at time steps in the simulation. The state properties of the digital twins hold the simulation’s state, including performance metrics, such as queuing delays.
Note that these digital twin APIs enable the creation of memory-based digital twins (versus storage-based digital twins that systems with model definition languages usually use). This design choice allows for rapid creation and deletion of digital twin instances, sub-millisecond access to digital twin state, and seamless scaling on a clustered in-memory computing platform. It dramatically broadens the range of applications that can benefit from the digital twin model.
As all developers know, the process of testing and debugging a new application can be arduous and require repeated testing. The open-source workbench shortens the development cycle by enabling developers to test digital twin applications in a familiar development environment. It avoids the need to deploy applications to a production platform, like ScaleOut Digital Twins, during the development process.
The following diagram shows the components of ScaleOut’s development workbench. Users build digital twin applications using either Java or C# APIs. Using workbench APIs, they also write test programs to run individual digital twin models or simulations in their development environment and examine state information as necessary. Once they have completed testing, developers can then deploy digital twin applications to a production platform.
ScaleOut is open-sourcing its digital twin APIs and releasing an open-source development environment to fill an important gap in the digital twin community. The straightforward, object-oriented APIs let developers immediately start building digital twin applications for a wide variety of use cases. The APIs show how digital twins simplify the construction of applications in both real-time analytics and simulation. They enable memory-based digital twins to track and model large, dynamic systems, and they serve as the basis for building a variety of hosting platforms. We look forward to feedback from the open-source community.