macchina.io has been built in a very modular and extensible way. Figure 1 shows the system architecture of macchina.io, which is also reflected in the source code layout.
The POCO C++ Libraries are modern, powerful open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server, mobile and embedded systems. They provide essential features such as platform abstraction, multithreading, XML and JSON processing, filesystem access, logging, stream, datagram and multicast sockets, HTTP server and client, SSL/TLS, etc. Virtually everything implemented in macchina.io (except some integrated third-party open source projects) is based on the POCO C++ Libraries.
The Open Service Platform (OSP) enables the creation, deployment and management of dynamically extensible, modular applications, based on a powerful plug-in and services model. Applications built with OSP can be extended, upgraded and managed even when deployed in the field.
The Open Service Platform has been developed by Applied Informatics. It was first released under a commercial license. For macchina.io, the core of OSP has been released under an open source license. The full version of OSP (including features such as a command shell framework, improved user authentication and authorization including LDAP support, cryptographically signed bundles, etc.) is available from Applied Informatics under a commercial license.
Remoting is a distributed objects and web services framework for C++. With Remoting, building distributed applications, implementing high-level object-based inter-process communication (IPC)/remote method invocation (RMI) or web services based on the Simple Object Access Protocol (SOAP) and the Web Service Definition Language (WSDL) becomes a breeze. Making C++ objects available remotely over the network or turning them into a web service is as easy as adding a few annotations to a header file. The Remoting code generator does the rest. There is no need to maintain a separate interface definition, using an awkward interface definition language.
Remoting has been developed by Applied Informatics. Like OSP, it was first released under a commercial license. For macchina.io, the core of Remoting (core library, code generator and TCP transport) has been released under an open source license. The full version of Remoting (including support for SOAP and WSDL, as well as JSON-RPC) is available from Applied Informatics under a commercial license.
The IoT Components are the "heart" of macchina.io. Various OSP bundles and services implement features such as interfaces to devices and sensors, network protocols such as MQTT or COAP, interfaces to cloud services (e.g., for sending SMS or Twitter messages), and the web-based user interface of macchina.io.
macchina.io defines generic interfaces for various kinds of sensors and devices. Based on these interfaces, different implementations are available that make specific sensors and devices available in macchina.io. There are interfaces and implementations for generic sensor types such as temperature or humidity sensors, GNSS/GPS receivers, accelerometers, triggers, GPIO ports, serial port devices, etc.
macchina.io implements various protocols for talking to sensor networks, automation systems, or cloud services. One such protocol is MQTT, a publish-subscribe based "light weight" messaging protocol for use on top of the TCP/IP protocol, which is popular for building cloud-connected IoT applications. In macchina.io, MQTT is implemented using the Eclipse Paho C library.
Note: In the first release of macchina.io, only MQTT is implemented. Future versions will implement additional protocols, such as COAP or Modbus.