W3C Web of Things Interest Group Web of Things architecture update 12th April, 2016 Panasonic, Fujitsu
Purpose of the architecture document Shows architecture of Web of Things(WoT) Clarifies WoT common functions Clarify use cases Clarify roles of entities (devices, smartphones, gateway, cloud, etc) in use cases. Define WoT common functions by illustrating WoT functions that those entities should have. Clarify function structure based on WoT common functions. Define function details and interfaces between functions. Show requirements to other documents from architectural viewpoint Clarify requirements to Things description, Discovery, Security from architectural viewpoint. Illustrate requirements to Things description from Resource management, Protocol mapping viewpoint. Resource s binding to concrete addresses is related to discovery function. Security in WoT API and Script API. Security concerning Things description DB access. 2
Use cases (A) WoT servient on device (WoT device) An electronic appliance such as an air conditioner with WoT server is controlled by a remote controller with WoT client via a (local) home network. WoT server Electronic appliance WoT client Remote controller Discovery: local WoT client API: REST or Client API (-> IP) WoT server API: Server API 3
(B) WoT servient on Smartphone Browser (or application) with WoT client on a smartphone directly controls electronic appliances with legacy communication such as bluetooth or remotely control them depending on the location. Discovery: Remote WoT client Remote controller WoT client API: Client API(->IP) Electronic appliance WoT client Remote controller Discovery: Nearby WoT client API: Client API(->Physical Interface) 4
(C) WoT Servient on Smart Home Hub A home hub with WoT servient placed between a home network and the Internet manages electronic appliances in a house and control them when remotely receiving a command from browser (or application) with WoT Client on a smartphone. Home hub Electronic appliance WoT servient WoT client Browser or applicaiton Discovery: WoT servient: nearby WoT client: remote WoT client API: REST or Client API (-> IP) WoT servient API: Server API Client API (->Physical Interface) 5
(D) WoT Servient on Cloud Server (1) WoT servient on cloud serves as proxies of electric appliances and controls the appliances when receiving commands from browser (or application) with WoT client on a smartphone. WoT servient Proxy WoT client Browser or application Electronic appliance Discovery: WoT servient: remote WoT client: remote WoT client API: REST or Client API (-> IP) WoT servient API: Server API Client API (-> IP) 6
(D) WoT Servient on Cloud Server (2) WoT servient on cloud cashes properties of electric appliances that a home hub manages and acts as an agent that manages them in the cloud instead of the home hub. WoT servient 1 Electronic appliance Home hub WoT servient 2 agent WoT client Browser or application Discovery: WoT servient1: remote WoT servient2: nearby WoT client: remote WoT client API: REST or Client API (-> IP) WoT servient1 API: Server API Client API (-> IP) WoT servient2 API: Server API Client API (-> Physical interface) 7
(D) WoT Servient on Cloud Server (3) Smart Factory: WoT client on cloud collects data from WoT servients that are connected to factory devices. Services analyze the data and users monitor the status from a browser. Factory Services WoT client Monitor Browser RS-485 WoT servient 1 Discovery: WoT servient1: nearby WoT servient2: nearby WoT client: remote 8 EtherCAT WoT servient 2 WoT client API: REST or Client API (-> IP) WoT servient1 API: Server API Client API (-> Physical interface) WoT servient2 API: Server API Client API (-> Physical interface)
(D) WoT Servient on Cloud Server (4) Connected Car: WoT client on cloud collects data from WoT servient on a gateway that are connected to car devices through CAN and car navigation system. The service analyzes the data from cars and shows service to the car navigation systems. Services WoT client DCU WoT servient Gateway Discovery: WoT client: remote WoT servient: nearby ECU ECU CAN ECU CAN WoT client API: REST or Client API (-> IP) WoT servient API: Server API Client API (-> Physical interface) 9
(E) T2T(WoT to WoT) control A control agent on WoT Servient 1 which has a temperature sensor detects room temperature and when surpassing the threshold then turn on the air conditioner with WoT Servient 2. Control agent WoT Servient2 WoT Servient1 Discovery: WoT servient1: remote / nearby WoT servient1 API: Client API (-> IP) WoT servient2 API: Server API 10
WoT servient Structure Overview WoT servient Functions and Interfaces Functions Functions are defined by Things description(td) App script and other WoT servient refer to TD APIs Script API: Interface for App Script WoT API: Interface for external WoT Servient Legacy device API: Interface for legacy devices App script Script API WoT servient Things Description Legacy device API Legacy device WoT servient WoT API 11
Functional model of WoT servient WoT servient functions Script Execution Engine Interfaces to access devices managed by WoT servients and interfaces to other WoT servients are CRUD+Notify +Register Defines relationships between abstract interface (CRUD+Notify) and concrete protocols App script Script API App script provider Resource management Protocol mapping Device meta-data and information about connected devices are stored as Things Description Things Description Protocols used for communication with outside (e.g. HTTP) Legacy device API Communication protocol Legacy device WoT servient WoT API 12
WoT servient behavior (1) Resource management Provide CRUD+Notify+Register as abstract interfaces Create:Creates an instance device with meta-data TD associated with a concrete IP address etc, when it gets connected. Delete is for deleting instance devices. Retrieve(Read), Update(Write):Read and write to information such as properties defined by instance TD. Notify:Notify information such as events defined by instance TD. Register:Registers new meta-data TD. App script provider TD DB stores both Things description as device meta-data and instance devices assigned concrete addresses. Have interfaces to operate Resource (Things description), and interfaces for CRUD+Notify to instance devices and registering TD Resource management Things Description TD Meta data TD Instance Protocol mapping 13
WoT servient behavior (2) Protocol mapping Maps communication protocols (HTTP, MQTT etc.) to CRUD+Notify defined by Resource management. (Register, Unregister are management interface that needs separate discussion) Describes methods to realize Create or Update using HTTP framework then register as plugins. This mechanism allows Resource management interfaces to adapt to many protocols other than HTTP/MQTT. Legacy devices can also be plugged-in in a similar manner. (Dev.IF) Realizes only communication protocol conversion part that corresponds to Resource management interface. Realizes as plugins to permit future extensibility Mapping rule description for various protocols. Dev.IF is legacy device interface. 14 Resource management Protocol mapping Dev. IF HTTP MQTT Communication protocol Things Description Existing protocol stacks such as HTTP, MQTT, Dev.IF etc.
WoT servient behavior (3) App script provider Script execution engine. For scripts concerning WoT, call Resource management. For scripts concerning other WoT servient, call communication protocol or other existing interfaces. Standardize WoT architecture and Resource management interfaces, then ask browser vendors and OSS communities that develop execution engine to adopt the standard. App script App script provider Script API Resource management Things Description Protocol mapping Communication protocol 15
WoT servient behavior (4) Communication protocol Network-side interface in WoT servient Consists of communication protocols such as HTTP, MQTT, Dev.IF (legacy device) etc. All process get reported to Resource management. Referencing TD instance, hand over the next process either to Protocol mapping (property and event) or App script provider (action). Resource management has a function to dispatch processes by interpreting URIs in messages WoT servient App script provider Resource management Protocol mapping Things Description TD Meta data TD Instance Communication protocol Legacy device API Legacy device WoT servient WoT API 16
Summary Thing Description In order to simplify discussions, TD should first cover devices. Once all agreed, consider extending it. Resource management TD consists of meta-data and instance. Meta-data TD is a declaration. Upon concrete device's connection, one instance is created per device. Meta-data management, and process involving instance creation and termination need further discussion. Meta-data and instances TD that can be made public can be put on Internet. Framework to share instances is necessary to make parallel processing at each WoT possible. 17