Skip to content
nicolasferry edited this page Feb 17, 2015 · 7 revisions

Overall Architecture

SensApp is a platform for sensor and sensor data handling developed by the SensApp partner SINTEF. It is an open-source, service based application for sensor registration, data collection, storage and visualization of sensor data.

SensApp provides four elementary services to support the definition of IoT applications. The registry stores information (e.g., description, creation date) about the sensors that are involved in the application. The database service implements a storage facility for sensor data, providing dedicated queries to expose the collected data to the data miner. The notification service is used by third party application to subscribe for notification when relevant data are pushed. Finally, the dispatcher received the data from the sensors, stores the data in the relevant database according to the information stored in the registry, and finally triggers the notification mechanisms with the newly arrived data.

The services are implemented as REST services exposed on top of the HTTP protocol which makes them easy to deploy on a cloud infrastructure. Sensor data are represented with the SenML standard, used as an intermediary representation of sensor data in the platform. SensApp also provides a web-based administration interface built on top of the offered REST interface. This interface supports the manipulation of sensors, and provides graphical widgets to visualize data collected in SensApp.

These are further described here:

  • The Registry Service stores information of each sensor. This information contains an ID, a description and a schema for the data storage, for example the data type of the stored values. Additional information, like a location or an update frequency can be stored using user defined key-value pairs.
  • The Database Service is used to store collected sensor data in a database, (currently MongoDB is being used). Queries to transfer stored data to the data miner are provided.
  • The Notification Service can send notifications if new or relevant data is available. This can be used, for example, by third party visualization software to show updated graphs and statistics to the user.
  • The Dispatcher Service receives data from the sensors and according to its registry entry, the data is stored in the database and a notification is triggered, if a related notification topic is registered.

Technically, the SensApp server is written in Scala and uses Spray . SensApp requires a servlet container (Jetty) and a NoSQL database (MongoDB ). By default, the SensApp server is deployed on one machine.

On one hand, the data exchanged between the various SensApp services themselves and between these services and the devices are represented in SenML standard using JSON syntax. The choice for this syntax has been made to minimise the amount (size in term of byte) of data to be exchanged between the services and the devices.

Sensor Markup Language (SenML) was designed by the IETF so that processors with very limited capabilities could easily encode a sensor measurement into the media type, while at the same time a server parsing the data could relatively efficiently collect a large number of sensor measurements.

User Guide

Registering sensors:

In order to register a sensor, users need to send a HTTP POST request with a JSON body as follows:

    {
      "id": "Bike1/gps_alt", "descr": "GPS altitude of the bike",
      "schema": { "backend": "raw", "template": "Numerical" }
    }

Existing templates are:

  • Numerical
  • Boolean
  • String
  • Summed
Clone this wiki locally