What Is ScaleOut’s Digital Twin Model?
Object-Oriented Design Approach
Digital twin models can take many forms. The goal of ScaleOut Digital Twins is to allow application developers to easily construct a digital twin of a large live system with thousands or even millions of components for real-time analytics or simulation. Examples of live systems include IoT, vehicle fleets, rail networks, power grids, ports, logistics networks, security systems, data center and telecommunication infrastructures, manufacturing, disaster response scenarios, military deployments, and many more. All of these examples have large numbers of devices or other data sources that generate telemetry streams that need to be analyzed in real time or modeled in simulation.
To simplify the design of digital twins for these scenarios and to enable transparent scaling of real time analytics or simulation, ScaleOut Digital Twins uses a simple, object-oriented software design. This approach lets developers easily construct a digital twin using software objects that represent individual devices or data sources within the physical system. It also enables ScaleOut Digital Twins to host these objects in memory for fast access to state data and to use scalable compouting techniques to handle large numbers of incoming telemetry streams.
For example, the following diagram illustrates the use of ScaleOut Digital Twins to perform real-time analytics for a data center. It shows digital twin objects hosted in ScaleOut’s scalable, in-memory computing platform. These objects receive telemetry from corresponding devices in the data center and perform continuous analytics.

ScaleOut’s software APIs enable developers to create digital twin object models which embody application-specific algorithms and state information. These models describe either real-time analytics or simulation behaviors for entities of interest. A digital twin of a live system typically uses multiple digital twin object models (often just called digital twin models), one for each type of device or data source. Once deployed to the ScaleOut Digital Twins™ in-memory computing platform, they provide the blueprint for creating digital twin objects (also called instances) that track the state of specific entities within a live or simulated system. These objects together comprise the “digital twin” of a physical system.
Applications typically define multiple models to represent different types of entities within the digital twin. For example, a digital twin of a data center might define separate models for routers, switches, and servers. These models provide the templates for creating digital twin objects for all of the actual devices within the data center. When performing real-time analytics, each object receives telemetry from its corresponding real-world device and maintains state information about the device.
Using a scalable and highly available in-memory computing platform, ScaleOut Digital Twins creates digital twin objects in memory and distributes them across a cluster of servers for processing. It can connect to messaging hubs like Azure IoT Hub and automatically deliver incoming messages from live devices to their corresponding digital twins. It can also run a time-drive simulation and schedule digital twin objects for processing at time steps. Lastly, ScaleOut Digital Twins offers built-in facilities for agrregating, visualizing, and querying the state information held within its digital twin objects.
ScaleOut’s digital twin model follows object-oriented design principles to make it as simple for developers as possible. Developers can implement digital twin models in Java, C#, or by using a rules engine. Both C# and rules engine models can optionally incorporate a machine-learning algorithm.
Components of a Digital Twin Model
Let’s take a closer look at a digital twin model. A digital twin model defines the properties of a state object and defines one or two application-defined methods (more on that below). Each state object hosts dynamic information about a corresponding device or data source. Here are the two types of digital twin models:

When creating a digital twin model, called a real-time digital twin model, for live streaming analytics, an application-defined method called ProcessMessages runs when the digital twin object for a specific data source receives a telemetry message from that data source. This method analyzes incoming messages using state information to assist in identifying conditions of interest about the device or data source. The method can emit alerts when necessary and send messages back to the physical data source or to other digital twin objects. ScaleOuts’s in-memory computing platform runs a digital twin’s method within 1-3 milliseconds after it is received by the message hub.
When creating a digital twin model for use in a time-driven simulation (called a simulation model),the developer implements two methods, both of which have access to the digital twin object’s state information. As with a real-time digital twin model, the ProcessMessages method handles incoming messages. These messages are sent by other other digital twin objects in the simulation. In addition, a second ProcessModel method runs application-defined code that defines the digital twin object’s simulation behavior at a given time step. ScaleOut Digital Twins runs this method for all digital twin objects in simulated time, and it advances the time as determined by simulated delays specified in the method.
The following diagram illustrates how ScaleOut Digital Twins runs digital twins in simulation:

Using the ScaleOut Digital Twins UI, you can control the minimum granularity of simulated time increments and the target speedup of simulation execution relative to real time. This lets you run the simulation slowly for demonstration purposes or as fast as possible to make predictions.
Timers
Both simulation and real-time digital twins can create per-instance timers, which are application-defined methods that run after a specified delay. Especially when implementing real-time digital twins, timers are useful to trigger application code that detects an unexpected delay in the arrival of a message, for example, due to a failed device. Timers can create alerts when a digital twin object’s corresponding data source may not be operating correctly.
Combining Real-Time and Simulation Digital Twin Models
Real-time and simulation digital twin models can be combined within a single simulation, in which case the real-time digital twin objects run in simulated time. This scenario is usel for building real-time analytics implemented with real-time digital twin objects and then testing them in simulation prior to deployment in a live system. Here is an example of a simulation digital twin object for a pump sending messages to its corresponding real-time digital twin object, which is performing real-time analytics and generating state information that is consumed by aggregate analytics:
