Developing applications

Cumulocity IoT is designed to accommodate arbitrary vertical IoT applications in addition to its generic functionality.

This section introduces the basic concepts around applications in Cumulocity IoT.

Overview

Cumulocity applications can have two forms:

Web applications are HTML5 single page applications, that appear in the Cumulocity IoT application switcher and that are hosted in the Cumulocity IoT platform.

Microservices are Docker containers, hosted by Cumulocity IoT and exposing a REST API.

Applications regardless of their form are identified by a so-called application key. The application key enables Cumulocity IoT to associate a REST request from an application with the particular application. See the section on Application management in the Reference guide.

Super tenants (Management Tenants or Enterprise Tenants) can subscribe subtenants to Cumulocity IoT applications deployed by them. This provides a basic application marketplace.

Web applications

Overview

A Cumulocity IoT web application can be a

All subscribed web applications of a tenant appear in the application switcher on the top right of the Cumulocity IoT UI, so that users can navigate between the applications. They are hosted by Cumulocity IoT and the application will be made available through a URL <tenant>.cumulocity.com/apps/<application>.

App switcher

The Cumulocity IoT UI itself is built around a framework based on AngularJS and Bootstrap, the modern HTML5 web application frameworks. It is designed in a modular fashion around a set of plugins so that developers can create their own configurations of the Cumulocity IoT user interfaces. For more information on developing plugins, refer to Web SDK for plugins.

Deploying web applications

For an application to be available it has to be deployed on the Cumulocity IoT platform.

For details on how to deploy an application to Cumulocity IoT, refer to Administration > Managing applications in the User guide.

Info: In case of a web application, the application is active for you as owner without subscribing to it.

Web application hosting

You can host your own HTML5 and JavaScript web applications through Cumulocity IoT by using the application manager under Own applications in the Cumulocity IoT Administration application.

List of own applications

For details refer to Administration > Managing applications in the User guide.

Cumulocity IoT microservices

Microservices are server-side applications. Microservices can be used to develop for example the following functionality on top of Cumulocity IoT:

Microservices are deployed as Docker images to Cumulocity IoT, and follow specific conventions. They typically provide one REST API, which is available under /service/<microservice-name>. They typically access Cumulocity IoT using the documented REST API.

When developing a Cumulocity IoT microservice, a developer is not restricted to any programming language. However, a microservice must serve as a HTTP server working on port 80 and must be encapsulated in a Docker image.

The hosting of the microservice is provided by Cumulocity IoT. This way developers can focus on business logic and leave scaling, security, high availability and monitoring to Cumulocity IoT. Microservices can be built on top of the API exposed by the Cumulocity IoT platform. This way, Cumulocity IoT microservices are a comfortable means to provide new functionality and extend existing ones.

microservice_infrastructure

For detailed information on developing and deploying microservices on top of Cumulocity IoT refer to the Microservice SDK guide which provides information on the general concept of microservices in Cumulocity IoT as well as specific guidance and examples for various programming languages.

Info: For Microservice developers Cumulocity provides Microservice SDK in Java programming language and C# programming language for .Net Core. Refer to the relevant sections in the Microservice SDK guide.

Subscribing applications

The application concept of Cumulocity IoT includes a basic application marketplace.

Tenants can be subscribed to applications which have been deployed by their super tenant (Management Tenant or Enterprise Tenant).

Granting access to subtenants and subscribing to applications is done in the Administration application.

Application Subscription

Tenants can also have their own application marketplace, which can be viewed in the Own Applications page in the Administration application.

Own applications

Owned applications and granted applications can also be subscribed to the subtenants by the tenant.

For details refer to Managing tenants in the User guide.

Service Discovery

A tenant can have multiple available applications but to use an application’s functionality a subscription to the application must be established for the tenant. As an example, when a custom decoder microservice is available in the tenant’s marketplace, it is not enabled to be used until the tenant subscribes for the microservice application.

To see the list of subscribed applications for the tenant, Cumulocity IoT Rest API can be used to get specific tenant information. Those applications will be listed under the “applications” fragment.