Introduction

Fiware-Cepheus provides two components to an NGSI gateway : Cepheus-Broker a lightweight NGSI broker and Cepheus-CEP a Complex Event Processor.

These components will work together and with other NGSI compatible components (like the Orion broker or IoT Agents) to build full NGSI compliant IoT networks.

Architecture

Here is the general architecture of an NGSI Gateway:

overview

In this architecture, all components communicate using the NGSI Information Model, except for non-NGSI devices which are proxied by the IoT Agent.

NGSI v1 API

This manual suppose you already have a good knowledge of the FIWARE NGSI v1 API. We strongly recommend you start by reading the FIWARE NGSI APIv1 Walkthough from the Fiware-Orion project.

Note: the Cepheus-Broker and Cepheus-CEP components support NGSI v1 API with both JSON and XML formats.

Glossary

Fiware terms

  • Gateway / Edge: intermediary NGSI component, optional executing fiware-cepheus components (typically a RaspberryPi deployed near the sensors).
  • Sensors / Devices : NGSI capable devices that can transmit some data as Context Entities to other NGSI enabled components.

NGSI terms

These terms are here described using more common software engineering terms.

  • Context Information model : the global name of the NGSI data model
  • Context Providers / Context Producers : source of Context Elements updates
  • Context Managers / Broker : service that can host / forward Context Entities
  • Context Entity / Element : a class (e.g. a person, place, event, thing) defining a group of attributes
  • Context Attributes : attributes associated to a Context Entity
  • Metadata : some metadata associated to each attributes of a Context Element
  • Entity Id: the unique id of a Context Entity
  • Entity Type : the type of a Context Entity

CEP terms

These terms are related to the CEP (complex event processor) and are described using the NGSI terminology.

  • Event : an update to the state of Context Entity
  • Event type : the set of attributes an event can update.
  • Stream : a flow of events of the same type.
  • Incoming events : a stream generated by Context Providers and that are addressed to the CEP engine (seen as a Context Manager)
  • Outgoing events : a stream generated by the CEP engine (seen as a Context Producer) in result of applying statements to incoming events and sent to a Context Broker.
  • Statements : a set of rules that are applied by the CEP engine to incoming events and that generates outgoing events.

IoT Agent terms

These terms are related to the use of IoT Agents.

  • Commands: special Context Attributes that trigger commands on devices. These Context Attributes must first be registered to the Context Broker by the IoT Agents with a registerContext request.
  • Lazy attributes: special Context Attributes that are queried by a Context Broker (query forwarded from a third party app) to an IoT Agent (pull mode). These Context Attributes must first be registered to the Context Broker by the IoT Agents with a registerContext request.
  • Active attributes: Context Attributes that IoT Agents will send regularly to a Context Broker (push mode).

A complete description of these special attributes is available on the IoT Agents project page.