#Python bindings for Distributed Control System Library
aktos_dcs is designed for creating fault tolerant, realtime, massively concurrent, distributed (even behind firewalls), io-bound (eg. heavy-traffic web server), scalable (both vertically and horizontally), cross-platform and language agnostic applications.
This library is developed for distributed automation projects in mind. Any PLC or motion controller related work (including HMI and SCADA) can be performed easily. Simulation of a real component of the target system becomes a trivial work to do. Graphical User Interface can be built by using desktop and mobile frameworks (Qt, GTK, ...) or by web technologies (HTML5, Javascript, CSS, ...).
Message transport layer is built on top of ZeroMQ library, which has Python, Java, Node.js, C, C++ , C# and many other bindings. This means, any number of these languages can be used together to build a single project. Developers can work with their favourite language.
Gevent based actor model (inspired from Erlang) is used for concurrency. This means, concurrency comes for free. Since there are no real threads or subprocesses, debugging is easy. N-to-N connections are managed out of the box, so there is no single point of failure exists.
Actors can be run concurrently
- in the same process
- in the same machine (can take advantage of multiple CPU cores)
- distributed in Local Area Network
- distributed across networks and connected via proxies/tunnels (eg. ssh tunnel)
This is pinger.py
from aktos_dcs import *
class Pinger(Actor):
def action(self):
self.send_PongMessage(text="Hello ponger, this is STARTUP MESSAGE!")
def handle_PingMessage(self, msg):
print "Pinger got ping message: ", msg['text']
sleep(2)
self.send_PongMessage(text="Hello ponger, this is pinger1!")
ProxyActor()
Pinger()
wait_all()
This is ponger.py
from aktos_dcs import *
class Ponger(Actor):
def action(self):
self.send_PingMessage(text="Hello pinger, this is STARTUP MESSAGE!")
def handle_PongMessage(self, msg):
print "Ponger got pong message:", msg['text']
sleep(2)
self.send_PingMessage(text="Hello pinger, this is ponger 1!")
ProxyActor(brokers="192.168.2.161:5012:5013")
Ponger()
wait_all()
These two programs can interact with eachother even they are in the same file (like pinger_ponger.py
, or they are separate processes running in the same machine (where they are taking advantage of multiple CPU cores) or they are on separate machines on the LAN (where pinger.py
runs on a machine "192.168.2.161").
Should work on any platform, tested on:
- Windows (XP, 7, 8.1)
- Linux (Debian, Ubuntu, Raspbian)
- Os X (El capitan tested)
- Test README can be considered as a short tutorial.
- Examples can be found in examples directory
- aktos-scada as the SCADA and HMI infrastructure: https://github.com/aktos-io/aktos-scada
- Qt desktop application: https://github.com/ceremcem/weighing-machine-testing
- C#: https://github.com/aktos-io/aktos-dcs-cs
- Node.js (in LiveScript): https://github.com/aktos-io/aktos-scada/tree/master/app/modules/aktos-dcs
- Java: https://github.com/Canburakt/aktos-dcs-java
- https://github.com/aktos-io/aktos-dcs-tools : for easy remote development
- https://github.com/aktos-io/link-with-server : for easy proxy connection of iot devices
See Install README
Run update-aktos-dcs
in terminal whenever you need.
See: Developer Guide
- Crossbar.io: https://github.com/crossbario
BSD License.
A.K.T.O.S. Electronics, the Open Source Telemetry and Automation Systems company, Turkey