This conceptual guide explains how Actyx works with a simple example process: A workpiece is processed by a machine, and then packaged by a robot:
Traditionally, you would write two apps, one dealing with each asset. These apps would then be connected to each other with a database or broker:
With the Actyx Platform, you program the process as autonomous local twins that publish and consume events, and develop states based on these events:
Local twins are implemented in the Typescript programming language using APIs provided by the Actyx Pond library. We call these twins: fishes. The logic of a fish is defined by three things:
- The fish state, frequently implemented as a tagged union (ref. enum with data).
- The events that may influence this state, including those created by other fish.
- An event reducer that updates the fish's state when a new event is received.
After you have programmed the local twins, you create local computing environments using edge devices. The local computing environment provides the infrastructure necessary for running local twins. It is a hardware/software combination.
The hardware can be any mobile device, PLC, or PC running Linux, Android, Windows or Docker:
- Tablets: Panasonic, Zebra, Samsung
- PLCs: Phoenix, Beckhoff, Weidmüller
- PCs: any
The software is ActyxOS. It runs on each device and acts as a decentralized infrastructure which provides data dissemination, data persistence, and runtimes.
In this example, you could deploy ActyxOS to a small industrial PC that is connected to the machine (or directly to the machine's PLC) and deploy ActyxOS to a small industrial PC that you connect to the robot.
Twins are packaged into apps that are deployed to the edge devices. Apps are the unit of deployment and contain twins as well as code that interacts with them:
- User interfaces for human interaction
- Machine integrations (e.g. OPC UA, I/Os)
- Software integrations (e.g. ERP, Cloud)
After you have deployed the apps to the edge devices running ActyxOS, Twins interact and cooperate locally:
Due to the local interaction of the twins, there is no dependency between environments.
When edge devices are connected, ActyxOS automatically synchronizes the twins in real-time:
The twins' history is consistent and forever accessible:
To extend or scale the process, you simply add new local twins: