A component based architecture for the Web of Things

25
Workshop Slides All slides will be Available After the Worksohp on http://webofthings.org/ events/wot/ 10/27/15

Transcript of A component based architecture for the Web of Things

Page 1: A component based architecture for the Web of Things

Workshop Slides■ All slides will be

Available After the Worksohp on

■ http://webofthings.org/events/wot/

10/27/15

Page 2: A component based architecture for the Web of Things

A COMPONENT BASED APPROACH FOR THE WEB OF

THINGS

10/27/15

Page 3: A component based architecture for the Web of Things

What’s missing

■ 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.

10/27/15

Page 4: A component based architecture for the Web of Things

Data Integration

■ Classic WoT– Smart devices– Sensors, Actuators

■ Classic Web– Google– Facebook– Yahoo Weather API

■ eXtended WoT as combination of

– Classic WoT &– Classic Web

Everything that is machine consumable -> xWoT

10/27/15

Page 5: A component based architecture for the Web of Things

Events

■ Today: use of IoTaaS platforms like Xively.■ Problem: smart-devices are no longer WoT compliant.

Instead the IoTaaS platform is.■ Events must propagate in an (energy) efficient manner.– Webhooks: spare events, alerting– WebSockets: many events, live monitoring

10/27/15

Page 6: A component based architecture for the Web of Things

Building Blocks

■ (Software) Components as bricks of the xWoT.

■ Components are key to re-usability.

■ Components need to follow guidelines and best-practices.

Mashup

xWoTComponent

xWoTComponent

ActuatorsSensors

Tags Algorihms

xWoT Meta Model

10/27/15

Page 7: A component based architecture for the Web of Things

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.– Allow models to be enhanced semantically.

10/27/15

Page 8: A component based architecture for the Web of Things

Full xWoT Model

Virtual Entity

Resource

Actuator Resource

Sensor Resource

Service Resource

1..*

Publisher Resource

Context Resource

Physical Entity

Entity

0..1 1

DeviceTag SensorActuator

1..*

name: EStringmethod: MethodOperationoutput: MethodOutputinput: MethodInput

Method

style: MethodStyleMethodParam

style: MethodStyleVEntityParam

name: EStringtype: EString

ParamTEMPLATEQUERY

MethodStyleXMLJSONMULTIPARTRELATEDFORMNONE

MethodInputXMLJSONMULTIPARTRELATEDFORMNONE

MethodOutputGETPUTPOSTDELETE

MethodOperation

0..* 0..*

0..*

10/27/15

Page 9: A component based architecture for the Web of Things

SMART DOORExample Use-Case

10/27/15

Page 10: A component based architecture for the Web of Things

Smart Door Example (UC)

10/27/15

Page 11: A component based architecture for the Web of Things

Smart Door Example (M)

10/27/15

Page 12: A component based architecture for the Web of Things

Smart Door Example (M)

10/27/15

Page 13: A component based architecture for the Web of Things

Smart Door Example (M)

10/27/15

Page 14: A component based architecture for the Web of Things

Smart Door Example (M)

10/27/15

Page 15: A component based architecture for the Web of Things

Smart Door Example (M)

10/27/15

Page 16: A component based architecture for the Web of Things

COMPILERA Model Compiler for the xWoT

10/27/15

Page 17: A component based architecture for the Web of Things

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.

10/27/15

Page 18: A component based architecture for the Web of Things

Smart Door Example (rev)

10/27/15

Page 19: A component based architecture for the Web of Things

Smart Door Example (rev)

10/27/15

Page 20: A component based architecture for the Web of Things

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.

10/27/15

Page 21: A component based architecture for the Web of Things

Smart Door Example (rev)

10/27/15

Page 22: A component based architecture for the Web of Things

Reusability

■ The compiler takes care of:– The reusability of the generated components.– To create a new restful service for each composite (according to

the composed flag).– Of the application scenario service

10/27/15

Page 23: A component based architecture for the Web of Things

Smart Room Example (Revisited)

10/27/15

Page 24: A component based architecture for the Web of Things

Smart Room Example (Revisited)

10/27/15

Page 25: A component based architecture for the Web of Things

Future Work

■ Bring the different projects together– S2mashup– Semantics– Discovery– Meta-model

■ Propose a fully integrated tool for developers as well as for end users to either create new smart things or exploit deployed ones.

10/27/15