The Coaty framework enables realization of collaborative IoT applications and scenarios in a distributed, decentralized fashion. A Coaty application consists of Coaty agents that act independently and communicate with each other to achieve common goals. Coaty agents can run on IoT devices, mobile devices, in microservices, cloud or backend services.
The Coaty framework provides a production-ready application and communication layer foundation for building collaborative IoT applications in an easy-to-use yet powerful and efficient way. The key properties of the framework include:
- a lightweight and modular object-oriented software architecture favoring a resource-oriented and declarative programming style,
- standardized event based communication patterns on top of an open publish-subscribe messaging protocol (currently MQTT),
- a platform-agnostic, extensible object model to discover, distribute, share, query, and persist hierarchically typed data, and
- rule based, context driven routing of IoT (sensor) data using smart backpressure strategies.
Coaty JS comes with complete source code documentation, a Developer Guide, a Coding Style Guide, and best-practice examples.
Learn how to use
- a Developer Guide that provides the basics to get started developing an agent project with the Coaty JS framework,
- a complete code documentation of all public type and member definitions of the Coaty JS framework sources,
- a Coding Style Guide for Coaty JS framework and application developers,
- a specification of the Coaty communication protocol,
- guidance notes on rights management in a Coaty application.
- a guide on the OGC SensorThings API integration in Coaty JS.
Coaty JS also includes a set of fully documented code examples that demonstrate best practices and typical usage patterns.
Finally, the unit tests delivered with the framework itself also provide a valuable source of programming examples for experienced developers.
Note that the framework makes heavy use of the Reactive Programming paradigm using RxJS observables. Understanding observables is an indispensable prerequisite for developing applications with the framework. An introduction to Reactive Programming can be found here. Examples and explanations can be found on the RxJS and Learn RxJS websites.
If you are new to TypeScript programming, we recommend to take a look at the official TypeScript website. Its "Playground" is especially useful to interactively try some TypeScript code in your browser.
To program Coaty applications, we recommend to use Visual Studio Code, a free, open source IDE that runs everywhere. Install the VS Code extension "TSLint" to enable TypeScript linting within the IDE.
To build and run Coaty agents with the Coaty JS technology stack
you need to install the
your target machine. Download and installation details can be found here.
The framework uses the package dependency manager
npm to download dependent libraries.
npm comes with
Node.js so you need to install it first.
Installing the framework
Coaty JS includes a standard distribution package
that targets Coaty agents using ECMAScript version
commonjs. It can be used to develop Node.js services
and browser or Cordova apps bundled with Webpack, Browserify, or any
other commonjs-compatible bundler. This package should be used to
develop web and mobile apps using e.g. Angular or Ionic.
You can install the latest standard distribution package in your agent project as follows:
npm install coaty --save
Note: The distribution package defines several optional dependency modules, including
sqlite3. You need to install any such
optional dependency as a package dependency in your application project if you intend to make
use of the associated functionality. For example, if you want to make use of the framework's
Unified Storage API by persisting objects in a PostgreSQL database, you have to install
As need arises, more non-standard distribution packages will be made available, e.g. to target ECMAScript versions ES6 or later. If you need such a package, please contact one of the project maintainers.
If you like Coaty, please consider ★ starring the project on github. Contributions to the Coaty framework are welcome and appreciated. Please follow the recommended practice described in CONTRIBUTING.md. This document also contains detailed information on how to build, test, and release the framework.
Code and documentation copyright 2018 Siemens AG.
Code is licensed under the MIT License.
Documentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Last but certainly not least, a big Thank You! to the following folks that helped to implement Coaty and make it even better:
- Markus Sauer (@markussauer)
- Alihan Livdumlu (@adragonite)
- Atakan Dulker (@phynics)
- Antoine Beyet