Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting Started with a W3C WoT Project Eclipse Virtual IoT Meetup, 16 Jun 2016.

Similar presentations


Presentation on theme: "Getting Started with a W3C WoT Project Eclipse Virtual IoT Meetup, 16 Jun 2016."— Presentation transcript:

1 Getting Started with a W3C WoT Project Eclipse Virtual IoT Meetup, 16 Jun 2016

2 What is the Web of Things? Internet of Things IEEE 802.15.4 EthernetBluetoothWi-Fi LoRa … : Connectivity Application Layer

3 What is the Web of Things? Internet of Things IEEE 802.15.4 EthernetBluetoothWi-Fi LoRa … : Connectivity

4 Web of Things What is the Web of Things? Internet of Things IEEE 802.15.4 EthernetBluetoothWi-Fi LoRa … : Connectivity

5 W3C WoT Mission … “interconnecting existing Internet of Things platforms and complementing available standards” Web of Things Not to be yet another standard

6 Overview of WoT Concepts Web Browser Protocol Bindings Resource Model App Script Runtime Environment WoT Servient Protocol Bindings Resource Model App Script Runtime Environment WoT Servient Protocol Bindings Resource Model App Script Runtime Environment Thing Description Cloud Mirror / Device Shadow Integration Hubs Thing-to-Thing Interaction Web Integration Semantic Models Standardized Scripting APIs for Apps WoT Servient Protocol Bindings Resource Model App Script Runtime Environment Thing Description Complementing Existing Devices and Platforms

7 Outline Architecture – Things, Deployment Scenarios, and Servients WoT Interface – Protocol Bindings and the Web Thing Description (TD) – Metadata and Interactions Scripting API – Runtime Environment and Portable Apps

8 WoT ARCHITECTURE Things, Deployment Scenarios, and Servients http://w3c.github.io/wot/architecture/wot-architecture.html

9 Local Thing-to-Thing Local discovery WoT server exposes “Interactions” through WoT Interface WoT client (UI or other Thing) interacts with WoT Interface

10 Remote Access Local and remote discovery Remote client gains access to local network ( IPv6, NAT traversal,... )

11 Remote Access: Integration Hubs Hub does local discovery and exposes Things Hub can provide virtual Things (e.g., rooms or sensor fusion) Hub can integrate and augment legacy devices (gateway)

12 Remote Access: Cloud Mirror WoT server is proxied in the cloud, which exposes Things Cloud can provide virtual Things (e.g., buildings or sensor fusion) Integrates with mobile app world and cloud-based IoT

13 Smart Factory / Industrial WoT also targets requirements from industrial applications

14 Automotive WoT activity is in contact with W3C Automotive work

15 Thing Implementation: WoT Servient WoT Servient Client Connector Server Connector Protocol Binding Resource Model App Script Legacy comm- unication Server APIClient API Thing Description Legacy device Legacy device Web Server Web Client Proprietary interface Runtime Environment WoT Servient Application Logic: It can access local hardware, locally connected legacy devices, and remote things through the WoT Interface. For this, the runtime environment must provide the Scripting API (Physical, Client, Server). Resource Model: Provides a common abstraction across the different protocols. Just like the Web, it allows to identify and address interaction points with URIs. Protocol Binding: Converts interactions with Things using information in TD in accordance with lower-layer protocols to have client and server connectors. Thing Description (TD): Declares WoT Interface for interaction and provides (semantic) metadata for the Thing. TD is used by WoT clients to instantiate local software object of the Thing. WoT Interface Discovery API (Propr. API)

16 WoT Servient on Thing Itself WoT Servient (Wot Device) Client Connector Server Connector Protocol Binding Resource Model Script Browser Client Connector Protocol Binding Resource Model Script Runtime Environment Runtime Env. Thing Description Native WoT Things host a servient directly TD is provided by Thing directly

17 WoT Servient on Integration Hub WoT Servient Client Connector Server Connector Protocol Binding Resource Model App Script Legacy comm. Legacy device Legacy device Browser Client Connector Protocol Binding Resource Model App Script Smart Home Hub Runtime Env.Runtime Environment Things Description WoT servients can run on hubs (e.g., smartphone, gateway) Can act as agent for legacy devices Multiple servients can be instantiated through sandboxed apps

18 WoT Servient in the Cloud Browser Client Connector Protocol Binding Resource Model App Script Runtime Envi. WoT Servient Client Connector Server Connector Protocol Binding Resource Model App Script WoT Servient Client Connector Server Connector Protocol Binding Resource Model App Script Legacy comm. Legacy device Legacy device Hub(GW) Cloud Platform Runtime Environment Thing Description Thing Description A cloud mirror / device shadow can forward interactions Cloud mirror is synchronized with local servient

19 WoT INTERFACE Protocol Bindings and the Web http://w3c.github.io/wot/current-practices/ wot-practices-beijing-2016.html#sec-wot-interface

20 WoT Interface Interface exposed by servient to the network WoT Servient WoT Interface WoT Servient WoT Interface

21 Interface exposed by servient to the network WoT Servient WoT Interface WoT Servient WoT Interface Protocol

22 Protocol Bindings Interface can be bound to various protocols WoT Servient WoT Interface HTTP Binding WoT Servient WoT Interface HTTP Binding HTTP

23 Protocol Bindings Interface can be bound to various protocols CoAP WoT Servient WoT Interface WoT Servient WoT Interface CoAP Binding

24 Protocol Bindings Multiple bindings possible WoT Servient WoT Interface WoT Servient WoT Interface HTTP Binding WS Binding WebSocket WS Binding

25 Resource Model Interaction points are Web resources WoT Servient WoT Interface WoT Servient WoT Interface Protocol Binding(s) Resource Model

26 Servient Role Servient can act as client or server WoT Servient Client Connector WoT Servient Server Connector Protocol Binding(s) Resource Model URIs http://wot.example.com/res

27 Servient Role … or both at the same time WoT Servient Client Connector WoT Servient Server Connector WoT Servient Server Con. Client Con. Protocol Binding(s) Resource Model URIs

28 THING DESCRIPTION Metadata and Interactions http://w3c.github.io/wot/current-practices/ wot-practices-beijing-2016.html#thing-description

29 I Want to Use a WoT Servient Who are you? What kind of functions do you have? What kind of data do you serve ? How can I access the data/function ? What kind of protocols/encodings do you support? Are there some security constrains?  W3C Thing Description (TD)

30 Thing Description Describes Thing metadata and interactions WoT Servient Client Connector WoT Servient Server Connector Protocol Binding(s) Resource Model

31 Thing Description Describes Thing metadata and interactions WoT Servient Client Connector WoT Servient Server Connector Protocol Binding(s) Thing Description Resource Model

32 Thing Description Machine clients can understand WoT Interface WoT Servient Client Connector WoT Servient Server Connector Protocol Binding(s) Thing Description Resource Model Metadata, URIs

33 Thing Description Thing-to-thing communication WoT Servient Client Connector WoT Servient Server Connector Protocol Binding(s) Thing Description Resource Model Metadata, URIs

34 Describe your Thing based on JSON-LD Reach interoperability by a semantic description language – based on well established JSON format – enables machine interoperability by using (standardized) vocabularies from given @context JSON-LD is rooted in the RDF model – subject, predicate, object triples

35 TD Example { "@context": [ "http://w3c.github.io/wot/w3c-wot-td-context.jsonld", { "actuator": "http://example.org/actuator#" } ], "@type": "Thing", "name": "MyLEDThing", "uris": [ "coap://myled.example.com:5683/", "http://mything.example.com:8080/myled/" ], "encodings": ["JSON", "EXI"], "security": { "cat": "token:jwt", "alg": "HS256", "as": "https://authority-issuing.example.org" }, "properties": [ { "@type": "actuator:onOffStatus", "name": "status", "valueType": { "type": "boolean" }, "writable": true, "hrefs": [ "pwr", "status" ] } ], "actions": [ { "@type": "actuator:fadeIn", "name": "fadeIn", "inputData": { "valueType": { "type": "integer" }, "actuator:unit": "actuator:ms" }, "hrefs": [ "in", "led/in" ] }, { "@type": "actuator:fadeOut", "name": "fadeOut", "inputData": { "valueType": { "type": "integer" }, "actuator:unit": "actuator:ms" }, "hrefs": [ "out", "led/out" ] } ], "events": [ { "@type": "actuator:alert", "name": "criticalCondition", "valueType": { "type": "string" }, "hrefs": [ "ev", "alert" ] } ] }

36 { "@context": [ "http://w3c.github.io/wot/w3c-wot-td-context.jsonld", { "actuator": "http://example.org/actuator#" } ], "@type": "Thing", "name": "MyLEDThing", "uris": [ "coap://myled.example.com:5683/", "http://mything.example.com:8080/myled/" ], "encodings": ["JSON", "EXI"], "security": { "cat": "token:jwt", "alg": "HS256", "as": "https://authority-issuing.example.org" }, "properties": [ { "@type": "actuator:onOffStatus", "name": "status", "valueType": { "type": "boolean" }, "writable": true, "hrefs": [ "pwr", "status" ] } ], "actions": [ { "@type": "actuator:fadeIn", "name": "fadeIn", "inputData": { "valueType": { "type": "integer" }, "actuator:unit": "actuator:ms" }, "hrefs": [ "in", "led/in" ] }, { "@type": "actuator:fadeOut", "name": "fadeOut", "inputData": { "valueType": { "type": "integer" }, "actuator:unit": "actuator:ms" }, "hrefs": [ "out", "led/out" ] } ], "events": [ { "@type": "actuator:alert", "name": "criticalCondition", "valueType": { "type": "string" }, "hrefs": [ "ev", "alert" ] } ] }

37 Type System Default currently based on JSON Schema http://w3c.github.io/wot/current-practices/ wot-practices-beijing-2016.html#type-system http://w3c.github.io/wot/current-practices/ wot-practices-beijing-2016.html#type-system Best start with simple types – boolean – integer – number – String Other systems can be plugged in under "valueType"

38 How to Create a TD? Manually copy, paste, and modify – http://w3c.github.io/wot/current-practices/ wot-practices-beijing-2016.html#td-examples http://w3c.github.io/wot/current-practices/ wot-practices-beijing-2016.html#td-examples – or look into the TD repository http://vs0.inf.ethz.ch:8080 (might be offline from time to time) http://vs0.inf.ethz.ch:8080 Generate from development framework – Serialization based on the interactions provided

39 SCRIPTING API Runtime Environment and Portable Apps http://w3c.github.io/wot/current-practices/ wot-practices-beijing-2016.html#scripting-api

40 Without Scripting API Application logic often implemented natively WoT Servient Server Connector Protocol Binding(s) Application Logic C / C++ / Java / … Resource Model Client Connector

41 Scripting API Common runtime enables portable apps WoT Servient Runtime Environment App Script Server Connector Client Connector Protocol Binding(s) Resource Model Server API Client API Disc. API

42 Common runtime enables portable apps WoT Servient Vendor B Runtime Environment WoT Servient Vendor A Runtime Environment Scripting API Server Connector Client Connector Protocol Binding(s) Resource Model Server Connector Client Connector Protocol Binding(s) Resource Model App Script Server API Client API Disc. API Server API Client API Disc. API

43 Common runtime enables portable apps WoT Servient Vendor B Runtime Environment WoT Servient Vendor A Runtime Environment Scripting API Server Connector Client Connector Protocol Binding(s) Resource Model Server Connector Client Connector Protocol Binding(s) Resource Model App Script Server API Client API Disc. API Server API Client API Disc. API

44 PARTICIPATION HOWTO How to get started? http://w3c.github.io/wot/current-practices/ wot-practices-beijing-2016.html#participation-howto

45 Pick Your Servient Role Client Role – User interface – Machine agent Server Role – Sensor/actuator – Device simulators Both (“servient”) – Configurable client – Aggregator using other Things

46 Pick Your Platform Client Role – User interfaceAngular.js and Web browser – Machine agentPython, Ruby, Java, C++, … Server Role – Sensor/actuatorArduino, ESP8266, mbed, … – Device simulatorsNode.js, Java Both – HubRaspberry Pi, smartphone – Cloud proxyJava

47 Pick Your Protocol(s) HTTP – Node.js, Jetty, RESTX.io, lighttpd, … – Platform-specific (Arduino, Contiki, NodeMCU, …) CoAP – Californium, node-coap, libcoap – Platform-specific (Contiki, mbed, NodeMCU, …) – http://coap.technology/ http://coap.technology/ Others? Design the binding! – e.g., MQTT: https://www.eclipse.org/paho/https://www.eclipse.org/paho/

48 Pick Your Logic Implementation Start with native application logic Once familiar, follow the Current Practices document for the Scripting API http://w3c.github.io/wot/current-practices/ wot-practices.html http://w3c.github.io/wot/current-practices/ wot-practices.html

49 Online Resources Interest Group – https://www.w3.org/WoT/IG/ https://www.w3.org/WoT/IG/ – https://lists.w3.org/Archives/Public/public-wot-ig/ (subscribe to mailing list) https://lists.w3.org/Archives/Public/public-wot-ig/ Documents (for implementers) – http://w3c.github.io/wot/architecture/wot-architecture.html http://w3c.github.io/wot/architecture/wot-architecture.html – http://w3c.github.io/wot/current-practices/wot-practices.html (living document) Beijing 2016 Release: http://w3c.github.io/wot/current-practices/wot-practices-beijing-2016.html http://w3c.github.io/wot/current-practices/wot-practices.html http://w3c.github.io/wot/current-practices/wot-practices-beijing-2016.html GitHub (documents and proposals) – https://github.com/w3c/wot https://github.com/w3c/wot Wiki (organizational information: WebConf calls, Face-to-Face meetings, …) – https://www.w3.org/WoT/IG/wiki/Main_Page https://www.w3.org/WoT/IG/wiki/Main_Page WoT Projects (implementing WoT Current Practices) – https://github.com/thingweb/ https://github.com/thingweb/ – https://github.com/mkovatsc/wot-demo-devices https://github.com/mkovatsc/wot-demo-devices – Please add yours!


Download ppt "Getting Started with a W3C WoT Project Eclipse Virtual IoT Meetup, 16 Jun 2016."

Similar presentations


Ads by Google