Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

FIWARE/NGSI-LD_Experimental

Repository files navigation

NGSI-LD Experimental

License: MIT Docker badge NGSI-LD badge

This repository is now archived. Since this experiment, a number of full open-source NGSI-LD context brokers have since been created and they already support the updated 1.3.1 ETSI NGSI-LD API to various degrees:

  • The Orion-LD Context Broker Generic Enabler is a NGSI-LD Broker, which supports the NGSI-LD and the NGSIv2 APIs. Currently in alpha version, plan is to merge it with the main branch of Orion.
  • The Scorpio Broker Generic Enabler is an alternative NGSI-LD Broker which can also be used in federated environments
  • The Stellio Context Broker Generic Enabler is another alternative NGSI-LD Broker

More information can be found within the FIWARE Catalogue

The purpose of this project was to study different implementation options of NGSI-LD.

The first one was based on a wrapper (incarnated by a proxy) on top of the FIWARE Context Broker. Leveraging on FIWARE NGSI, NGSI-LD is a Group Specification developed by ETSI ISG CIM, intended to define an API to provide, consume and subscribe to context information in multiple scenarios and involving multiple stakeholders. It enables close to real-time access to information coming from many different sources (not only IoT).

The OMA NGSI-9/10 information model, the root basis of FIWARE NGSI, has been evolved by ETSI CIM to better support linked data (entity's relationships), property graphs and semantics (exploiting the capabilities offered by JSON-LD). The resulting specification has been named NGSI-LD. It is noteworthy that the NGSI-LD information model is a generalization of the OMA NGSI-9/10 information model. As a result, a good level of compatibility and a clear migration path between both information models was been maintained.

The wrapper implementation worked on top of the FIWARE Context Broker and basically adapted between NGSIv2 (JSON) representations and the NGSI-LD (JSON-LD) representations.

An example illustrating the usage of NGSI-LD can be found here.

If you are looking for an Orion-based native implementation of NGSI-LD please have a look at Orion-LD.

How to build

Prerequisites

  • Java 8
  • Scala runtime
  • SBT build tool
$ sbt compile
$ export NGSI_Endpoint=http://<Your_NGSI_Endpoint i.e. Orion's host:port>
$ sbt jetty:start

How to test

$ sbt test

How to run using Docker

$ docker run -e NGSI_Endpoint="http://<Your_NGSI_Endpoint i.e. Orion's host:port>" fiware/ngsi-ld_wrapper

$ curl http://localhost:1030/version

How to run using Docker Compose

$ wget https://raw.githubusercontent.com/Fiware/NGSI-LD_Wrapper/master/docker-compose.yml
$ docker-compose up

$ curl http://localhost:1030/version

How to check configuration (NGSI endpoint)

$ curl http://localhost:1030/configuration

How to invoke API operations

$ curl http://localhost:1030/ngsi-ld/v1/entities/

See also:

https://github.com/fiware/dataModels

https://github.com/fiware/context.Orion

https://github.com/fiware/NGSI-LD_Tests