Apidays New York 2024 - The value of a flexible API Management solution for O...
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things and NGSI-LD
1. Web of Things
The way towards interoperability with NGSI-LD
José Manuel Cantera Fonseca – FIWARE Foundation
May 2019 – FIWARE Summit Genoa
2. 1
WoT Introduction (I)
• The W3C Web of Things (WoT) has been created to enable
interoperability across IoT Platforms and application domains.
• WoT provides mechanisms to formally describe IoT interfaces:
• allowing IoT devices and services to communicate with each other
• independent of the underlying implementation
• across multiple networking protocols
3. 2
WoT Interaction Model
• WoT applications use three types of Interaction Affordances:
• Properties
• Expose internal state of the Thing that can be directly accessed (read) and
optionally manipulated (write) or watched (observe) i.e. pull and push
communication styles.
• Actions
• allow to invoke a function or service exposed by the Thing or to trigger a
process
• Events
• Thing-initiated notifications, discrete events, or streams of values sent
asynchronously to the receiver. Push communication style.
4. 3
WoT Building Blocks
• Thing Description (TD): it describes the network-facing
interface of a Thing. Each WoT Device MUST have a
corresponding TD. Normative
• Binding Templates can be used to describe multiple protocol
bindings, so that a Thing can communicate with different IoT
Platforms. Non-normative.
• Scripting API enables implementation of the application logic
of a Thing using a standardized contract for JavaScript. Non-
normative
• Status: Thing Description is expected to be a W3C
Recommendation in Q2 2019
• Note: This presentation is based on CR WoT specifications.
Source: W3C
5. 4
W3C WoT Architectural elements & patterns
Source: W3C
Servient as a Thing
Servient as a Intermediary
• A Servient is a software stack that implements the WoT building blocks.
• Servients can host and expose Things and/or consume Things (i.e., host Consumers)
• Depending on the Protocol Binding, Servients can perform in both server and client role
6. 5
WoT Thing Description (WoT TD)
• It defines an information model based on a semantic vocabulary and a serialized
representation based on JSON. (but also allows JSON-LD processing).
• The index.html for Things, human-readable and machine-understandable metadata:
• Thing instances general metadata such as name, ID, descriptions
• Web Links to related Things or other documents.
• Interaction Affordance metadata (properties, actions, events)
• Public Security Configuration metadata
• Schemata of the information exchanged with the Thing (using JSON Schema).
• TD can be hosted locally by a Thing or externally (ex. by a Thing Catalogue)
11. 10
WoT ßà NGSI-LD Interworking (IoW) principles
§ Overall Architecture:
§ NGSI-LD : Information Management Layer
§ WoT : IoT Service Layer
§ Proposed Interworking mechanism. An “NGSI-LD-WoT Intermediary” to
play a dual role:
§ NGSI-LD Context Source
§ WoT Intermediary Servient
§ NGSI-LD-WoT Intermediary responsibilities:
§ Act as an Intermediary Servient to Things
§ Perform NGSI-LD mappings for WoT Events, Properties and Actions
§ Using extra semantic annotations added to the TD
§ ”Similar process” to what currently the IoT Agents do
§ Expose WoT Properties as NGSI-LD Attributes (Context Source)
§ Propagate WoT Event data to an NGSI-LD Context Broker
§ (the intermediary does not have data storage capabilities itself)
§ Export WoT Actions as NGSI-LD Actuations (see next slides)
13. 12
WoT ßà NGSI-LD Interworking (mappings)
§ Proposed Mappings
WoT Affordance NGSI-LD Element
Property Attribute (Property or Relationship)
Event Attribute (Property or Relationship)
Action "hasActuation" Relationship. NEW
"saref:hasCommand" Property. ETSI SAREF
"sosa:Actuation" Entity Type. W3C SSN
§ Mapping process can be guided through TD annotations expressed
using standard ontologies
§ W3C SSN
§ ETSI SAREF
§ ….
15. 14
WoT Action ßà NGSI-LD IoW Proposal
§ New terms introduced:
§ hasCommand Property (reused from SAREF). A collection of actuatable
commands
§ hasActuation Relationship. NEW. A collection of actuations (sosa:Actuation)
§ sosa:Actuation Entity Type. (reused from W3C SSN)
§ For each WoT Action concerning an NGSI-LD Entity:
§ hasCommand contains the concerned command (ex. saref:ToggleCommand)
§ hasActuation has an NGSI-LD object of type “sosa:Actuation”
§ An Entity of type “sosa:Actuation” includes information about the execution
status of the last actuation (command execution) over such Entity.
§ Extended NGSI-LD API for launching Actuations over Entities
§ POST /ngsi-ld/v1/entities/{entityId}/actuations/{command}
§ ContextSourceRegistration API to allow registration of Actuation Executors
§ The “WoT-NGSI-LD Intermediary” is actually an Actuation Executor
18. 17
Issues and open points
§ Scalability
§ How to deal with millions of TDs and related annotations?
§ TD Templates (For further study).
§ Use JSON Hyperlinked Schema?
§ An Actuation Entity per Entity and command type … could be too much?
§ Semantic annotations suitability
§ Is the usage of W3C SSN / ETSI SAREF appropriate?.
§ Are we assuming the right semantics?
§ Specific Ontology for TD annotations?
§ What happens to WoT Binding Templates?
§ How to convey data transformations?
§ What happens to IoT Agents?
§ Can IoT Agents play a role in this architecture?
19. 18
Next Steps
§ Refine the proposed Architecture through a Proof of Concept
§ Study other alternatives for semantic annotation
§ Other concepts in SSN, SAREF, or custom ontology, etc.
§ Align with latest version of W3C WoT TD Specification
§ We hope to see it in CR state soon!!
§ Contribute to ETSI deliverables on NGSI-LD IoW with W3C WoT
§ Raise awareness of this work within the W3C WoT Community
20. 19
Conclusions
§ Interworking between W3C WoT and NGSI-LD is feasible
§ Semantic annotations are a powerful tool to bridge the Information
Management Layer and the IoT Service Layer
§ W3C WoT TD specification is very promising and flexible
§ W3C WoT TD as the lingua franca for semantic description of devices in
the Smart Domain
§ A great opportunity to improve the IoT Chapter of FIWARE!!