by Dave Raggett

Advances in electronics and communication technologies are stimulating the growth of low cost connected sensors and actuators. There are many potential application areas, for instance: home automation, security, healthcare, smart grids, integrated transport systems, and next generation manufacturing. To date, research in the area of the Internet of Things (IoT) has largely focused on the sensors, actuators and the communication technologies needed for long battery life and efficient use of spectrum etc. rather than on what’s needed to encourage applications and services. Current IoT products exist in isolated silos. To fully realise the benefits, we will need scalable solutions for managing the vast of amounts of data, and open standards that enable open markets of connected services.

The COMPOSE project is developing a open source cloud-based platform for IoT services. The run-time is highly scalable and implemented on top of CloudFoundry and Couchbase. This is complemented by the developer portal which supports discovery, registration, composition and deployment of services.

COMPOSE models services in terms of message streams, where each message corresponds to either a sensor reading or an actuator update, and is structured as one or more data channels. Sensors and actuators are virtualised in the COMPOSE platform as ‘service objects’. These define the message streams obtained from the sensors, or passed to the actuators associated with a given service object.

Services can define composite streams in terms of dynamic queries over other streams, for example, all temperature sensors within 1.5 Km of a given location. Services can also define new streams as a transformation from another message stream, for example, to transform the physical units for the data samples, or to smooth data samples. These mappings can be defined as simple expressions or more generally with scripts written in the JavaScript programming language and executed using the Chrome V8 engine.

Figure 1: The COMPOSE platform.

Figure 1: The COMPOSE platform.

COMPOSE services are cloud-based. Each service object is associated with a ‘web object’ at the network edge. The web object provides an abstraction of the physical sensor or actuator, hiding the details of how these devices are connected. Web objects communicate with the COMPOSE platform using structured data represented with the JavaScript object notation (JSON). There is a choice between using HTTP or WebSockets. The latter is appropriate when the web object is behind a firewall that prevents the COMPOSE platform from opening HTTP connections with the web object. Here is an example illustrating how to push data to a service object:

PUT http://testbed.compose-project.eu/thngs/<ServiceObjectID>/streams/<Strea...
{
"lastUpdate": 194896802,
"channels": [
{
"unit": "degrees",
"type": "numeric",
"name": "longitude",
"current-value": 24.428239
},
{
"unit": "degrees",
"type": "numeric",
"name": "latitude",
"current-value": 1.3428239
}
],
"customFields": {}
}

Careful attention has been paid to security. COMPOSE uses encrypted sessions for protecting data exchanges. Data owners can set access control polices that limit who can access their data. Static analysis of service stream mappings is used to determine the provenance of derived data streams in order to comply with the access control polices for the originating data owners. To make this static analysis practical, constraints are placed on the use of JavaScript language features. The analysis yields ’contracts’ that are designed for use by the COMPOSE run-time system.

COMPOSE applications are able to access message streams via a RESTful interface over HTTP or WebSockets. This gives developers a choice of implementation technologies, e.g. HTML5 for the Open Web Platform, or as native applications on iOS or Android. OAuth2 provides the basis for application users to grant access to their data on the COMPOSE platform.

The COMPOSE developer portal supports a graphical authoring tool based upon an extended version of Node-RED The portal enables developers to search for services and streams matching the query provided by the developer. Developers can also solicit recommendations based upon rankings provided by other developers.

The COMPOSE project is conducting a number of pilots to evaluate the utility of the framework in real world settings. The smart retail pilot features sensors within a supermarket that track the location of shopping trolleys as customers move about the store, and which can later be combined with information on purchases. This data can be used to assist product positioning on supermarket shelves. The smart city pilot focuses on tracking free parking spaces at the Rovira i Virgili University in Catalonia. The smart territory pilot focuses on supporting skiers in the Trentino region of Italy. It combines sensor data with crowd sourced information covering the length of lift queues, the quality of ski centre facilities, and points of interest. Users can see their friends’ locations and exchange notifications with friends, which facilitates social interaction.

Links:
http://www.compose-project.eu/
http://www.cloudfoundry.com/
http://www.couchbase.com
Chrome V8: https://developers.google.com/v8/intro
JSON: http://json.org/
WebSockets protocol: https://tools.ietf.org/html/rfc6455
OAuth2: http://oauth.net/2/
Node-RED: http://nodered.org/

Please contact:
Dave Ragett, W3C
E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.

Next issue: January 2019
Special theme:
Transparency in Algorithmic Decision Making
Call for the next issue


Image ERCIM News 101 epub
This issue in ePub format

Get the latest issue to your desktop
RSS Feed