restdesc – efficient runtime service discovery and consumption

34
ELIS – Multimedia Lab RESTdesc Efficient runtime service discovery and consumption. Ruben Verborgh, Thomas Steiner, Davy Van Deursen, Rik Van de Walle, Joaquim Gabarró Vallés

Upload: ruben-verborgh

Post on 05-Dec-2014

636 views

Category:

Education


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: RESTdesc – Efficient runtime service discovery and consumption

ELIS – Multimedia Lab

RESTdescEfficient runtime service

discovery and consumption.

Ruben Verborgh, Thomas Steiner,

Davy Van Deursen, Rik Van de Walle, Joaquim Gabarró Vallés

Page 2: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

2

Talking with others is difficultwhen you’re different.

© Jule Berlin

Page 3: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

3

The goal is notto blend in…

© Eric Vest

Page 4: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

4

…but tostand out.

© Nicholas Kreidberg

Page 5: RESTdesc – Efficient runtime service discovery and consumption

What makes a Web servicestand out from others?

Functionality.

Page 6: RESTdesc – Efficient runtime service discovery and consumption

Capturing functionality

is vital for automated

service consumption.

Page 7: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

7

1. Why? – need and challenges

2. What? – syntax and structure

3. So what? – benefits and potential

RESTdescEfficient runtime service

discovery and consumption.

Page 8: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

8

1. Why? – need and challenges

2. What? – syntax and structure

3. So what? – benefits and potential

RESTdescEfficient runtime service

discovery and consumption.

Page 9: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

9

photo height service

send a photo, retrieve its height in pixels

768

Example service: calculating photo height

Page 10: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

10

FACT: there are already lots of ways to describe that

• the input is an image;

• the output is a height in pixels.

FACT: none of them really helps... wait?

Several service description methods exist.

Page 11: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

11

What height in pixels?

• The height of the face rectangle in the image?

• The optimal height on a certain mobile device?

• The height of the costume, mysteriously converted to pixels?

53 768 23.489

They don’t describe functionality.

Page 12: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

What height in pixels?Only the functional relation tells us this:

send a photo, retrieve its height in pixels

12

768

Functional descriptions tell the whole story.

Page 13: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

13

1. Why? – need and challenges

2. What? – syntax and structure

3. So what? – benefits and potential

RESTdescEfficient runtime service

discovery and consumption.

Page 14: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

14

• HTTP

• resources

Ingredients of RESTdesc

Page 15: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

15

768

http://example.com/images/wolfieThis is a resource.

http://example.com/images/wolfie/heightThis is a resource, too.

They’re even the same resourcesas those on the Semantic Web:“Resource Description Framework”.

REST-style HTTP is resource-oriented.

Page 16: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

16

• HTTP

• resources

• Notation3 (N3)

• small superset of RDF

Ingredients of RESTdesc

Page 17: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

   

:MyPhoto  :a  :Photo.                                                                                                            

17

Everything in RDF has 3 parts.

subject verb object

Page 18: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

RDF is organized in vocabularies.

@prefix  :  <http://example.org/photo/>.  @prefix  rdf:  <http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#>.@prefix  dbpedia:  <http://dbpedia.org/resource/>.

:MyPhoto  rdf:type  dbpedia:Photo.                                                                                                            

18

Page 19: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

19

• HTTP

• resources

• Notation3 (N3)

• small superset of RDF

• your own vocabulary

Ingredients of RESTdesc

Page 20: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

20

photo height service

send a photo, retrieve its height in pixels

768

How do we describe this functionality?

Page 21: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

21

{    ?photo  :photoId  ?id.}=>{      _:request  http:methodName  "GET";                          tmpl:requestURI  ("/photos/"  ?id  "/height");                          http:resp  [  tmpl:represents  ?pixels  ].      ?photo  :height  ?pixels.}.

Photo height service in RESTdesc

@prefix  :  <http://restdesc.no.de/ontlogies/photos#>.@prefix  http:  <http://www.w3.org/2006/http#>.@prefix  tmpl:  <http://purl.org/restdesc/http-­‐template#>.

Not a new model.This is RDF in Notation3,

a Semantic Web language.

Page 22: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

{    ?photo  :photoId  ?id.}=>{      _:request  http:methodName  "GET";                          tmpl:requestURI  ("/photos/"  ?id  "/height");                          http:resp  [  tmpl:represents  ?pixels  ].      ?photo  :height  ?pixels.}.

22

Photo height service in RESTdesc

If your photohas identifier “wolfie”...

“wolfie”

Page 23: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

23

Photo height service in RESTdesc

... then ...

{    ?photo  :photoId  ?id.}=>{      _:request  http:methodName  "GET";                          tmpl:requestURI  ("/photos/"  ?id  "/height");                          http:resp  [  tmpl:represents  ?pixels  ].      ?photo  :height  ?pixels.}.

Page 24: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

24

Photo height service in RESTdesc

...you can use HTTP to get/photos/wolfie/height...

{    ?photo  :photoId  ?id.}=>{      _:request  http:methodName  "GET";                          tmpl:requestURI  ("/photos/"  ?id  "/height");                          http:resp  [  tmpl:represents  ?pixels  ].      ?photo  :height  ?pixels.}.

Page 25: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

...and the response willrepresent a value...

{    ?photo  :photoId  ?id.}=>{      _:request  http:methodName  "GET";                          tmpl:requestURI  ("/photos/"  ?id  "/height");                          http:resp  [  tmpl:represents  ?pixels  ].      ?photo  :height  ?pixels.}.

25

Photo height service in RESTdesc

768

Page 26: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

{    ?photo  :photoId  ?id.}=>{      _:request  http:methodName  "GET";                          tmpl:requestURI  ("/photos/"  ?id  "/height");                          http:resp  [  tmpl:represents  ?pixels  ].      ?photo  :height  ?pixels.}.

26

Photo height service in RESTdesc

...which isthat photo’s height.

768

“wolfie”

Page 27: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

{    ?photo  :photoId  ?id.}=>{      _:request  http:methodName  "GET";                          tmpl:requestURI  ("/photos/"  ?id  "/height");                          http:resp  [  tmpl:represents  ?pixels  ].      ?photo  :height  ?pixels.}.

27

This description contains everything you need.

It’s that simple.And it’s that powerful.

768

“wolfie”“wolfie”

Page 28: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

28

1. Why? – need and challenges

2. What? – syntax and structure

3. So what? – benefits and potential

RESTdescEfficient runtime service

discovery and consumption.

Page 29: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

29

They rely on HTTP and HTTP best practices.

• resource-oriented

They use the vocabulary you choose.

• descriptions adapts to your domain

They describe only what you need.

• concepts live in vocabularies• “height” is an integer, expresses a length in pixels

RESTdesc descriptions are simple, because…

Page 30: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

30

They use the Resource Description Framework.• logically sound

• allows complex expressions

• interoperable with other services and data

They can be composed by generic reasoners.

• all N3 reasoners understand RESTdesc• enables goal-driven service composition

RESTdesc descriptions are powerful, because…

Page 31: RESTdesc – Efficient runtime service discovery and consumption

RESTdesc enables

straightforwardautomated use of services.

Page 32: RESTdesc – Efficient runtime service discovery and consumption

Seeing services as resources

leads to elegantfunctional descriptions.

Page 33: RESTdesc – Efficient runtime service discovery and consumption

In functional descriptions,

services are not defined by what they look like…

Page 34: RESTdesc – Efficient runtime service discovery and consumption

RESTdescEfficient runtime service discovery and consumption.

ELIS – Multimedia Lab

34

…but bywhat they do.

http://restdesc.org/