Developing applications

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

This section introduces the basic concepts around applications in Cumulocity.

Overview

Cumulocity applications can have two forms:

Web applications are HTML5 single page applications, that appear in the Cumulocity app switcher and that are hosted on Cumulocity.

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

Applications regardless of form are identified by a so-called application key. The application key enables Cumulocity 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 applications deployed by them. This provides a basic application marketplace.

Cumulocity web applications

Overview

A Cumulocity web application can be a

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

App switcher

The Cumulocity user interface 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 user interfaces. For more information on developing plugins, refer to the Web SDK for Plugins in the Web Developer’s guide.

Deploying web applications

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

For details on how to deploy an application to Cumulocity, 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 by using the application manager under “Own applications” in the Cumulocity Administration application.

List of own applications

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

Cumulocity microservices

Overview

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

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

When developing a Cumulocity 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. This way developers can focus on business logic and leave scaling, security, high availability and monitoring to Cumulocity. Microservices can be built on the top of the API exposed by the Cumulocity platform. This way, Cumulocity microservices are a comfortable means to provide new functionality and extend existing one.

microservice_infrastructure

For detailed information on developing and deploying microservices on top of Cumulocity refer to the Microservice SDK guide which provides information on the general concept of microservices in Cumulocity 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 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 Rest API can be used to get specific tenant information. Those applications will be listed under the “applications” fragment.