SlideShare una empresa de Scribd logo
1 de 75
Descargar para leer sin conexión
i4Trust Website
i4Trust Community
JSON-LD and NSGI-LD
Why organizations need linked data solutions
1
Profile
FIWARE in a nutshell
● REST done right
● Standard mapping of HTTP verbs and status codes
● JSON payloads plus some additional structure rules
● Registrations to augment context
● Publish/Subscribe mechanism for asynchronous
processing
2
FIWARE is an open source initiative defining a universal set of
standards for context data management which facilitate the
development of smart solutions.
Data/API
Management
Publication
Monetization
Core Context Management
(Context Broker)
Context
Processing, Analysis, Visualization
Interface to IoT, Robotics and
Third Party Systems
Deployment
Tools
Development of
Context-aware
Applications
(STH-Comet, Cygnus,
QuantumLeap, Draco)
Connection to IoT
(IoT Agents, OpenMTC)
Real-time processing of
context events
(Perseo)
Handling
authorization and
access control to APIs
(Keyrock, Wilma,
AuthZForce, APInf )
Publication and
Monetization of
Context Information
(CKAN extensions, Data/API
Biz Framework, IDRA)
Creation of
Application Dashboards
(Wirecloud)
Real-time Processing of
media streams
(Kurento, OpenVidu)
Connection to Robots
(FIROS, Fast DDS,Micro XRCE-DDS)
Big Data
Context Analysis
(Cosmos)
Cloud Edge
(FogFlow)
Documents
Exchange
(Domibus)
NGSI Context Broker
Implementations
(Orion, Orion-LD,
Scorpio, Stellio)
Connection to
External Systems
(Oliot)
NGSI v2 already exists, why bother with NGSI-LD?
I like the idea of:
▪ No vendor lock-in
▪ Adding an interoperability layer between processes and the real world
▪ Flexible architectures
• Powered by FIWARE Solutions
• FIWARE Ready Devices
• FIWARE Ready Enablers
• etc.
I’ve already gained those advantages, so what comes next?
4
My data is useful to me, but is more powerful shared with others
… but what about Conway's law?
Any organization that designs a system (defined broadly) will produce a design whose
structure is a copy of the organization's communication structure.
— Melvin E. Conway
… how can I share data and benefit from other organizations if their
organization “communicates” differently?
5
Illustrative FIWARE Examples
Car Parking
6
Cross-border Tourism
Linked Data: JSON to JSON-LD
From: https://json-ld.org/
▪ JSON-LD is a lightweight Linked Data format. It is easy for humans to read and write. It is
based on the already successful JSON format and provides a way to help JSON data
interoperate at Web-scale.
▪ Linked Data empowers people that publish and use information on the Web. It is a way to
create a network of standards-based, machine-readable data across Web sites. It allows an
application to start at one piece of Linked Data, and follow embedded links to other pieces of
Linked Data that are hosted on different sites across the Web.
7
{
"@context": "https://json-ld.org/contexts/person.jsonld",
"@id": "http://dbpedia.org/resource/John_Lennon",
"name": "John Lennon",
"born": "1940-10-09",
"spouse": "http://dbpedia.org/resource/Cynthia_Lennon"
}
8
Harpreet Singh, the Blockchain in Smart Cities Expert
9
Harpreet Singh, the Blockchain in Smart Cities Expert
10
URL: https://www.linkedin.com/in/singhhp1069/
Linked Data: NGSI v2 to NGSI-LD
From: https://fiware-datamodels.readthedocs.io/en/latest/ngsi-ld_faq/index.html
▪ NGSI-LD is an evolution of the FIWARE NGSI v2 information model, and has been updated/improved to
support linked data (entity relationships), property graphs and semantics (exploiting the capabilities
offered by JSON-LD). This work has been conducted under the ETSI ISG Context Information
Management initiative.
▪ Creating proper machine-readable Linked Data is fundamental to NGSI-LD.
▪ NGSI-LD Payloads are valid JSON-LD
11
{
"@context": [
"https://fiware.github.io/data-models/context.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
],
"id": "http://dbpedia.org/resource/John_Lennon",
"type": "Person",
"name": {"type": "Property", "value": "John Lennon"},
"born": {"type": "Property", "value": "1940-10-09"},
"spouse": {"type": "Relationship", "object": "http://dbpedia.org/resource/Cynthia_Lennon" }
}
NGSI-LD Properties: Creating an Entity
NGSI v2
12
NGSI-LD
curl -iX POST 'http://localhost:1026/v2/entities' 
-H 'Content-Type: application/json' 
-d '{
"type": "Store", "id": "store001",
"category": { "type": "Array", "value": ["commercial"]},
"address": { "type": "PostalAddress", "value": {
"streetAddress": "Bornholmer Straße 65",
"addressRegion": "Berlin",
"addressLocality": "Prenzlauer Berg",
"postalCode": "10439"
},
"metadata": {
"verified": { "type": "Boolean","value": true}
}
},
"location": {"type": "geo:json",
"value": {"type": "Point", "coordinates": [13.3986, 52.5547]}
},
"name": {"type": "Text", "value": "Bösebrücke Einkauf"}
}'
curl -iX POST http://localhost:1026/ngsi-ld/v1/entities 
-H 'Content-Type: application/ld+json' 
-d '{
"type": "Building", "id": "urn:ngsi-ld:Building:store001",
"category": { "type": "Property", "value": ["commercial"]},
"address": { "type": "Property"," value": {
"streetAddress": "Bornholmer Straße 65",
"addressRegion": "Berlin",
"addressLocality": "Prenzlauer Berg",
"postalCode": "10439"
},
"verified": { "type": "Property", "value": true }
},
"location": { "type": "GeoProperty",
"value": { "type": "Point", "coordinates": [13.3986, 52.5547]}
},
"name": { "type": "Property", "value": "Bösebrücke Einkauf" },
"@context": [
"https://fiware.github.io/data-models/context.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
]
}'
NGSI-LD Properties: Data Model
NGSI v2
▪ Entities
▪ Attributes
▪ MetaData
13
NGSI-LD
▪ Entities
▪ Properties
▪ Relationships
▪ Values
plus …
plus …
etc...
The NGSI LD data model is more
complex; the definitions of use are
more rigid which lead to a
navigable knowledge graph.
▪ Properties of Properties
▪ Properties of Relationships
▪ Relationships of Properties
▪ Relationships of Relationships
. ▪ Properties of Properties of Properties
▪ Relationships of Properties of Properties
▪ Properties of Properties of Relationships
▪ Relationships of Properties of Relationships
▪ Properties of Relationships of Properties
▪ Relationships of Relationships of Properties
▪ Properties of Relationships of Relationships
▪ Relationships of Relationships of Relationships
NGSI-LD Properties: Data Model
14
The Entity Example Notes
Has an id urn:ngsi-ld:Building:store001 URI/URN. id must be unique.
Has a type. https://uri.fiware.org/ns/
data-models#Building
● Fully qualified URI of a well defined data model
● Short-hand strings for types, mapped to fully qualified URIs through the JSON-LD
@context.
Has a series of properties name, address, category etc. This can be expanded into http://schema.org/address, which is
known as a fully qualified name (FQN).
Has a series of
properties-of-properties
a verified field for the address This is the equivalent of NGSI v2 metadata
Has a series of relationships managedBy The object corresponds to the URI/URN of another data entity.
Equivalent of NGSI v2 refXXX
Has a series of
properties-of-relationships
managedBy.since Holds additional information about a relationship.
This is the equivalent of metadata about a refXXX property
Has a series of
relationships-of-relationships
managedBy.subordinateTo holds the URI/URN of another relationship.
NGSI-LD Properties: Reading Entity Data
NGSI-LD
▪ Response is just a JSON payload plus an @context
▪ @context can be passed either in the Link header
or the payload body:
▪ Accept: application/ld+json to include
the @context as a JSON attribute
▪ Accept: application/json returns plain old
JSON objects - @context is passed as a Link header
▪ Just a minute what has happened to category?
15
curl -G -X GET 
'http://localhost:1026/ngsi-ld/v1/entities' 
-H 'Link: <https://fiware.github.io/data-models/context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context";
type="application/ld+json"' 
-H 'Accept: application/ld+json' 
-d 'type=Building' 
-d 'options=keyValues'
[
{
"@context": "https://fiware.github.io/data-models/context.jsonld",
"id": "urn:ngsi-ld:Building:store001", "type": "Building",
"address": {
"streetAddress": "Bornholmer Straße 65",
"addressRegion": "Berlin",
"addressLocality": "Prenzlauer Berg",
"postalCode": "10439"
},
"name": "Bösebrücke Einkauf",
"category": [
"https://uri.fiware.org/ns/data-models#commercial"
],
"location": {
"type": "Point", "coordinates": [13.3986, 52.5547]
}
}
]
NGSI-LD Properties: What to call a location?
▪ location
▪ locatedAt
▪ geocoordinate
▪ geocoordinates
▪ place
▪ ubicación
▪ standort
▪ 置き場所
16
With NGSI-LD core @context a location is always
https://uri.etsi.org/ngsi-ld/location
NGSI-LD core @context
"@context": {
"ngsi-ld": "https://uri.etsi.org/ngsi-ld/",
"id": "@id",
"type": "@type",
"value": "https://uri.etsi.org/ngsi-ld/hasValue",
"object": {
"@id": "https://uri.etsi.org/ngsi-ld/hasObject",
"@type": "@id"
},
"Property": "https://uri.etsi.org/ngsi-ld/Property"
"Relationship": "https://uri.etsi.org/ngsi-ld/Relationship",
... etc.
"unitCode": "https://uri.etsi.org/ngsi-ld/unitCode",
"location": "https://uri.etsi.org/ngsi-ld/location",
... etc.
}
NGSI-LD Properties: @vocab and Enumerated Values
▪ An “address” is:
https://schema.org/address
▪ A “category” is:
https://uri.fiware.org/ns/data-models#category
▪ A category is an enum which takes a
set of values such as:
https://uri.fiware.org/ns/data-models#commercial
https://uri.fiware.org/ns/data-models#office
https://uri.fiware.org/ns/data-models#retail
https://uri.fiware.org/ns/data-models#residential
enum is in progress.
17
FIWARE Data Models @context
"@context": {
"type": "@type",
"id": "@id",
"schema": "https://schema.org/",
"fiware": "https://uri.fiware.org/ns/data-models#",
... etc.
"address": "schema:address",
"category": {
"@id" :"fiware:category",
"@type": "@vocab"
},
"commercial": "fiware:commercial",
"office": "fiware:office",
"retail": "fiware:retail",
"residential": "fiware:residential",
... etc.
}
With NGSI-LD Data Models, attributes and enums are well-defined in a computer-readable fashion
Useful links
JSON-LD
▪ Website: https://json-ld.org/
▪ Linked Data Video: https://www.youtube.com/watch?v=vioCbTo3C-4
▪ JSON-LD Video: https://www.youtube.com/watch?v=4x_xzT5eF5Q
NGSI-LD
▪ ETSI Specification:
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.03.01_60/gs_cim009v010301p.pdf
▪ NGSI-LD Video: https://www.youtube.com/watch?v=rZ13IyLpAtA
▪ Tutorials: https://ngsi-ld-tutorials.readthedocs.io/
Smart Data Models
▪ Website: http://smartdatamodels.org/
▪ Smart Cities Data Models Video: https://www.youtube.com/watch?v=dfMo0HnaIUQ
18
i4Trust Website
i4Trust Community
Introduction to NGSI-LD
Useful links
What is JSON-LD:
https://www.youtube.com/watch?v=vioCbTo3C-4
JSON-LD Core Markup:
https://www.youtube.com/watch?v=UmvWk_TQ30A
Compaction and Expansion:
https://www.youtube.com/watch?v=Tm3fD89dqRE
JSON-LD Playground & examples
https://json-ld.org/playground/
20
Linked Context Data: NGSI v2 to NGSI-LD
From: https://fiware-datamodels.readthedocs.io/en/latest/ngsi-ld_faq/index.html
▪ NGSI-LD is an evolution of the FIWARE NGSI v2 information model, and has been updated/improved to
support linked data (entity relationships), property graphs and semantics (exploiting the capabilities
offered by JSON-LD). This work has been conducted under the ETSI ISG Context Information
Management initiative.
▪ Creating proper machine-readable Linked Data is fundamental to NGSI-LD.
▪ NGSI-LD Payloads are valid JSON-LD
21
{
"@context": [
"https://fiware.github.io/data-models/context.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
],
"id": "http://dbpedia.org/resource/John_Lennon",
"type": "Person",
"name": {"type": "Property", "value": "John Lennon"},
"born": {"type": "Property", "value": "1940-10-09"},
"spouse": {"type": "Relationship", "object": "http://dbpedia.org/resource/Cynthia_Lennon" }
}
What is Core @context?
"ngsi-ld": "https://uri.etsi.org/ngsi-ld/",
"geojson": "https://purl.org/geojson/vocab#",
"id": "@id",
"type": "@type",
"Date": "ngsi-ld:Date",
"DateTime": "ngsi-ld:DateTime",
"Feature": "geojson:Feature",
"FeatureCollection": "geojson:FeatureCollection",
"GeometryCollection": "geojson:GeometryCollection",
"LineString": "geojson:LineString",
"MultiLineString": "geojson:MultiLineString",
"MultiPoint": "geojson:MultiPoint",
"MultiPolygon": "geojson:MultiPolygon",
"Point": "geojson:Point",
"Polygon": "geojson:Polygon",
"GeoProperty": "ngsi-ld:GeoProperty",
"Property": "ngsi-ld:Property",
"Relationship": "ngsi-ld:Relationship",
"ContextSourceNotification":"ngsi-ld:ContextSourceNotification",
"ContextSourceRegistration":"ngsi-ld:ContextSourceRegistration",
"Notification": "ngsi-ld:Notification",
"Subscription": "ngsi-ld:Subscription",
… etc
22
"coordinates": {
"@container": "@list",
"@id": "geojson:coordinates"
},
"temporalQ": "ngsi-ld:temporalQ",
"throttling": "ngsi-ld:throttling",
"observedAt": {
"@id": "ngsi-ld:observedAt",
"@type": "DateTime"
},
"timeInterval": "ngsi-ld:timeInterval",
"unitCode": "ngsi-ld:unitCode",
"value": "ngsi-ld:hasValue",
"values": {
"@id": "ngsi-ld:hasValues",
"@container": "@list"
},
… etc
"@vocab": "https://uri.etsi.org/ngsi-ld/default-
context/"
NGSI-LD: Evolution not Revolution
NGSI v2
▪ Well defined REST API for context data
using JSON payloads.
GET, POST and other HTTP verbs do
the things you expect
▪ CRUD operations -
/v2/entities endpoint
▪ Augment your context data -
/v2/registrations endpoint
▪ Push context data to other services -
/v2/subscriptions endpoint
23
NGSI-LD
▪ Well defined REST API for context data
using JSON and JSON-LD payloads.
GET, POST and other HTTP verbs do the
things you expect
▪ CRUD operations - /ngsi-
ld/v1/entities endpoint
▪ Augment your context data - /ngsi-
ld/v1/registrations endpoint
▪ Push context data to other services - /ngsi-
ld/v1/subscriptions endpoint
24
Demo: NGSI-LD - Properties
NGSI-LD Properties: Creating an Entity
NGSI v2
25
NGSI-LD
curl -iX POST 'http://localhost:1026/v2/entities' 
-H 'Content-Type: application/json' 
-d '{
"type": "Store", "id": "store001",
"category": { "type": "Array", "value": ["commercial"]},
"address": { "type": "PostalAddress", "value": {
"streetAddress": "Bornholmer Straße 65",
"addressRegion": "Berlin",
"addressLocality": "Prenzlauer Berg",
"postalCode": "10439"
},
"metadata": {
"verified": { "type": "Boolean","value": true}
}
},
"location": {"type": "geo:json",
"value": {"type": "Point", "coordinates": [13.3986, 52.5547]}
},
"name": {"type": "Text", "value": "Bösebrücke Einkauf"}
}'
curl -iX POST http://localhost:1026/ngsi-ld/v1/entities 
-H 'Content-Type: application/ld+json' 
-d '{
"type": "Building", "id": "urn:ngsi-ld:Building:store001",
"category": { "type": "Property", "value": ["commercial"]},
"address": { "type": "Property"," value": {
"streetAddress": "Bornholmer Straße 65",
"addressRegion": "Berlin",
"addressLocality": "Prenzlauer Berg",
"postalCode": "10439"
},
"verified": { "type": "Property", "value": true }
},
"location": { "type": "GeoProperty",
"value": { "type": "Point", "coordinates": [13.3986, 52.5547]}
},
"name": { "type": "Property", "value": "Bösebrücke Einkauf" },
"@context": [
"https://fiware.github.io/data-models/context.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
]
}'
NGSI-LD Properties: Data Model
NGSI v2
▪ Entities
▪ Attributes
▪ MetaData
26
NGSI-LD
▪ Entities
▪ Properties
▪ Relationships
▪ Values
plus …
plus …
etc...
The NGSI LD data model is more
complex; the definitions of use are
more rigid which lead to a
navigable knowledge graph.
▪ Properties of Properties
▪ Properties of Relationships
▪ Relationships of Properties
▪ Relationships of Relationships
. ▪ Properties of Properties of Properties
▪ Relationships of Properties of Properties
▪ Properties of Properties of Relationships
▪ Relationships of Properties of Relationships
▪ Properties of Relationships of Properties
▪ Relationships of Relationships of Properties
▪ Properties of Relationships of Relationships
▪ Relationships of Relationships of Relationships
NGSI-LD Properties: Data Model
27
The Entity Example Notes
Has an id urn:ngsi-ld:Building:store001 URI/URN. id must be unique.
Has a type. https://uri.fiware.org/ns/
data-models#Building
● Fully qualified URI of a well defined data model
● Short-hand strings for types, mapped to fully qualified URIs through the JSON-LD
@context.
Has a series of properties name, address, category etc. This can be expanded into http://schema.org/address, which is
known as a fully qualified name (FQN).
Has a series of
properties-of-properties
a verified field for the address This is the equivalent of NGSI v2 metadata
Has a series of relationships managedBy The object corresponds to the URI/URN of another data entity.
Equivalent of NGSI v2 refXXX
Has a series of
properties-of-relationships
managedBy.since Holds additional information about a relationship.
This is the equivalent of metadata about a refXXX property
Has a series of
relationships-of-relationships
managedBy.subordinateTo holds the URI/URN of another relationship.
NGSI-LD Properties: Reading Entity Data as JSON-LD
NGSI-LD
▪ Response is just a JSON payload plus an @context
▪ @context can be passed either in the Link header
or the payload body:
▪ Accept: application/ld+json to include
the @context as a JSON attribute
▪ Accept: application/json returns plain old
JSON objects - @context is passed as a Link header
28
curl -G -X GET 
'http://localhost:1026/ngsi-ld/v1/entities' 
-H 'Link: <https://fiware.github.io/data-models/context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context";
type="application/ld+json"' 
-H 'Accept: application/ld+json' 
-d 'type=Building' 
-d 'options=keyValues'
[
{
"@context": "https://fiware.github.io/data-models/context.jsonld",
"id": "urn:ngsi-ld:Building:store001", "type": "Building",
"address": {
"streetAddress": "Bornholmer Straße 65",
"addressRegion": "Berlin",
"addressLocality": "Prenzlauer Berg",
"postalCode": "10439"
},
"name": "Bösebrücke Einkauf",
"category": “commercial",
"location": {
"type": "Point", "coordinates": [13.3986, 52.5547]
}
}
]
NGSI-LD Properties: What to call a location?
▪ place ?
▪ locatedAt ?
▪ geocoordinate ?
▪ geocoordinates ?
29
With NGSI-LD core @context a location is always https://uri.etsi.org/ngsi-ld/location
Thereafter, with JSON-LD you may map your preferred short name if necessary
NGSI-LD core @context
"@context": {
"ngsi-ld": "https://uri.etsi.org/ngsi-ld/",
"geojson": "https://purl.org/geojson/vocab#",
"id": "@id",
"type": "@type",
"value": "ngsi-ld:hasValue",
... etc.
"GeoProperty": "ngsi-ld:GeoProperty",
"Point": "geojson:Point",
"coordinates": {
"@container": "@list",
"@id": "geojson:coordinates"
},
"location": "https://uri.etsi.org/ngsi-ld/location",
... etc.
}
▪ ubicación ?
▪ standort ?
▪ 置き場所 ?
▪ location ✓
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [13.3986, 52.5547]}
}
}
NGSI-LD Relationships: Traversing Edge Nodes
From: https://www.w3.org/TR/json-ld/#dfn-graph
A JSON-LD document serializes a dataset which is a collection of graphs
A graph is a labeled directed graph, i.e., a set of nodes connected by edges.
In NGSI-LD:
▪ Node = NGSI Entity
▪ Edge = A relationship attribute linking two NGSI Entities
Therefore NGSI Linked Data relies on three separate definitions:
1. A definition that a particular attribute within an NGSI entity really represents a link
2. A machine readable definition of that link in the Data Model (i.e. the @context)
3. A machine readable definition of the set of all types of links available (the @graph)
30
Creating proper machine-readable Linked Data is fundamental to NGSI-LD.
NGSI-LD Relationships: 1. Creating Entities
Relationship Links within an NGSI Entity are formally defined using:
"type": "Relationship" OR "@type": "https://uri.etsi.org/ngsi-ld/Relationship"
The attribute of the linked entity is an object rather than a value
31
curl -X POST 
http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs 
-H 'Content-Type: application/ld+json' 
-H 'fiware-servicepath: /' 
-d '{
"stocks": { "type": "Relationship","object": "urn:ngsi-ld:Product:001"},
"numberOfItems": {"type": "Property","value": 50},
"locatedIn" : {
"type": "Relationship", "object": "urn:ngsi-ld:Building:store001",
"requestedBy": {"type": "Relationship","object": "urn:ngsi-ld:Person:bob-the-manager"},
"installedBy": {"type": "Relationship","object": "urn:ngsi-ld:Person:employee001"},
"statusOfWork": {"type": "Property","value": "completed"}
},
"@context": "https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld"
}'
NGSI-LD Relationships: 2. Machine Readable Data Models
Relationship links within the @context are formally defined using: "@type": "@id"
32
FIWARE Data Models @context
"@context": {
"tutorial": "https://fiware.github.io/tutorials.Step-by-Step/schema/",
"Product": "tutorial:Product",
"Shelf": "tutorial:Shelf",
...etc
"installedBy": {
"@id": "tutorial:installedBy",
"@type": "@id"
},
"requestedBy": {
"@id": "tutorial:requestedBy",
"@type": "@id"
},
...etc
NGSI-LD Relationships: 3. Machine Readable Links
33
FIWARE Data Models @graph
"@graph": [
{
"@id": "tutorial:Product",
"@type": "rdfs:Class",
"rdfs:comment": [
{"@language": "en", "@value": "Product is sold in a Store."},
{"@language": "ja", "@value": "製品はストアで販売されている物"}],
"rdfs:label": [{"@language": "en", "@value": "Product"}, {"@language": "ja", "@value": "製品"}],
"rdfs:subClassOf": {"@id": "http://schema.org/Thing"}
},
… etc
{
"@id": "tutorial:requestedBy",
"@type": "https://uri.etsi.org/ngsi-ld/Relationship",
"schema:domainIncludes": [{"@id": "tutorial:Shelf"}, {"@id": "tutorial:StockOrder"}],
"schema:rangeIncludes": [{"@id": "schema:Person"}],
"rdfs:comment": [
{"@language": "en","@value": "Object requested by person."},
{"@language": "ja","@value": "人が要求したオブジェクト"}],
"rdfs:label": [{"@language": "en", "@value": "requested by"},{"@language": "ja", "@value": "要求者"}]
},
]
34
Demo: NGSI-LD - Relationships
Sample Key-Values Payload
NGSI-LD Subscriptions: Creating a Subscription
35
NGSI-LD
{
"id": "urn:ngsi-ld:Notification:60812d06f2ebd727e1c425a8",
"type": "Notification",
"subscriptionId": "urn:ngsi-
ld:Subscription:60812c7bf2ebd727e1c425a4",
"notifiedAt": "2021-04-22T08:00:06.741Z",
"data": [
{
"id": "urn:ngsi-ld:Shelf:unit001",
"type": "Shelf",
"locatedIn": "urn:ngsi-ld:Building:store001",
"numberOfItems": 8,
"stocks": "urn:ngsi-ld:Product:001"
}
]
}
curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' 
-H 'Content-Type: application/ld+json' 
--data-raw '{
"description": "Notify me of low stock in Store 001",
"type": "Subscription",
"entities": [{"type": "Shelf"}],
"watchedAttributes": ["numberOfItems"],
"q": "numberOfItems<10;locatedIn==urn:ngsi-ld:Building:store001",
"notification": {
"attributes": [ "numberOfItems", "stocks","locatedIn"],
"format": "keyValues",
"endpoint": {
"uri": "http://tutorial:3000/subscription/low-stock-store001",
"accept": "application/json"
}
},
"@context": "https://fiware.github.io/tutorials.Step-by-Step/tutorials-
context.jsonld"
}'
NGSI-LD Registrations: Creating a Registration
NGSI LD
36
curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/csourceRegistrations/' 
-H 'Content-Type: application/json' 
-H 'Link: <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' 
--data-raw ' {
"type": "ContextSourceRegistration",
"information": [
{
"entities": [
{
"type": "Building",
"id": "urn:ngsi-ld:Building:store001"
}
],
"properties": [
"tweets"
]
}
],
"endpoint": "http://context-provider:3000/static/tweets"
}'
Note that properties is defined in the
1.1.1 NGSI-LD core context
In 1.3.1, it is due to be replaced with two
separate attributes - propertyNames and
relationshipNames - this change has
been made in order to offer full
GeoJSON-LD support.
Your context broker may or may not
support the updated core context
37
Demo: NGSI-LD - Subscriptions and Registrations
38
Context Data as Linked Data - How does it help?
Rich Text Snippets
Standard schema.org/Product data model
marked up as JSON-LD on the web. Interpreted by
third parties. Search Engine can display product
rating on screen. System “knows” if a product is out
of stock.
NGSI-LD Supermarket Tutorial
Third party ARV could “know” when a shelf needs filling and
retrieve goods from the warehouse
No need to reprogram for new customers if data follows the
fiware.org/ns/data-models, or the JSON-LD can be
converted to do so.
i4Trust Website
i4Trust Community
Introduction to Smart Data Models
FIWARE Foundation
Data Modelling Expert
Alberto Abella
■ About:
■ During this part of the session you will get introduced to the Smart Data Models initiative
■ This session will:
■ Explain basics about the Smart Data Models initiative and how it is governed
■ Introduce you to data models for specific verticals that are already available
■ Explain how you may contribute extensions to existing data models under Smart Data Models
■ Explain how you may contribute new data models under Smart Data Models
■ Goals:
■ After this session you will be able to implement a service using a Smart Data Model
■ You will be able to explain how to become an active contributor to the Smart Data Model initiative
■ Target Audience:
■ LEBDs
■ Link to the content
Contents and goals
Smart Data Models: Introduction and Governance
Steering Board :
■ Three members (April-2021)
■ IUDX: Indian Urban Data Exchange
■ Public entity supporting data interchange for Smart cities in India
■ TMForum:
■ Worldwide Telco association
■ FIWARE Foundation
■ Curator of the open source FIWARE platform and its ecosystem
Introduction and Governance
Introduction and Governance
▪ A community site with detailed data models available for open use for multiple sectors
▪ Together with other relevant organizations in the curation of the different domains and subjects
▪ Providing coherence and consistency between data models across different domains
▪ To create a method for AGILE standardization and evolution these data models
▪ To provide extended usefulness to FIWARE platform users in terms of:
− Extended interoperability
− Reduced time dedicated to data model codying
− Accumulated experience tested in real case scenarios
− Mapped to be integrated with other platforms
▪ Using open licensing to allow extensive use and adoption
▪ Used in real case scenarios (and based on real use cases)
▪ Based on git platform and github as development frontend
▪ Consensus as main decision method
▪ Based on widely adopted standards (including ontologies and international schemas (i.e. schema.org)
44
By Pieter Brueghel the Elder - bAGKOdJfvfAhYQ at Google
Cultural Institute, zoom level maximum, Public Domain,
https://commons.wikimedia.org/w/index.php?curid=22178101
Differential advantages
1. Agile standardization. Standardization time takes
Weeks vs months/years
2. Easy contribution. One single file source of truth.
3. Based on actual experience. All data models are
based on real case scenario.
4. Multilanguage. Automation translation of specs.
5. 1 change for all domains. Changing a data model
impact on all the domains related to it.
Introduction and Governance
Smart Data Models: Structure and contents. Verticals
■ What is a Smart Data Model:
■ It is the combination of 3 elements
■ A technical description of the data types and relationships of the attributes of an element
that has to be modeled
■ A documented description of these attributes aligned with the technical description
■ Some examples of the use of the data model
■ Based on real case scenario (not theory or academic research)
■ With an open license allowing its use, share and modification
■ What is NOT a Smart Data Model
■ It is not an ontology describing the elements of an area of knowledge
■ A new standard
■ An academic exercise
Smart Data Models: Structure and contents. Verticals
Structure and contents. Verticals
GITHUB
http://github.com/smart-data-models
- Oriented to developers
- All resources available
- Contribution by PR
- Issues on data models
SITE (wp)
http://smartdatamodels.org
- Oriented to end users
- News on updates (subscription)
- Check attributes and enumerations
- Check descriptions
47
Structure and contents. Verticals
data-models
Umbrella repo
Smart
Water
Subject
1
(sewage)
Smart
Cities
Smart
Building
Smart
Environment
Smart
Destinations
Smart
Energy
Smart
Manufacturing
Smart
Agrifood
Smart
Robotics
Subject
2
(parking)
Subject
3
(weather)
Subject
4 (...)
DOMAINS
REPOSITORIES
Readme
pointing to the
list of subjects
General info or
shared
resources
DATA-MODELS
- Guides for coding new data models
- Template for new data models and examples
- Directory for scripting tools to check data models
- Inventory of domains and data models
- Inventory of attributes and terms
SUBJECTS’ REPOSITORIES
Readme pointing to the list of data models for the objects
Contributors.md
subject-schema.json
DATA MODELS
README.md
/doc/spec.md
/examples
schema.json
Current Adopters
48
LIFECYCLE MANAGEMENT REPOSITORIES
Incubated Harmonization
Structure and contents. Verticals
49
About: 554 data models available. Data Models per domain*:
■ 'SmartEnergy': 414
■ 'SmartCities': 59
■ 'CrossSector': 33
■ 'SmartWater': 22
■ 'SmartAgrifood': 19
■ 'SmartEnvironment': 16
■ 'SmartDestination': 10
■ 'SmartAeronautics': 6
■ 'Smart-Sensoring': 4
■ 'SmartRobotics': 1
*Some subjects are linked to several domains so the # of data models exceeds the actual figure
** ROS data models could mean > 100 data models
Updated 25-4-2021
Last Subjects :
● dataModel.Forestry
● dataModel.SocialMedia,
● dataModel.WasteWater,
● dataModel.OPCUA,
● dataModel.OpenChannelManagement,
● dataModel.QueueManagement
Structure and contents. Verticals
50
Incubated repository (They could end up being official data models or not):
Total estimated : 98 (+49)
In domains of:
SmartRobotics 53* (not related to ROS)
SmartCities 12
SmartWater 11
CrossSector 11
Smart-Sensoring 6
Smart Environment 3
SmartAgrifood 1
Cross Sector 5
▪ Services for users
− News, subscription to newsletter, and twitter account @smartdatamodels
− Search data models
− Repositories of data models, quick list.
▪ Services for developers
− Checklist for submitting your new data model
− Create your data model with a spreadsheet
− Create your data model in the incubated repository
− Create a examples compliant with a data model (NGSI-LD)
− Validate if your data model is well documented
− Validate your payload (external)
51
Structure and contents. Verticals
52
Structure and contents. Verticals
■ Contents:
■ doc: directory for specifications
■ examples : Directory for examples
■ ADOPTERS.yaml use cases of the data model
■ LICENSE.md license of the data model. I.e. CC-BY
■ README.md pointer to the main elements of the data
model, including examples, specifications and other
services
■ model.yaml technical description of the attributes for
embedding into the specifications
■ notes.yaml additional file for customization contents
for the specifications
■ schema.json single source of truth of the model.
Validates only the key-values payloads
■ swagger.yaml yaml file required for the interactive
specification and future test of services
■ Mandatory
■ Optional
■ Automatic
Smart Data Models: Become a contributor.
54
1
Do you have a
use case?
Exception
management
No
Yes
Is any data
model related?
Yes
Access contribution manual
and draft yor data model
(tool) in your repository
Ask permission to contribute
in the incubated repository
Option 1
Option 2
(recommended)
Pull request on the
incubated repository after
completing the contribution
checklist
Work on the incubated
repository and ask for
support through issues or
mail
Pass the
manual review?
No
Fix the comments
Publication process
2
LEGEND
1: Start new model
2: End new model
3: Start update existing model
3
Create your proposal of
update
Pull request on the official
repository of the data model
3
No
Yes
Pass the
manual review?
Fix the comments
No
Yes
Smart Data Models: Become a contributor.
Smart Data Models: Exercise
Turn a data source definition into a data model
■ Expected knowledge from the participants
■ Knowledge of NGSI-v2 and NGSI-LD and their differences
■ Some work with a context broker (any of them)
■ Json and Json schema
■ Git and github concepts
■ A code editor like pycharm
Exercise
56
■ It is required your github users to be written here (http://bit.ly/github_users) to grant you
access to the incubated repository.
■ If you do not have a github user, then go here: http://bit.ly/register_github
■ Use the repository incubated. https://github.com/smart-data-models/incubated/tree/master
■ The final exercise is to submit a complete data model.
■ Complete the creation of an official data model through all its steps.
■ It will be done with official sources, so the result of the exercise, if completed, will become
an official data model of the initiative.
■ Comments to the contribution manual will be incorporated
■ If not completed during session time It can be completed afterwards
Exercise
57
Become a contributor
■ Checklist for contribution
58
Data sources
These data sources have dozens of properties. We’ll only take a few for the exercise.
■ https://www.schema.org/MedicalCondition
■ https://www.schema.org/MedicalGuideline
■ https://www.schema.org/Drug
■ https://www.schema.org/MedicalScholarlyArticle
■ https://www.schema.org/LocalBusiness
■ https://www.schema.org/Organization
■ https://www.schema.org/Restaurant
■ Other available. https://www.schema.org/docs/health-lifesci.home.html
Take a minimum of 5 properties, one an object / array.
Exercise
59
Data sources
Other data sources could be valid as well as:
1. It has documented attributes
2. It has clear data types for the attributes
3. It is on use in some real case scenario
Exercise
60
■ Steps:
1. Review the contribution manual
2. Access to the data source
3. Open our spreadsheet
4. Paste the data definitions in the spreadsheet according to the contribution manual.
5. Generate the json schema
6. Validate the json schema
7. Generate the example of payload
8. Validate the example against the schema
9. Submit the new data model
Exercise
61
■ Review the contribution manual
1. Contribution manual is linked in the main page or in https://bit.ly/contribution_manual
Exercise
62
■ Access to the data source. Examples available.
a. https://www.schema.org/MedicalCondition
b. https://www.schema.org/MedicalGuideline
c. https://www.schema.org/Drug
d. https://www.schema.org/MedicalScholarlyArticle
e. https://www.schema.org/LocalBusiness
f. https://www.schema.org/Organization
g. https://www.schema.org/Restaurant
a. https://www.schema.org/docs/health-lifesci.home.html
Exercise
63
■ Open our spreadsheet (need a google drive account)
Exercise
64
■ Paste the data definitions in the spreadsheet according to the contribution manual.
Exercise
65
■ Generate the json schema
■ Fix possible errors
■ Provide more detail / limits
■ Include Units
■ Include Enumerations
■ Include Privacy
■ Include limitations to values
■ Required Properties
Exercise
66
■ Validate the json schema
■ Validation of the json schema
https://www.jsonschemavalidator.net/
■ Validation of the documentation
https://smartdatamodels.org/index.php/da
ta-models-contribution-api/
Exercise
67
■ Generate the normalized example of payload
■ I.e. NGSI-LD is available
■ Needs edit for meaningful data
Exercise
68
■ Generate the key-values of payload
■ Use the script or manually with your code
editor
Exercise
69
■ Validate the payload (keyvalues). https://www.jsonschemavalidator.net/
Exercise
70
■ Fork the incubated repository
■ PR your changes to the data model
They will appear in the front page in 5 minutes maximum (right
column, bottom)
Exercise
71
Smart Data Models: Summary
■ Goal
■ Allow real interoperability between NGSI data sources
■ Contribution:
■ Always possible as long as it has a use case, and comply with contribution workflow
■ Use of the data models
■ Search tools for finding the right data model
■ Best not to reinvent the wheel
■ Differential advantages of agile standardization
■ Quick answer
■ Do not invent
■ Easy contribution
■ Single source of truth
■ Better simple and useful than technically ‘correct’ and powerful
Summary
Thank you!
i4Trust has received funding from the European Union’s Horizon 2020
research and innovation programme under the Grant Agreement no 951975.

Más contenido relacionado

La actualidad más candente

FIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust MarketplaceFIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE
 
FIWARE Training: API Umbrella
FIWARE Training: API UmbrellaFIWARE Training: API Umbrella
FIWARE Training: API Umbrella
FIWARE
 
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdfJuanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
FIWARE
 
FIWARE Training: IoT and Legacy
FIWARE Training: IoT and LegacyFIWARE Training: IoT and Legacy
FIWARE Training: IoT and Legacy
FIWARE
 

La actualidad más candente (20)

Data Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LDData Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LD
 
FIWARE Training: NGSI-LD Advanced Operations
FIWARE Training: NGSI-LD Advanced OperationsFIWARE Training: NGSI-LD Advanced Operations
FIWARE Training: NGSI-LD Advanced Operations
 
FIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust MarketplaceFIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust Marketplace
 
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
 
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in ProductionKong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
 
FIWARE Training: NGSI-LD Introduction
FIWARE Training: NGSI-LD IntroductionFIWARE Training: NGSI-LD Introduction
FIWARE Training: NGSI-LD Introduction
 
FIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data ModelsFIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data Models
 
FIWARE Wednesday Webinars - NGSI-LD and Smart Data Models: Standard Access to...
FIWARE Wednesday Webinars - NGSI-LD and Smart Data Models: Standard Access to...FIWARE Wednesday Webinars - NGSI-LD and Smart Data Models: Standard Access to...
FIWARE Wednesday Webinars - NGSI-LD and Smart Data Models: Standard Access to...
 
FIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LDFIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LD
 
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
 
Session 8 - Creating Data Processing Services | Train the Trainers Program
Session 8 - Creating Data Processing Services | Train the Trainers ProgramSession 8 - Creating Data Processing Services | Train the Trainers Program
Session 8 - Creating Data Processing Services | Train the Trainers Program
 
Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)
 
FIWARE Training: API Umbrella
FIWARE Training: API UmbrellaFIWARE Training: API Umbrella
FIWARE Training: API Umbrella
 
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdfJuanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
 
FIWARE Training: IoT and Legacy
FIWARE Training: IoT and LegacyFIWARE Training: IoT and Legacy
FIWARE Training: IoT and Legacy
 
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoCreating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
 
FIWARE Global Summit - NGSI-LD: Modelling, Linking and Utilizing Context Info...
FIWARE Global Summit - NGSI-LD: Modelling, Linking and Utilizing Context Info...FIWARE Global Summit - NGSI-LD: Modelling, Linking and Utilizing Context Info...
FIWARE Global Summit - NGSI-LD: Modelling, Linking and Utilizing Context Info...
 
FIWARE Wednesday Webinars - FIWARE Overview
FIWARE Wednesday Webinars - FIWARE OverviewFIWARE Wednesday Webinars - FIWARE Overview
FIWARE Wednesday Webinars - FIWARE Overview
 
FIWARE Generic Enablers introduction
FIWARE Generic Enablers introductionFIWARE Generic Enablers introduction
FIWARE Generic Enablers introduction
 
i4Trust - Overview
i4Trust - Overviewi4Trust - Overview
i4Trust - Overview
 

Similar a Session 2 - NGSI-LD primer & Smart Data Models | Train the Trainers Program

Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
kriszyp
 

Similar a Session 2 - NGSI-LD primer & Smart Data Models | Train the Trainers Program (20)

JSON-LD and NGSI-LD
JSON-LD and NGSI-LDJSON-LD and NGSI-LD
JSON-LD and NGSI-LD
 
FIWARE Global Summit - Hands-On NGSI-LD
FIWARE Global Summit - Hands-On NGSI-LDFIWARE Global Summit - Hands-On NGSI-LD
FIWARE Global Summit - Hands-On NGSI-LD
 
NGSI-LD Introduction
NGSI-LD IntroductionNGSI-LD Introduction
NGSI-LD Introduction
 
Web of things introduction
Web of things introductionWeb of things introduction
Web of things introduction
 
Towards Interoperability between W3C Web of Things and NGSI-LD
Towards Interoperability between W3C Web of Things and NGSI-LDTowards Interoperability between W3C Web of Things and NGSI-LD
Towards Interoperability between W3C Web of Things and NGSI-LD
 
NGSI-LD IoT Agents
NGSI-LD IoT AgentsNGSI-LD IoT Agents
NGSI-LD IoT Agents
 
The LOD Gateway: Open Source Infrastructure for Linked Data
The LOD Gateway: Open Source Infrastructure for Linked DataThe LOD Gateway: Open Source Infrastructure for Linked Data
The LOD Gateway: Open Source Infrastructure for Linked Data
 
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data Tutorial
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
 
Linked Data to Improve the OER Experience
Linked Data to Improve the OER ExperienceLinked Data to Improve the OER Experience
Linked Data to Improve the OER Experience
 
APIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenAPIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in Heaven
 
Session 7 - Connecting to Legacy Systems, IoT and other Systems | Train the T...
Session 7 - Connecting to Legacy Systems, IoT and other Systems | Train the T...Session 7 - Connecting to Legacy Systems, IoT and other Systems | Train the T...
Session 7 - Connecting to Legacy Systems, IoT and other Systems | Train the T...
 
The Social Semantic Web
The Social Semantic WebThe Social Semantic Web
The Social Semantic Web
 
Enabling Citizen-empowered Apps over Linked Data
Enabling Citizen-empowered Apps over Linked DataEnabling Citizen-empowered Apps over Linked Data
Enabling Citizen-empowered Apps over Linked Data
 
CPaaS.io Y1 Review Meeting - Holistic Data Management
CPaaS.io Y1 Review Meeting - Holistic Data ManagementCPaaS.io Y1 Review Meeting - Holistic Data Management
CPaaS.io Y1 Review Meeting - Holistic Data Management
 
Gt ea2009
Gt ea2009Gt ea2009
Gt ea2009
 
The Social Data Web
The Social Data WebThe Social Data Web
The Social Data Web
 
Unit 2
Unit 2Unit 2
Unit 2
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 

Más de FIWARE

Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FIWARE
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
FIWARE
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
FIWARE
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FIWARE
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FIWARE
 

Más de FIWARE (20)

Behm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptxBehm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptx
 
Katharina Hogrebe Herne Digital Days.pdf
 Katharina Hogrebe Herne Digital Days.pdf Katharina Hogrebe Herne Digital Days.pdf
Katharina Hogrebe Herne Digital Days.pdf
 
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptxChristoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
 
Behm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptxBehm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptx
 
Evangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptxEvangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptx
 
Lukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptxLukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptx
 
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptxPierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
 
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptxDennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
 
Ulrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptxUlrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptx
 
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptxAleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
 
Water Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdfWater Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdf
 
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
 
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptxFiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
 
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptxHTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
 
WE_LoRaWAN _ IoT.pptx
WE_LoRaWAN  _ IoT.pptxWE_LoRaWAN  _ IoT.pptx
WE_LoRaWAN _ IoT.pptx
 
EU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptxEU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptx
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Session 2 - NGSI-LD primer & Smart Data Models | Train the Trainers Program

  • 1. i4Trust Website i4Trust Community JSON-LD and NSGI-LD Why organizations need linked data solutions
  • 3. FIWARE in a nutshell ● REST done right ● Standard mapping of HTTP verbs and status codes ● JSON payloads plus some additional structure rules ● Registrations to augment context ● Publish/Subscribe mechanism for asynchronous processing 2 FIWARE is an open source initiative defining a universal set of standards for context data management which facilitate the development of smart solutions.
  • 4. Data/API Management Publication Monetization Core Context Management (Context Broker) Context Processing, Analysis, Visualization Interface to IoT, Robotics and Third Party Systems Deployment Tools Development of Context-aware Applications (STH-Comet, Cygnus, QuantumLeap, Draco) Connection to IoT (IoT Agents, OpenMTC) Real-time processing of context events (Perseo) Handling authorization and access control to APIs (Keyrock, Wilma, AuthZForce, APInf ) Publication and Monetization of Context Information (CKAN extensions, Data/API Biz Framework, IDRA) Creation of Application Dashboards (Wirecloud) Real-time Processing of media streams (Kurento, OpenVidu) Connection to Robots (FIROS, Fast DDS,Micro XRCE-DDS) Big Data Context Analysis (Cosmos) Cloud Edge (FogFlow) Documents Exchange (Domibus) NGSI Context Broker Implementations (Orion, Orion-LD, Scorpio, Stellio) Connection to External Systems (Oliot)
  • 5. NGSI v2 already exists, why bother with NGSI-LD? I like the idea of: ▪ No vendor lock-in ▪ Adding an interoperability layer between processes and the real world ▪ Flexible architectures • Powered by FIWARE Solutions • FIWARE Ready Devices • FIWARE Ready Enablers • etc. I’ve already gained those advantages, so what comes next? 4
  • 6. My data is useful to me, but is more powerful shared with others … but what about Conway's law? Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure. — Melvin E. Conway … how can I share data and benefit from other organizations if their organization “communicates” differently? 5
  • 7. Illustrative FIWARE Examples Car Parking 6 Cross-border Tourism
  • 8. Linked Data: JSON to JSON-LD From: https://json-ld.org/ ▪ JSON-LD is a lightweight Linked Data format. It is easy for humans to read and write. It is based on the already successful JSON format and provides a way to help JSON data interoperate at Web-scale. ▪ Linked Data empowers people that publish and use information on the Web. It is a way to create a network of standards-based, machine-readable data across Web sites. It allows an application to start at one piece of Linked Data, and follow embedded links to other pieces of Linked Data that are hosted on different sites across the Web. 7 { "@context": "https://json-ld.org/contexts/person.jsonld", "@id": "http://dbpedia.org/resource/John_Lennon", "name": "John Lennon", "born": "1940-10-09", "spouse": "http://dbpedia.org/resource/Cynthia_Lennon" }
  • 9. 8 Harpreet Singh, the Blockchain in Smart Cities Expert
  • 10. 9 Harpreet Singh, the Blockchain in Smart Cities Expert
  • 12. Linked Data: NGSI v2 to NGSI-LD From: https://fiware-datamodels.readthedocs.io/en/latest/ngsi-ld_faq/index.html ▪ NGSI-LD is an evolution of the FIWARE NGSI v2 information model, and has been updated/improved to support linked data (entity relationships), property graphs and semantics (exploiting the capabilities offered by JSON-LD). This work has been conducted under the ETSI ISG Context Information Management initiative. ▪ Creating proper machine-readable Linked Data is fundamental to NGSI-LD. ▪ NGSI-LD Payloads are valid JSON-LD 11 { "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ], "id": "http://dbpedia.org/resource/John_Lennon", "type": "Person", "name": {"type": "Property", "value": "John Lennon"}, "born": {"type": "Property", "value": "1940-10-09"}, "spouse": {"type": "Relationship", "object": "http://dbpedia.org/resource/Cynthia_Lennon" } }
  • 13. NGSI-LD Properties: Creating an Entity NGSI v2 12 NGSI-LD curl -iX POST 'http://localhost:1026/v2/entities' -H 'Content-Type: application/json' -d '{ "type": "Store", "id": "store001", "category": { "type": "Array", "value": ["commercial"]}, "address": { "type": "PostalAddress", "value": { "streetAddress": "Bornholmer Straße 65", "addressRegion": "Berlin", "addressLocality": "Prenzlauer Berg", "postalCode": "10439" }, "metadata": { "verified": { "type": "Boolean","value": true} } }, "location": {"type": "geo:json", "value": {"type": "Point", "coordinates": [13.3986, 52.5547]} }, "name": {"type": "Text", "value": "Bösebrücke Einkauf"} }' curl -iX POST http://localhost:1026/ngsi-ld/v1/entities -H 'Content-Type: application/ld+json' -d '{ "type": "Building", "id": "urn:ngsi-ld:Building:store001", "category": { "type": "Property", "value": ["commercial"]}, "address": { "type": "Property"," value": { "streetAddress": "Bornholmer Straße 65", "addressRegion": "Berlin", "addressLocality": "Prenzlauer Berg", "postalCode": "10439" }, "verified": { "type": "Property", "value": true } }, "location": { "type": "GeoProperty", "value": { "type": "Point", "coordinates": [13.3986, 52.5547]} }, "name": { "type": "Property", "value": "Bösebrücke Einkauf" }, "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] }'
  • 14. NGSI-LD Properties: Data Model NGSI v2 ▪ Entities ▪ Attributes ▪ MetaData 13 NGSI-LD ▪ Entities ▪ Properties ▪ Relationships ▪ Values plus … plus … etc... The NGSI LD data model is more complex; the definitions of use are more rigid which lead to a navigable knowledge graph. ▪ Properties of Properties ▪ Properties of Relationships ▪ Relationships of Properties ▪ Relationships of Relationships . ▪ Properties of Properties of Properties ▪ Relationships of Properties of Properties ▪ Properties of Properties of Relationships ▪ Relationships of Properties of Relationships ▪ Properties of Relationships of Properties ▪ Relationships of Relationships of Properties ▪ Properties of Relationships of Relationships ▪ Relationships of Relationships of Relationships
  • 15. NGSI-LD Properties: Data Model 14 The Entity Example Notes Has an id urn:ngsi-ld:Building:store001 URI/URN. id must be unique. Has a type. https://uri.fiware.org/ns/ data-models#Building ● Fully qualified URI of a well defined data model ● Short-hand strings for types, mapped to fully qualified URIs through the JSON-LD @context. Has a series of properties name, address, category etc. This can be expanded into http://schema.org/address, which is known as a fully qualified name (FQN). Has a series of properties-of-properties a verified field for the address This is the equivalent of NGSI v2 metadata Has a series of relationships managedBy The object corresponds to the URI/URN of another data entity. Equivalent of NGSI v2 refXXX Has a series of properties-of-relationships managedBy.since Holds additional information about a relationship. This is the equivalent of metadata about a refXXX property Has a series of relationships-of-relationships managedBy.subordinateTo holds the URI/URN of another relationship.
  • 16. NGSI-LD Properties: Reading Entity Data NGSI-LD ▪ Response is just a JSON payload plus an @context ▪ @context can be passed either in the Link header or the payload body: ▪ Accept: application/ld+json to include the @context as a JSON attribute ▪ Accept: application/json returns plain old JSON objects - @context is passed as a Link header ▪ Just a minute what has happened to category? 15 curl -G -X GET 'http://localhost:1026/ngsi-ld/v1/entities' -H 'Link: <https://fiware.github.io/data-models/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' -H 'Accept: application/ld+json' -d 'type=Building' -d 'options=keyValues' [ { "@context": "https://fiware.github.io/data-models/context.jsonld", "id": "urn:ngsi-ld:Building:store001", "type": "Building", "address": { "streetAddress": "Bornholmer Straße 65", "addressRegion": "Berlin", "addressLocality": "Prenzlauer Berg", "postalCode": "10439" }, "name": "Bösebrücke Einkauf", "category": [ "https://uri.fiware.org/ns/data-models#commercial" ], "location": { "type": "Point", "coordinates": [13.3986, 52.5547] } } ]
  • 17. NGSI-LD Properties: What to call a location? ▪ location ▪ locatedAt ▪ geocoordinate ▪ geocoordinates ▪ place ▪ ubicación ▪ standort ▪ 置き場所 16 With NGSI-LD core @context a location is always https://uri.etsi.org/ngsi-ld/location NGSI-LD core @context "@context": { "ngsi-ld": "https://uri.etsi.org/ngsi-ld/", "id": "@id", "type": "@type", "value": "https://uri.etsi.org/ngsi-ld/hasValue", "object": { "@id": "https://uri.etsi.org/ngsi-ld/hasObject", "@type": "@id" }, "Property": "https://uri.etsi.org/ngsi-ld/Property" "Relationship": "https://uri.etsi.org/ngsi-ld/Relationship", ... etc. "unitCode": "https://uri.etsi.org/ngsi-ld/unitCode", "location": "https://uri.etsi.org/ngsi-ld/location", ... etc. }
  • 18. NGSI-LD Properties: @vocab and Enumerated Values ▪ An “address” is: https://schema.org/address ▪ A “category” is: https://uri.fiware.org/ns/data-models#category ▪ A category is an enum which takes a set of values such as: https://uri.fiware.org/ns/data-models#commercial https://uri.fiware.org/ns/data-models#office https://uri.fiware.org/ns/data-models#retail https://uri.fiware.org/ns/data-models#residential enum is in progress. 17 FIWARE Data Models @context "@context": { "type": "@type", "id": "@id", "schema": "https://schema.org/", "fiware": "https://uri.fiware.org/ns/data-models#", ... etc. "address": "schema:address", "category": { "@id" :"fiware:category", "@type": "@vocab" }, "commercial": "fiware:commercial", "office": "fiware:office", "retail": "fiware:retail", "residential": "fiware:residential", ... etc. } With NGSI-LD Data Models, attributes and enums are well-defined in a computer-readable fashion
  • 19. Useful links JSON-LD ▪ Website: https://json-ld.org/ ▪ Linked Data Video: https://www.youtube.com/watch?v=vioCbTo3C-4 ▪ JSON-LD Video: https://www.youtube.com/watch?v=4x_xzT5eF5Q NGSI-LD ▪ ETSI Specification: https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.03.01_60/gs_cim009v010301p.pdf ▪ NGSI-LD Video: https://www.youtube.com/watch?v=rZ13IyLpAtA ▪ Tutorials: https://ngsi-ld-tutorials.readthedocs.io/ Smart Data Models ▪ Website: http://smartdatamodels.org/ ▪ Smart Cities Data Models Video: https://www.youtube.com/watch?v=dfMo0HnaIUQ 18
  • 21. Useful links What is JSON-LD: https://www.youtube.com/watch?v=vioCbTo3C-4 JSON-LD Core Markup: https://www.youtube.com/watch?v=UmvWk_TQ30A Compaction and Expansion: https://www.youtube.com/watch?v=Tm3fD89dqRE JSON-LD Playground & examples https://json-ld.org/playground/ 20
  • 22. Linked Context Data: NGSI v2 to NGSI-LD From: https://fiware-datamodels.readthedocs.io/en/latest/ngsi-ld_faq/index.html ▪ NGSI-LD is an evolution of the FIWARE NGSI v2 information model, and has been updated/improved to support linked data (entity relationships), property graphs and semantics (exploiting the capabilities offered by JSON-LD). This work has been conducted under the ETSI ISG Context Information Management initiative. ▪ Creating proper machine-readable Linked Data is fundamental to NGSI-LD. ▪ NGSI-LD Payloads are valid JSON-LD 21 { "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ], "id": "http://dbpedia.org/resource/John_Lennon", "type": "Person", "name": {"type": "Property", "value": "John Lennon"}, "born": {"type": "Property", "value": "1940-10-09"}, "spouse": {"type": "Relationship", "object": "http://dbpedia.org/resource/Cynthia_Lennon" } }
  • 23. What is Core @context? "ngsi-ld": "https://uri.etsi.org/ngsi-ld/", "geojson": "https://purl.org/geojson/vocab#", "id": "@id", "type": "@type", "Date": "ngsi-ld:Date", "DateTime": "ngsi-ld:DateTime", "Feature": "geojson:Feature", "FeatureCollection": "geojson:FeatureCollection", "GeometryCollection": "geojson:GeometryCollection", "LineString": "geojson:LineString", "MultiLineString": "geojson:MultiLineString", "MultiPoint": "geojson:MultiPoint", "MultiPolygon": "geojson:MultiPolygon", "Point": "geojson:Point", "Polygon": "geojson:Polygon", "GeoProperty": "ngsi-ld:GeoProperty", "Property": "ngsi-ld:Property", "Relationship": "ngsi-ld:Relationship", "ContextSourceNotification":"ngsi-ld:ContextSourceNotification", "ContextSourceRegistration":"ngsi-ld:ContextSourceRegistration", "Notification": "ngsi-ld:Notification", "Subscription": "ngsi-ld:Subscription", … etc 22 "coordinates": { "@container": "@list", "@id": "geojson:coordinates" }, "temporalQ": "ngsi-ld:temporalQ", "throttling": "ngsi-ld:throttling", "observedAt": { "@id": "ngsi-ld:observedAt", "@type": "DateTime" }, "timeInterval": "ngsi-ld:timeInterval", "unitCode": "ngsi-ld:unitCode", "value": "ngsi-ld:hasValue", "values": { "@id": "ngsi-ld:hasValues", "@container": "@list" }, … etc "@vocab": "https://uri.etsi.org/ngsi-ld/default- context/"
  • 24. NGSI-LD: Evolution not Revolution NGSI v2 ▪ Well defined REST API for context data using JSON payloads. GET, POST and other HTTP verbs do the things you expect ▪ CRUD operations - /v2/entities endpoint ▪ Augment your context data - /v2/registrations endpoint ▪ Push context data to other services - /v2/subscriptions endpoint 23 NGSI-LD ▪ Well defined REST API for context data using JSON and JSON-LD payloads. GET, POST and other HTTP verbs do the things you expect ▪ CRUD operations - /ngsi- ld/v1/entities endpoint ▪ Augment your context data - /ngsi- ld/v1/registrations endpoint ▪ Push context data to other services - /ngsi- ld/v1/subscriptions endpoint
  • 25. 24 Demo: NGSI-LD - Properties
  • 26. NGSI-LD Properties: Creating an Entity NGSI v2 25 NGSI-LD curl -iX POST 'http://localhost:1026/v2/entities' -H 'Content-Type: application/json' -d '{ "type": "Store", "id": "store001", "category": { "type": "Array", "value": ["commercial"]}, "address": { "type": "PostalAddress", "value": { "streetAddress": "Bornholmer Straße 65", "addressRegion": "Berlin", "addressLocality": "Prenzlauer Berg", "postalCode": "10439" }, "metadata": { "verified": { "type": "Boolean","value": true} } }, "location": {"type": "geo:json", "value": {"type": "Point", "coordinates": [13.3986, 52.5547]} }, "name": {"type": "Text", "value": "Bösebrücke Einkauf"} }' curl -iX POST http://localhost:1026/ngsi-ld/v1/entities -H 'Content-Type: application/ld+json' -d '{ "type": "Building", "id": "urn:ngsi-ld:Building:store001", "category": { "type": "Property", "value": ["commercial"]}, "address": { "type": "Property"," value": { "streetAddress": "Bornholmer Straße 65", "addressRegion": "Berlin", "addressLocality": "Prenzlauer Berg", "postalCode": "10439" }, "verified": { "type": "Property", "value": true } }, "location": { "type": "GeoProperty", "value": { "type": "Point", "coordinates": [13.3986, 52.5547]} }, "name": { "type": "Property", "value": "Bösebrücke Einkauf" }, "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ] }'
  • 27. NGSI-LD Properties: Data Model NGSI v2 ▪ Entities ▪ Attributes ▪ MetaData 26 NGSI-LD ▪ Entities ▪ Properties ▪ Relationships ▪ Values plus … plus … etc... The NGSI LD data model is more complex; the definitions of use are more rigid which lead to a navigable knowledge graph. ▪ Properties of Properties ▪ Properties of Relationships ▪ Relationships of Properties ▪ Relationships of Relationships . ▪ Properties of Properties of Properties ▪ Relationships of Properties of Properties ▪ Properties of Properties of Relationships ▪ Relationships of Properties of Relationships ▪ Properties of Relationships of Properties ▪ Relationships of Relationships of Properties ▪ Properties of Relationships of Relationships ▪ Relationships of Relationships of Relationships
  • 28. NGSI-LD Properties: Data Model 27 The Entity Example Notes Has an id urn:ngsi-ld:Building:store001 URI/URN. id must be unique. Has a type. https://uri.fiware.org/ns/ data-models#Building ● Fully qualified URI of a well defined data model ● Short-hand strings for types, mapped to fully qualified URIs through the JSON-LD @context. Has a series of properties name, address, category etc. This can be expanded into http://schema.org/address, which is known as a fully qualified name (FQN). Has a series of properties-of-properties a verified field for the address This is the equivalent of NGSI v2 metadata Has a series of relationships managedBy The object corresponds to the URI/URN of another data entity. Equivalent of NGSI v2 refXXX Has a series of properties-of-relationships managedBy.since Holds additional information about a relationship. This is the equivalent of metadata about a refXXX property Has a series of relationships-of-relationships managedBy.subordinateTo holds the URI/URN of another relationship.
  • 29. NGSI-LD Properties: Reading Entity Data as JSON-LD NGSI-LD ▪ Response is just a JSON payload plus an @context ▪ @context can be passed either in the Link header or the payload body: ▪ Accept: application/ld+json to include the @context as a JSON attribute ▪ Accept: application/json returns plain old JSON objects - @context is passed as a Link header 28 curl -G -X GET 'http://localhost:1026/ngsi-ld/v1/entities' -H 'Link: <https://fiware.github.io/data-models/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' -H 'Accept: application/ld+json' -d 'type=Building' -d 'options=keyValues' [ { "@context": "https://fiware.github.io/data-models/context.jsonld", "id": "urn:ngsi-ld:Building:store001", "type": "Building", "address": { "streetAddress": "Bornholmer Straße 65", "addressRegion": "Berlin", "addressLocality": "Prenzlauer Berg", "postalCode": "10439" }, "name": "Bösebrücke Einkauf", "category": “commercial", "location": { "type": "Point", "coordinates": [13.3986, 52.5547] } } ]
  • 30. NGSI-LD Properties: What to call a location? ▪ place ? ▪ locatedAt ? ▪ geocoordinate ? ▪ geocoordinates ? 29 With NGSI-LD core @context a location is always https://uri.etsi.org/ngsi-ld/location Thereafter, with JSON-LD you may map your preferred short name if necessary NGSI-LD core @context "@context": { "ngsi-ld": "https://uri.etsi.org/ngsi-ld/", "geojson": "https://purl.org/geojson/vocab#", "id": "@id", "type": "@type", "value": "ngsi-ld:hasValue", ... etc. "GeoProperty": "ngsi-ld:GeoProperty", "Point": "geojson:Point", "coordinates": { "@container": "@list", "@id": "geojson:coordinates" }, "location": "https://uri.etsi.org/ngsi-ld/location", ... etc. } ▪ ubicación ? ▪ standort ? ▪ 置き場所 ? ▪ location ✓ "location": { "type": "GeoProperty", "value": { "type": "Point", "coordinates": [13.3986, 52.5547]} } }
  • 31. NGSI-LD Relationships: Traversing Edge Nodes From: https://www.w3.org/TR/json-ld/#dfn-graph A JSON-LD document serializes a dataset which is a collection of graphs A graph is a labeled directed graph, i.e., a set of nodes connected by edges. In NGSI-LD: ▪ Node = NGSI Entity ▪ Edge = A relationship attribute linking two NGSI Entities Therefore NGSI Linked Data relies on three separate definitions: 1. A definition that a particular attribute within an NGSI entity really represents a link 2. A machine readable definition of that link in the Data Model (i.e. the @context) 3. A machine readable definition of the set of all types of links available (the @graph) 30 Creating proper machine-readable Linked Data is fundamental to NGSI-LD.
  • 32. NGSI-LD Relationships: 1. Creating Entities Relationship Links within an NGSI Entity are formally defined using: "type": "Relationship" OR "@type": "https://uri.etsi.org/ngsi-ld/Relationship" The attribute of the linked entity is an object rather than a value 31 curl -X POST http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs -H 'Content-Type: application/ld+json' -H 'fiware-servicepath: /' -d '{ "stocks": { "type": "Relationship","object": "urn:ngsi-ld:Product:001"}, "numberOfItems": {"type": "Property","value": 50}, "locatedIn" : { "type": "Relationship", "object": "urn:ngsi-ld:Building:store001", "requestedBy": {"type": "Relationship","object": "urn:ngsi-ld:Person:bob-the-manager"}, "installedBy": {"type": "Relationship","object": "urn:ngsi-ld:Person:employee001"}, "statusOfWork": {"type": "Property","value": "completed"} }, "@context": "https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld" }'
  • 33. NGSI-LD Relationships: 2. Machine Readable Data Models Relationship links within the @context are formally defined using: "@type": "@id" 32 FIWARE Data Models @context "@context": { "tutorial": "https://fiware.github.io/tutorials.Step-by-Step/schema/", "Product": "tutorial:Product", "Shelf": "tutorial:Shelf", ...etc "installedBy": { "@id": "tutorial:installedBy", "@type": "@id" }, "requestedBy": { "@id": "tutorial:requestedBy", "@type": "@id" }, ...etc
  • 34. NGSI-LD Relationships: 3. Machine Readable Links 33 FIWARE Data Models @graph "@graph": [ { "@id": "tutorial:Product", "@type": "rdfs:Class", "rdfs:comment": [ {"@language": "en", "@value": "Product is sold in a Store."}, {"@language": "ja", "@value": "製品はストアで販売されている物"}], "rdfs:label": [{"@language": "en", "@value": "Product"}, {"@language": "ja", "@value": "製品"}], "rdfs:subClassOf": {"@id": "http://schema.org/Thing"} }, … etc { "@id": "tutorial:requestedBy", "@type": "https://uri.etsi.org/ngsi-ld/Relationship", "schema:domainIncludes": [{"@id": "tutorial:Shelf"}, {"@id": "tutorial:StockOrder"}], "schema:rangeIncludes": [{"@id": "schema:Person"}], "rdfs:comment": [ {"@language": "en","@value": "Object requested by person."}, {"@language": "ja","@value": "人が要求したオブジェクト"}], "rdfs:label": [{"@language": "en", "@value": "requested by"},{"@language": "ja", "@value": "要求者"}] }, ]
  • 35. 34 Demo: NGSI-LD - Relationships
  • 36. Sample Key-Values Payload NGSI-LD Subscriptions: Creating a Subscription 35 NGSI-LD { "id": "urn:ngsi-ld:Notification:60812d06f2ebd727e1c425a8", "type": "Notification", "subscriptionId": "urn:ngsi- ld:Subscription:60812c7bf2ebd727e1c425a4", "notifiedAt": "2021-04-22T08:00:06.741Z", "data": [ { "id": "urn:ngsi-ld:Shelf:unit001", "type": "Shelf", "locatedIn": "urn:ngsi-ld:Building:store001", "numberOfItems": 8, "stocks": "urn:ngsi-ld:Product:001" } ] } curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' -H 'Content-Type: application/ld+json' --data-raw '{ "description": "Notify me of low stock in Store 001", "type": "Subscription", "entities": [{"type": "Shelf"}], "watchedAttributes": ["numberOfItems"], "q": "numberOfItems<10;locatedIn==urn:ngsi-ld:Building:store001", "notification": { "attributes": [ "numberOfItems", "stocks","locatedIn"], "format": "keyValues", "endpoint": { "uri": "http://tutorial:3000/subscription/low-stock-store001", "accept": "application/json" } }, "@context": "https://fiware.github.io/tutorials.Step-by-Step/tutorials- context.jsonld" }'
  • 37. NGSI-LD Registrations: Creating a Registration NGSI LD 36 curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/csourceRegistrations/' -H 'Content-Type: application/json' -H 'Link: <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' --data-raw ' { "type": "ContextSourceRegistration", "information": [ { "entities": [ { "type": "Building", "id": "urn:ngsi-ld:Building:store001" } ], "properties": [ "tweets" ] } ], "endpoint": "http://context-provider:3000/static/tweets" }' Note that properties is defined in the 1.1.1 NGSI-LD core context In 1.3.1, it is due to be replaced with two separate attributes - propertyNames and relationshipNames - this change has been made in order to offer full GeoJSON-LD support. Your context broker may or may not support the updated core context
  • 38. 37 Demo: NGSI-LD - Subscriptions and Registrations
  • 39. 38 Context Data as Linked Data - How does it help? Rich Text Snippets Standard schema.org/Product data model marked up as JSON-LD on the web. Interpreted by third parties. Search Engine can display product rating on screen. System “knows” if a product is out of stock. NGSI-LD Supermarket Tutorial Third party ARV could “know” when a shelf needs filling and retrieve goods from the warehouse No need to reprogram for new customers if data follows the fiware.org/ns/data-models, or the JSON-LD can be converted to do so.
  • 40. i4Trust Website i4Trust Community Introduction to Smart Data Models FIWARE Foundation Data Modelling Expert Alberto Abella
  • 41. ■ About: ■ During this part of the session you will get introduced to the Smart Data Models initiative ■ This session will: ■ Explain basics about the Smart Data Models initiative and how it is governed ■ Introduce you to data models for specific verticals that are already available ■ Explain how you may contribute extensions to existing data models under Smart Data Models ■ Explain how you may contribute new data models under Smart Data Models ■ Goals: ■ After this session you will be able to implement a service using a Smart Data Model ■ You will be able to explain how to become an active contributor to the Smart Data Model initiative ■ Target Audience: ■ LEBDs ■ Link to the content Contents and goals
  • 42. Smart Data Models: Introduction and Governance
  • 43. Steering Board : ■ Three members (April-2021) ■ IUDX: Indian Urban Data Exchange ■ Public entity supporting data interchange for Smart cities in India ■ TMForum: ■ Worldwide Telco association ■ FIWARE Foundation ■ Curator of the open source FIWARE platform and its ecosystem Introduction and Governance
  • 44. Introduction and Governance ▪ A community site with detailed data models available for open use for multiple sectors ▪ Together with other relevant organizations in the curation of the different domains and subjects ▪ Providing coherence and consistency between data models across different domains ▪ To create a method for AGILE standardization and evolution these data models ▪ To provide extended usefulness to FIWARE platform users in terms of: − Extended interoperability − Reduced time dedicated to data model codying − Accumulated experience tested in real case scenarios − Mapped to be integrated with other platforms ▪ Using open licensing to allow extensive use and adoption ▪ Used in real case scenarios (and based on real use cases) ▪ Based on git platform and github as development frontend ▪ Consensus as main decision method ▪ Based on widely adopted standards (including ontologies and international schemas (i.e. schema.org)
  • 45. 44 By Pieter Brueghel the Elder - bAGKOdJfvfAhYQ at Google Cultural Institute, zoom level maximum, Public Domain, https://commons.wikimedia.org/w/index.php?curid=22178101 Differential advantages 1. Agile standardization. Standardization time takes Weeks vs months/years 2. Easy contribution. One single file source of truth. 3. Based on actual experience. All data models are based on real case scenario. 4. Multilanguage. Automation translation of specs. 5. 1 change for all domains. Changing a data model impact on all the domains related to it. Introduction and Governance
  • 46. Smart Data Models: Structure and contents. Verticals
  • 47. ■ What is a Smart Data Model: ■ It is the combination of 3 elements ■ A technical description of the data types and relationships of the attributes of an element that has to be modeled ■ A documented description of these attributes aligned with the technical description ■ Some examples of the use of the data model ■ Based on real case scenario (not theory or academic research) ■ With an open license allowing its use, share and modification ■ What is NOT a Smart Data Model ■ It is not an ontology describing the elements of an area of knowledge ■ A new standard ■ An academic exercise Smart Data Models: Structure and contents. Verticals
  • 48. Structure and contents. Verticals GITHUB http://github.com/smart-data-models - Oriented to developers - All resources available - Contribution by PR - Issues on data models SITE (wp) http://smartdatamodels.org - Oriented to end users - News on updates (subscription) - Check attributes and enumerations - Check descriptions 47
  • 49. Structure and contents. Verticals data-models Umbrella repo Smart Water Subject 1 (sewage) Smart Cities Smart Building Smart Environment Smart Destinations Smart Energy Smart Manufacturing Smart Agrifood Smart Robotics Subject 2 (parking) Subject 3 (weather) Subject 4 (...) DOMAINS REPOSITORIES Readme pointing to the list of subjects General info or shared resources DATA-MODELS - Guides for coding new data models - Template for new data models and examples - Directory for scripting tools to check data models - Inventory of domains and data models - Inventory of attributes and terms SUBJECTS’ REPOSITORIES Readme pointing to the list of data models for the objects Contributors.md subject-schema.json DATA MODELS README.md /doc/spec.md /examples schema.json Current Adopters 48 LIFECYCLE MANAGEMENT REPOSITORIES Incubated Harmonization
  • 50. Structure and contents. Verticals 49 About: 554 data models available. Data Models per domain*: ■ 'SmartEnergy': 414 ■ 'SmartCities': 59 ■ 'CrossSector': 33 ■ 'SmartWater': 22 ■ 'SmartAgrifood': 19 ■ 'SmartEnvironment': 16 ■ 'SmartDestination': 10 ■ 'SmartAeronautics': 6 ■ 'Smart-Sensoring': 4 ■ 'SmartRobotics': 1 *Some subjects are linked to several domains so the # of data models exceeds the actual figure ** ROS data models could mean > 100 data models Updated 25-4-2021 Last Subjects : ● dataModel.Forestry ● dataModel.SocialMedia, ● dataModel.WasteWater, ● dataModel.OPCUA, ● dataModel.OpenChannelManagement, ● dataModel.QueueManagement
  • 51. Structure and contents. Verticals 50 Incubated repository (They could end up being official data models or not): Total estimated : 98 (+49) In domains of: SmartRobotics 53* (not related to ROS) SmartCities 12 SmartWater 11 CrossSector 11 Smart-Sensoring 6 Smart Environment 3 SmartAgrifood 1 Cross Sector 5
  • 52. ▪ Services for users − News, subscription to newsletter, and twitter account @smartdatamodels − Search data models − Repositories of data models, quick list. ▪ Services for developers − Checklist for submitting your new data model − Create your data model with a spreadsheet − Create your data model in the incubated repository − Create a examples compliant with a data model (NGSI-LD) − Validate if your data model is well documented − Validate your payload (external) 51 Structure and contents. Verticals
  • 53. 52 Structure and contents. Verticals ■ Contents: ■ doc: directory for specifications ■ examples : Directory for examples ■ ADOPTERS.yaml use cases of the data model ■ LICENSE.md license of the data model. I.e. CC-BY ■ README.md pointer to the main elements of the data model, including examples, specifications and other services ■ model.yaml technical description of the attributes for embedding into the specifications ■ notes.yaml additional file for customization contents for the specifications ■ schema.json single source of truth of the model. Validates only the key-values payloads ■ swagger.yaml yaml file required for the interactive specification and future test of services ■ Mandatory ■ Optional ■ Automatic
  • 54. Smart Data Models: Become a contributor.
  • 55. 54 1 Do you have a use case? Exception management No Yes Is any data model related? Yes Access contribution manual and draft yor data model (tool) in your repository Ask permission to contribute in the incubated repository Option 1 Option 2 (recommended) Pull request on the incubated repository after completing the contribution checklist Work on the incubated repository and ask for support through issues or mail Pass the manual review? No Fix the comments Publication process 2 LEGEND 1: Start new model 2: End new model 3: Start update existing model 3 Create your proposal of update Pull request on the official repository of the data model 3 No Yes Pass the manual review? Fix the comments No Yes Smart Data Models: Become a contributor.
  • 56. Smart Data Models: Exercise Turn a data source definition into a data model
  • 57. ■ Expected knowledge from the participants ■ Knowledge of NGSI-v2 and NGSI-LD and their differences ■ Some work with a context broker (any of them) ■ Json and Json schema ■ Git and github concepts ■ A code editor like pycharm Exercise 56
  • 58. ■ It is required your github users to be written here (http://bit.ly/github_users) to grant you access to the incubated repository. ■ If you do not have a github user, then go here: http://bit.ly/register_github ■ Use the repository incubated. https://github.com/smart-data-models/incubated/tree/master ■ The final exercise is to submit a complete data model. ■ Complete the creation of an official data model through all its steps. ■ It will be done with official sources, so the result of the exercise, if completed, will become an official data model of the initiative. ■ Comments to the contribution manual will be incorporated ■ If not completed during session time It can be completed afterwards Exercise 57
  • 59. Become a contributor ■ Checklist for contribution 58
  • 60. Data sources These data sources have dozens of properties. We’ll only take a few for the exercise. ■ https://www.schema.org/MedicalCondition ■ https://www.schema.org/MedicalGuideline ■ https://www.schema.org/Drug ■ https://www.schema.org/MedicalScholarlyArticle ■ https://www.schema.org/LocalBusiness ■ https://www.schema.org/Organization ■ https://www.schema.org/Restaurant ■ Other available. https://www.schema.org/docs/health-lifesci.home.html Take a minimum of 5 properties, one an object / array. Exercise 59
  • 61. Data sources Other data sources could be valid as well as: 1. It has documented attributes 2. It has clear data types for the attributes 3. It is on use in some real case scenario Exercise 60
  • 62. ■ Steps: 1. Review the contribution manual 2. Access to the data source 3. Open our spreadsheet 4. Paste the data definitions in the spreadsheet according to the contribution manual. 5. Generate the json schema 6. Validate the json schema 7. Generate the example of payload 8. Validate the example against the schema 9. Submit the new data model Exercise 61
  • 63. ■ Review the contribution manual 1. Contribution manual is linked in the main page or in https://bit.ly/contribution_manual Exercise 62
  • 64. ■ Access to the data source. Examples available. a. https://www.schema.org/MedicalCondition b. https://www.schema.org/MedicalGuideline c. https://www.schema.org/Drug d. https://www.schema.org/MedicalScholarlyArticle e. https://www.schema.org/LocalBusiness f. https://www.schema.org/Organization g. https://www.schema.org/Restaurant a. https://www.schema.org/docs/health-lifesci.home.html Exercise 63
  • 65. ■ Open our spreadsheet (need a google drive account) Exercise 64
  • 66. ■ Paste the data definitions in the spreadsheet according to the contribution manual. Exercise 65
  • 67. ■ Generate the json schema ■ Fix possible errors ■ Provide more detail / limits ■ Include Units ■ Include Enumerations ■ Include Privacy ■ Include limitations to values ■ Required Properties Exercise 66
  • 68. ■ Validate the json schema ■ Validation of the json schema https://www.jsonschemavalidator.net/ ■ Validation of the documentation https://smartdatamodels.org/index.php/da ta-models-contribution-api/ Exercise 67
  • 69. ■ Generate the normalized example of payload ■ I.e. NGSI-LD is available ■ Needs edit for meaningful data Exercise 68
  • 70. ■ Generate the key-values of payload ■ Use the script or manually with your code editor Exercise 69
  • 71. ■ Validate the payload (keyvalues). https://www.jsonschemavalidator.net/ Exercise 70
  • 72. ■ Fork the incubated repository ■ PR your changes to the data model They will appear in the front page in 5 minutes maximum (right column, bottom) Exercise 71
  • 74. ■ Goal ■ Allow real interoperability between NGSI data sources ■ Contribution: ■ Always possible as long as it has a use case, and comply with contribution workflow ■ Use of the data models ■ Search tools for finding the right data model ■ Best not to reinvent the wheel ■ Differential advantages of agile standardization ■ Quick answer ■ Do not invent ■ Easy contribution ■ Single source of truth ■ Better simple and useful than technically ‘correct’ and powerful Summary
  • 75. Thank you! i4Trust has received funding from the European Union’s Horizon 2020 research and innovation programme under the Grant Agreement no 951975.