94
Outline Introduction A Meta-Model for an eXtended WoT Conclusion A model-driven, component generation approach for an eXtended Web of Things Sneak Peak A. Ruppen 1 1 University of Fribourg Department of Informatics Software Engineering Group DIUF Symposium — Fribourg June, 2013

A model-driven, component generation approach for the xWoT

Embed Size (px)

Citation preview

Page 1: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

A model-driven, component generationapproach for an eXtended Web of Things

Sneak Peak

A. Ruppen1

1University of FribourgDepartment of Informatics

Software Engineering Group

DIUF Symposium — FribourgJune, 2013

Page 2: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

1 IntroductionRESTROAIoT and WoT

2 A Meta-Model for an eXtended WoTIntroductioneXtended WoTBuilding BlocksThe meta-model

3 Conclusion

Page 3: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Outline

1 IntroductionRESTROAIoT and WoT

2 A Meta-Model for an eXtended WoTIntroductioneXtended WoTBuilding BlocksThe meta-model

3 Conclusion

Page 4: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

REST - Representational State TransferWhat is REST

REST stands for Representational State Transfer.It is neither a new protocol nor a format but an architecturalstyle for delivering services over a network.The base idea is to use HTTP as a fully fledged applicationprotocol rather than only as a transport protocol.By that it uses the OSI stack as defined.The term goes back to Roy T. Fieldings dissertation in2000.

Page 5: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

RESTREST Principles

Client-Server Architecture.Stateless Interactions.Cache.Uniform Interface.Layered System.Code-on-demand.

Fielding’s REST principles

Page 6: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Resource Oriented ArchitecturesROA is not REST

ROA vs. RESTREST and ROA are not the same. This terminology wasintroduced by Richardson & Ruby and defines criteria whichmake a given web-service REST compliant.

Page 7: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Resource Oriented ArchitecturesPrinciples

ResourcesAddressabilityStatelessnessConnectednessUniform Interface

ROA principles

Page 8: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

IoT and WoT

Page 9: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

IoT and WoT

Page 10: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

IoT and WoT

Page 11: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

IoT and WoT IIntroduction

The IoT started with RFID tags.The idea was to tag everydays objects and give them avirtual counterpart.With the recent mass-availability of cheap powerful deviceswith limited network capabilities the IoT gained in interest.It is not anymore just about RFID tags but also aboutsensors and actuators.The aim is still to make objects smart and giving them avirtual representation.

Page 12: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

IoT and WoT IIIntroduction

However, now it is possible to act on a thing or sense athing.The IoT relays on connected smart devices (the things).However, it does not enforce any architecture or otherstructure.This lead to a highly heterogeneous situation wherecommunication is difficult.Many isolated "islands" of connected devices.

Page 13: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

IoT and WoTExample

Page 14: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Internet of ThingsDefinition

IoT - WikipediaThe Internet of Things refers to uniquely identifiable objects andtheir virtual representations in an Internet-like structure.

The term goes back to Kevin Ashton in 1999 and theAuto-ID Center.Interaction on the physical side should also reflect on thevirtual side and vice-versa.

Page 15: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Web of ThingsIntroduction

Page 16: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Web of ThingsDefinition

The Web of Things (WoT) stands on top of the IoT.It adds REST as a standard to the IoT.As a consequence, smart-devices become first classcitizens in the web.Communication is possible between smart-devices issuedfrom different sources due to the usage of RESTfulweb-services.Furthermore, the construction of mashup application isencouraged and eased.

eHealth Example

Page 17: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Simple WoT ApplicationThermistor Application

Movie

Page 18: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Mashup Applications

Page 19: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Outline

1 IntroductionRESTROAIoT and WoT

2 A Meta-Model for an eXtended WoTIntroductioneXtended WoTBuilding BlocksThe meta-model

3 Conclusion

Page 20: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoTState of Play

The WoT has been studied for quite some time now.Research has show how to exploit the resources availablein the WoT.Different approaches have been proposed to further easethe construction of mashup applications.Some research efforts have shown how to integrateresources not having a RESTful interface.Semantics have been discussed and different approachesimplemented.

Page 21: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoTOpen Questions

How resources can be put together has been well studied.All resources must have a RESTful interface.But:

How resources are structured?

What architectures are behind the RESTful interfaces?How the WoT space is divided into resources?What are the building blocks of the WoT?

are questions still open.

Page 22: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoTOpen Questions

How resources can be put together has been well studied.All resources must have a RESTful interface.But:

How resources are structured?What architectures are behind the RESTful interfaces?

How the WoT space is divided into resources?What are the building blocks of the WoT?

are questions still open.

Page 23: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoTOpen Questions

How resources can be put together has been well studied.All resources must have a RESTful interface.But:

How resources are structured?What architectures are behind the RESTful interfaces?How the WoT space is divided into resources?

What are the building blocks of the WoT?

are questions still open.

Page 24: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoTOpen Questions

How resources can be put together has been well studied.All resources must have a RESTful interface.But:

How resources are structured?What architectures are behind the RESTful interfaces?How the WoT space is divided into resources?What are the building blocks of the WoT?

are questions still open.

Page 25: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoTState of Play and Open Questions

Page 26: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoTState of Play and Open Questions

Page 27: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

eXtended WoTMotivation I

Why an eXtended WoT?It is foreseeable that in a not-so-far future, there will bemore devices participating on the Web than humans.These smart-devices are producing huge amounts of data.Therefore, we need a mechanism to aggregate the databefore consuming it.Service-only resources play a major role in the near future.We don’t always have access to the tag in order to accessthe resource.

Page 28: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

eXtended WoTMotivation II

A resource may exist without having access to the physicalside (eg. Patient Resource).Increasing need for adding purely virtual goods likeMarketplace applications, algorithms, business processes(code re-use).

Today Sensors, Actuators and Tags are first-class citizensof the WoT, we argue that the same should be true forAlgorithms, Decomposable Delayed Services andBusiness Processes.

Page 29: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

eXtended WoTMotivation II

A resource may exist without having access to the physicalside (eg. Patient Resource).Increasing need for adding purely virtual goods likeMarketplace applications, algorithms, business processes(code re-use).Today Sensors, Actuators and Tags are first-class citizensof the WoT, we argue that the same should be true forAlgorithms, Decomposable Delayed Services andBusiness Processes.

Page 30: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

eXtended WoTDefinition

The eXtended WoT embraces the WoT as it is defined todaybut adds virtual only goods to it. The latter have the sameprivileges as sensors, actuators and tags and are treated asfirst class citizens of the xWoT.Finally, a client is not able to decide whether a given piece ofinformation is returned by a physical device or through analgorithm. Such virtual goods range from simple algorithms(unit conversion) to decomposable, possibly delayed servicesand business processes.

Page 31: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

eXtended WoT Trinity

Page 32: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksSensors, Actuators and Tags

Smart-devices (aka Things) are the building blocks of theWoT.They are made of:

some electronics (device side) andsome communication capabilities (smart side)

Additionally, we can look at a smart-device as having:an inner structure made of sensors, actuators, tags andalgorithms anda well defined interface with the outer world.

By that a smart-device is twofold.

Page 33: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksComponents I

Component based architecture is a widely acceptedapproach for designing loosely coupled systems.A component has a well defined interface with the outerworld.Its inner guts remain hidden.Over its interface, a component can communicate withother pieces of software however, how a componentachieves a given task is not important.By that a component is twofold.Components can be used to model WoT applications.

Page 34: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksComponents II

Sensors, actuators, tags and algorithms being looselycoupled it seems natural to structure them following thecomponent based architectures.Components allow for a clear division of the space intoindependent entities.Each entity can be exchanged with a new one, as long asthe RESTful interface remains the same.As such a component represent the smallestdistinguishable entity of the WoT.

Page 35: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksComponents III

Page 36: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksMashup Applications I

Components can be combined in various manners to givebirth to new creative applications (Winds of Fukushima,EPCIS etc).Such combinations are called Mashup-Applications.The idea behind is to take what is already there and mix itup in a new way to create new applications.How this can be achieved has been well studied for quitesome time now.Approaches may be as simple as doing all the necessary"connections" by hand or they may integrated advanceddesign tools where smart-devices can be combined in adrag-n-drop manner (Yahoo Pipes).

Page 37: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWot Building BlocksMashup Applications II

Page 38: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWot Building BlocksMashup Applications II

Page 39: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksMeta-Model

Instead of looking what is above the components level wecan look at how components are structured.This involves simultaneously its inner guts as well as itsouter interface.The meta-model takes care of

Structuring the inner guts of each component.

Guiding the structure of a component’s outer interface.Defining a clear vocabulary.Providing guidelines for application architects.

Page 40: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksMeta-Model

Instead of looking what is above the components level wecan look at how components are structured.This involves simultaneously its inner guts as well as itsouter interface.The meta-model takes care of

Structuring the inner guts of each component.Guiding the structure of a component’s outer interface.

Defining a clear vocabulary.Providing guidelines for application architects.

Page 41: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksMeta-Model

Instead of looking what is above the components level wecan look at how components are structured.This involves simultaneously its inner guts as well as itsouter interface.The meta-model takes care of

Structuring the inner guts of each component.Guiding the structure of a component’s outer interface.Defining a clear vocabulary.

Providing guidelines for application architects.

Page 42: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksMeta-Model

Instead of looking what is above the components level wecan look at how components are structured.This involves simultaneously its inner guts as well as itsouter interface.The meta-model takes care of

Structuring the inner guts of each component.Guiding the structure of a component’s outer interface.Defining a clear vocabulary.Providing guidelines for application architects.

Page 43: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksSummary

The above considerations leave us with a three layeredapproach.

From bottom up these are:

The Meta-Model structuring theComponents, which when combined formMashup-Applications.

If the bottom two layers follow clearly defined patterns, thecreation of mashup-applications is greatly simplified.

Page 44: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksSummary

The above considerations leave us with a three layeredapproach.From bottom up these are:

The Meta-Model structuring theComponents, which when combined formMashup-Applications.

If the bottom two layers follow clearly defined patterns, thecreation of mashup-applications is greatly simplified.

Page 45: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksSummary

The above considerations leave us with a three layeredapproach.From bottom up these are:

The Meta-Model structuring the

Components, which when combined formMashup-Applications.

If the bottom two layers follow clearly defined patterns, thecreation of mashup-applications is greatly simplified.

Page 46: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksSummary

The above considerations leave us with a three layeredapproach.From bottom up these are:

The Meta-Model structuring theComponents, which when combined form

Mashup-Applications.

If the bottom two layers follow clearly defined patterns, thecreation of mashup-applications is greatly simplified.

Page 47: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksSummary

The above considerations leave us with a three layeredapproach.From bottom up these are:

The Meta-Model structuring theComponents, which when combined formMashup-Applications.

If the bottom two layers follow clearly defined patterns, thecreation of mashup-applications is greatly simplified.

Page 48: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Building BlocksSummary

The above considerations leave us with a three layeredapproach.From bottom up these are:

The Meta-Model structuring theComponents, which when combined formMashup-Applications.

If the bottom two layers follow clearly defined patterns, thecreation of mashup-applications is greatly simplified.

Page 49: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

xWoT Trinity Revisited3-layered Approach

Page 50: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Meta-ModelingDefinition I

3-layered approach.From bottom-up:

Subjects under study (SUS). These are called endeavors.

Models describing endeavors.Models describing models.

Take UML as example.UML can model endeavors.UML is also its own meta-model.UML identifies the main components (for example in aclass diagram) and their relations.

Page 51: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Meta-ModelingDefinition I

3-layered approach.From bottom-up:

Subjects under study (SUS). These are called endeavors.Models describing endeavors.

Models describing models.

Take UML as example.UML can model endeavors.UML is also its own meta-model.UML identifies the main components (for example in aclass diagram) and their relations.

Page 52: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Meta-ModelingDefinition I

3-layered approach.From bottom-up:

Subjects under study (SUS). These are called endeavors.Models describing endeavors.Models describing models.

Take UML as example.UML can model endeavors.UML is also its own meta-model.UML identifies the main components (for example in aclass diagram) and their relations.

Page 53: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Meta-ModelingDefinition I

3-layered approach.From bottom-up:

Subjects under study (SUS). These are called endeavors.Models describing endeavors.Models describing models.

Take UML as example.UML can model endeavors.UML is also its own meta-model.UML identifies the main components (for example in aclass diagram) and their relations.

Page 54: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Meta-ModelingDefinition II

As a model aims to describe common structures for a class ofSUS, which can then be translated into different instances ofcode, a meta-model defines the common structures andavailable elements of all models.

Definition - WikipediaMetamodeling, or meta-modeling in software engineering andsystems engineering among other disciplines, is the analysis,construction and development of the frames, rules, constraints,models and theories applicable and useful for modeling apredefined class of problems.

Page 55: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoT Meta-ModelFormalization I

Preliminary ConsiderationsThe meta-model is tailored for the WoT, therefore we areonly dealing with RESTful Web-Services.It takes into consideration an xWoT, as presented before.This leaves us with two types of services:

Services tied to a device (or a conglomerate of devices) andServices related to algorithms of interest for the WoT.

We call the first category of services Physical Services andthe second Virtual Services.Suppose that the space is already divided intocomponents, each one representing an entity of interest.

Page 56: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoT Meta-ModelFormalization II

Page 57: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoT Meta-ModelValidation I

Smart Light Bulb

Page 58: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoT Meta-ModelBenefits I

The Meta-Model allows the instantiation of concretemodels as shown in the example.From the model, executable code can be generated.The generated code is based on Java using the Jerseyframework.Currently the tools are still a little bit rough around theedges but, they work fine for a proof-of-concept.Using the meta-model as a base for all future model allowsfor a better structure of the different components.The meta-model takes care of the inner guts and the outerinterface of each container.

Page 59: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

WoT Meta-ModelBenefits II

The meta-model introduces a standard way of naming thedifferent bricks composing the WoT.The meta-model clearly shows the relation between thesebricks.Having a well defined structure of the building blocksmakes the creation of mashup applications easier.The meta-model does not destroy the loose couplingbetween different WoT components, instead it supportsmashup-applications by providing standards on how tostructure the building blocks.

Page 60: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Outline

1 IntroductionRESTROAIoT and WoT

2 A Meta-Model for an eXtended WoTIntroductioneXtended WoTBuilding BlocksThe meta-model

3 Conclusion

Page 61: A model-driven, component generation approach for the xWoT

Outline Introduction A Meta-Model for an eXtended WoT Conclusion

Conclusion

The WoT as we know it today has proven its usability overthe past few years and many problems have beenaddressed.However most of them related to the "top" part of our3-layered model.The WoT has to grow up and needs to embrace somestandards.One of these standards is the meta-model and thecomponent driven approach to structure the underlyingbricks.The WoT should not be separated from the rest of the web.Instead it should be part of the web.The idea of an eXtended WoT is supporting this vision: theWoT embraces not only Things but also virtual goods.

Page 62: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

Outline

4 Example: eHealth

5 REST as Roy T. Fielding

6 Resource Oriented Architectures

7 History of Web

Page 63: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

CaregivingPast

[Source:http://www.flickr.com/photos/21734563@N04/2170058921/] Back

Page 64: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

CaregivingToday

[Source: http://jordanpaulmorris.blogspot.ch/2012_01_01_archive.html] Back

Page 65: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

CaregivingTomorrow

[Source:http://jasonmillar.ca/ethicstechnologyandsociety/2012/03/28/its-time-to-move-beyond-ehealth/] Back

Page 66: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

CaregivingTomorrow

[Source:http://jasonmillar.ca/ethicstechnologyandsociety/2012/03/28/its-time-to-move-beyond-ehealth/] Back

Page 67: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

CaregivingTomorrow

[Source:http://jasonmillar.ca/ethicstechnologyandsociety/2012/03/28/its-time-to-move-beyond-ehealth/] Back

Page 68: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

CaregivingTomorrow

[Source:http://jasonmillar.ca/ethicstechnologyandsociety/2012/03/28/its-time-to-move-beyond-ehealth/] Back

Page 69: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

Smart Alert for a medical laboratoryImproved Workflow

Back

Page 70: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

Smart Alert for a medical laboratoryImproved Workflow

Back

Page 71: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

Smart Alert for a medical laboratoryImproved Workflow

Back

Page 72: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

The original SystemDesign Considerations

The system deployed at the hospital before starting thisproject was composed of two parts:

A windows client andthe AMLS! (AMLS!)

At least the AMLS! had to be maintained by the newsystem.The system has to adapt to new devices easily.The implementation should be platform-independent.

Back

Page 73: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

Additional ResourcesResourcemodel

Back

Page 74: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

Outline

4 Example: eHealth

5 REST as Roy T. Fielding

6 Resource Oriented Architectures

7 History of Web

Page 75: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

RESTREST Principles

Client-Server ArchitectureSeparation from the user interface from data. This has manyadvantages: many clients can use the service at the same time.Servers can scale accordingly to the number of clients. Thedevelopment of the client and the server is independent.

Back

Page 76: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

RESTREST Principles

Stateless InteractionsThe server does not store any information about the client.Upon each request a client has to send all the necessaryinformation the server may need to fulfill the operations. Thinkof Basic Authentication.

Back

Page 77: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

RESTREST Principles

CacheA client can not tell whether the information comes directly fromthe server or from any instance between him and the serverholding an up-to-date copy of this piece of information. Thisgreatly reduces the network traffic.

Back

Page 78: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

RESTREST Principles

Uniform InterfaceEach service uses the same set of operations a client canperform. This eliminates the need to build specific clients forspecific services. All speak the same language which greatlysimplifies service consumption.

Back

Page 79: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

RESTREST Principles

Layered SystemEach service is separated into different layers and participantsonly see its direct interacting partner. A user only sees theweb-server whereas the web-server sees the database layerand so on. This is today a common approach in n-tierapplications.

Back

Page 80: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

RESTREST Principles

Code-on-DemandSome of the client logic is already prepared and the client candownload these pieces of code. This is the only optional RESTprinciple. It was also adopted for other technologies like JavaWebstart.

Back

Page 81: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

RESTImplementation and Usage

The most known implementation of REST is HTTP.HTTP respects all of the mentioned principles.Every web-browser is a REST client.By surfing on the web, we use REST-like interactions everyday.Not all interactions are strict REST: PHP for example usesequally POST and PUT for parameter transmission.

Back

Page 82: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

Outline

4 Example: eHealth

5 REST as Roy T. Fielding

6 Resource Oriented Architectures

7 History of Web

Page 83: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

ROAKey Principles of REST Architecture

Resource"A resource is anything that is important enough to bereferenced as a thing in itself" (Richardson)It is the atomic entity of a RESTful web-service and by thatthe smallest item that can be addressed.It can be seen like an object in OOP.

Back

Page 84: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

ROAKey Principles of REST Architecture

AddressabilityEvery resource must be uniquely accessible.The same data can be exposed by several resourceshowever, each resource has a unique identification overwhich it can be addressed.URIs are organized in a hierarchical manner and can bemeaningful.This allows a client to "guess" the URI of related andsimilar resources.

Back

Page 85: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

ROAKey Principles of REST Architecture

StatelessnessThe interaction between a client and the server is stateless.Upon each request, the client has to send all thenecessary information to fulfill the request.This greatly simplifies the server logic.Different clients can implement different behaviors basedon client-sessions.

Back

Page 86: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

ROAKey Principles of REST Architecture

ConnectednessHypertext as the Engine of Application State (HATEOAS).All subsequent resources can be discovered through linkscontained in the representation of the first retrievedresource.This principle is highly related to how the web works today:Upon landing on one side, a user can continue browsingand discover related content by clicking on links.

Back

Page 87: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

ROAKey Principles of REST Architecture

Uniform InterfaceUse HTTP verbs to define the action to execute on a givenresource.HTTP "methods should always do what they are ought todo".Use these verbs correctly (POST vs PUT).Respect idempotence of GET, PUT and DELETE.Respect safety of GET.

Back

Page 88: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

Outline

4 Example: eHealth

5 REST as Roy T. Fielding

6 Resource Oriented Architectures

7 History of Web

Page 89: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

The history of the WebThe Web

The Web is based on HTTP (Hypertext Transfer Protocol).The history of HTTP goes back to Tim Berners Lee andthe CERN.It’s first version was 0.7 and was part of the set of protocolsfor the world wide web project.At that time only HTML (HyperText Markup Language)documents could be transmitted.Since then HTML and HTTP are the building block of theWeb as we know it today.Currently HTTP is at version 1.1, based on RFC (Requestfor comment) 2616.One of the main contributors is Roy T. Fielding.

Page 90: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

The history of the Web IEvolution of the Web

Since the beginning we have seen 3 major “types” of the Web.

Web 1.0The Web 1.0 is the Web as proposed by Tim B. Lee. It’spurpose is to transmit static documents over the network. Thecontent was mainly simple HTML documents on servers.

Page 91: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

The history of the Web IIEvolution of the Web

Page 92: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

The history of the Web IEvolution of the Web

Web 1.5The Web 1.5 is dominated by CGI (Common GatewayInterface) Scripts allowing dynamic content to be served. Themost prominent implementation of this approach is PHP(Personal Home Page Tool). Also Javascript emerged as clientside scripting language and allows all sorts of unreasonablyusage to “enhance” the look of web-pages.

Page 93: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

The history of the Web IEvolution of the Web

Web 2.0Social acceptance and broadband internet connections lead tonew approaches on how data is consumed and produced. Theuser becomes active is the primary source of new content. Theweb grows and many services are for free in exchange ofinformation gathered directly from the user. Social aspectsgrow in interest.

Page 94: A model-driven, component generation approach for the xWoT

Example: eHealth REST as Roy T. Fielding Resource Oriented Architectures History of Web

The history of the Web IIEvolution of the Web

(j) Twitter (k) Youtube

(l) Facebook