2. Overview
• Vision
• Historical and Technological Background
• The xWoT
• A component approach for the xWoT
• Meta-Modeling
• The xWoT Compiler
• Methodology
• Outlook
4. Vision
• Instead of finding better approaches on how to combine smart
devices we have to re-think how to build smart devices.
• The current WoT needs to be extended to take into consideration
algorithms and handle events gracefully.
• Re-usable and easy to deploy components, taking care of aspects
like events (and discovery in the future) are the way out of the
“things-crisis”.
• Adopt Model Driven Architecture.
7. Software Components
• According to Cox the solution to the software crisis in the
early 80’s.
• A software component is a unit of composition with
contractually specified interfaces and explicit context
dependencies only. A software component can be
deployed independently and is subject to composition by
third parties. (Szyperski)
11. WoT Problems
• Data Integration: Treat Algorithms and other RESTful
services as first class citizens.
• Event Architecture: Define a common event architecture
suitable for a wide range of applications.
• Building Blocks: Introduce components as the building
blocks of the xWoT.
12. Formal Definition
• The extended WoT is a web made of sensors, actuators and tags
forming the classical WoT plus services respecting RESTful
principles.
• The aim of the xWoT is to introduce a standard approach on how to
design the building blocks for novel applications and mashups
exploiting the capabilities offered by smart things and other virtual
goods. To achieve this goal, the xWoT introduces a component-
based methodology which is underlined by a meta-model guiding the
developers during crucial architectural decisions. Finally, since the
architecture respects the xWoT’s meta-model, component skeletons
are generated out of the specifications.
15. Expected Output
• One component representing the floor.
• One component for each instantiated door.
16. SmartDoor Component
http://service1.com/door/ GET
http://service1.com/door/oc/ GET / PUT
http://service1.com/door/oc/pub/ various
http://service1.com/door/lu/ GET / PUT
http://service1.com/door/lu/pub/ various
SmartFloor
http://service2.com/floor/ GET
http://service2.com/floor/{id} GET
http://service2.com/floor/{id}/oc GET / PUT
http://service2.com/floor/{id}/oc/pub/ various
http://service2.com/floor/{id}/lu/ GET / PUT
http://service2.com/floor/{id}/lu/pub/ various
28. Model Enhancer
• Since there is a one-to-one mapping from the Physical Entity
to the Virtual Entity, for each physical model, its virtual side
can be generated.
• The generated virtual side can be further refined manually.
• Takes as input an xWoT Model and generates a new, enhanced
xWoT Model.
• Where additional information is needed, the compiler asks for
user input.
31. Model Compiler
• Once the model finished, it can be compiled into code
skeletons.
• The compiler takes care of:
• Resources hierarchy.
• Allowed Methods.
• It can generate:
• Python Code (Autobahn)
• Node.js
• Etc.
32. Model Compiler
• Takes as input an xWoT model and automatically
generates a REST service for each component.
• Each components contains code skeletons to be filled in
by the developer.
34. Reusability
• The Compiler takes care of the reusability of the
generated components.
• For each Composite, the compiler takes care to create a
new RESTful service (if necessary)
• The Compiler takes care of the Application Scenario
Service
38. Three Steps
• Entity Modeling (blue)
• Data Modeling (green)
• Implementation (yellow)
39. Methodology
Implement HTTP
Responses
Define Entity
Model Entity
Physical
2
Virtual
REST
Skeleton
Model
Physical Entity
Model
Virtual Entity
Refine
Virtual Entity
Create Sever
Skeleton
Link Code to
Hardware
Build
Hardware
Model Representations
Create
XSD
Create Code
Artifacts
Model Database
Create
ERM
Forward
Engineer
DB
Create
Code
Artifacts
40. Entity Modeling
• Derive an xWoT
compatible Model from
the Use-Case diagrams.
• Refine the generated
enhanced Model.
• Compile the xWoT
Model to Code
Skeletons.
41. Data Modeling
• Describe Inputs and Outputs in a
generic way (XML Schemas,
Database Definition)
• Derive implementations from
these schemas.
42. Implementation
• Create one Application Scenario Service.
• Create one Service for each Component.
• Implement the Hardware.
• Fill in the missing parts in the generated skeletons.
• Link the Hardware to the REST service.
44. Future Work
• Filtering of events for WebHook clients with a DSL.
• What about Discovery?
• What about Semantics?
• Intelligent Discovery
• Late Binding in Mashup Applications
Editor's Notes
According to the time magazine the most trending topic at CES Las Vegas 2015
The WoT enhances physical objects with a virtual counterpart representing the latter in the virtual world. In contrast with the IoT, the WoT mandates the strict application of RESTful principles to its APIs.
MDA to introduce Naming convention and definitions
Technical evolution
Cultural evolution
New total headers
New total status codes (40)
Thus α is a one-to-many mapping
Thus α′ is a one-to-many mapping
α and α′ being homomorphisem (f(ab)=f(a)f(b)) then α′’: SUS -> MM is a homomorphism. Thus The meta-model still contains the important properties of the SUS
Already today services like Facebook are heavily used in mashup applicationss => integrate them
Each resource capable of generating events, gets a subresource: pub/ under which a WebSocket endpoint plus a WebHook is available.
Much work has been done on how to combine different RESTful things into what is called mashup applications. Yet mashups are not a new concept. S. Watt calls them situational application.
Discuss Hub vs. Mashup -> key to reusability
The aggregation level of the doors is combined with the floor component.
We want to model several light bulbs. Not efficient for each device to offer the Global State. Furthermore the Ligthswitch and the Presence detector should be two devices.
Yet, the topmost use-case is missing -> application scenario service. However here we can combine the Application Scenario Service with the Algorithms service and use it as entry point.
Talk about Maven and Ruby.
Recursions everywhere, basically it is a mess.
All are valuable but none guides the developer through the process of creating re-usable components.
Show figure of source code. We have formally defined a meta-model tailored for the xWoT.
Introduces a clear vocabulary –> Naming elements but also show their relation.
Explain one-to-one mapping.
Explain Composite Pattern (why is it different on the virtual side)
Composition is key to reusabilty.
istinction to be made between devices with a physical counterpart in the form of a smart device (sensor, actuator and tag) and devices with no attached smart devices but grouping several of them -> Key to reusability