NGSI-LD Experimental

MIT license Docker badge NGSI-LD badge
Build badge Coverage Status

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

The first one is 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, is currently being 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, it is expected a good level of compatibility and a clear migration path between both information models.  

The wrapper implementation works on top of the FIWARE Context Broker and basically adapts 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

$ 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