Professional Documents
Culture Documents
Techniques For Composing REST Services: Cesare Pautasso Faculty of Informatics University of Lugano, Switzerland
Techniques For Composing REST Services: Cesare Pautasso Faculty of Informatics University of Lugano, Switzerland
Techniques For Composing REST Services: Cesare Pautasso Faculty of Informatics University of Lugano, Switzerland
Cesare Pautasso
Faculty of Informatics
University of Lugano, Switzerland
c.pautasso@ieee.org
http://www.pautasso.info
Abstract
Novel trends in Web services technology challenge
the assumptions made by current standards for
process-based service composition. For example,
most existing RESTful Web service APIs (which do
not rely on the Web Service Description Language),
cannot natively be composed using the WS-BPEL
language.
In this talk we introduce the problem of composing
RESTful services and compare it to Web 2.0 service
mashups. We cover several real-world examples
demonstrating how existing composition languages
can be evolved to cope with REST. We conclude by
showing that the uniform interface and hyper-
linking capabilities of RESTful services provides an
excellent abstraction for exposing in a controlled
way the state of business process as a resource.
©2009 - Cesare Pautasso 2
About Cesare Pautasso
Assistant Professor at the Faculty of Informatics,
University of Lugano, Switzerland (since Sept 2007)
Research Projects:
SOSOA – Self- Organizing Service Oriented Architectures
CLAVOS – Continuous Lifelong Analysis and Verification of
Open Services
BPEL for REST
Researcher at IBM Zurich Research Lab (2007)
Post- Doc at ETH Zürich
Software:
JOpera: Process Support for more than Web services
http://www.jopera.org/
Ph.D. at ETH Zürich, Switzerland (2004)
Representations:
http://www.pautasso.info/ (Web)
http://twitter.com/pautasso/ (Twitter Feed)
service reuse
©2009 - Cesare Pautasso 4
REST and Reuse
2. Example: DoodleMap
Proxy
User Agent Origin Server
Gateway
Adding Caching
HTTP HTTP
Caching Caching
User Agent Origin Server
HTTP HTTP
Client Proxy Origin Server
A proxy is chosen by the Client (for caching, or access control)
HTTP HTTP
Client Gateway Origin Server
The use of a gateway (or reverse proxy) is imposed by the server
Cache
Proxy/Gateway Origin
Server
Clients
Proxy/Gateway Origin
Server
Clients
DELETE
PUT
GET
C
DELETE DELETE
POST PUT PUT
GET
R GET
S
POST POST
R S
State R State S
C State C
R S
State R State S
Composite GET
R PUT
Representation
POST GET
S
C
POST
LinkR
LinkS
Client Origin
Servers
Composite
Representation
Composite Origin
RESTful Servers
service
Client Origin
Servers
Composite
Representation
Composite Origin
RESTful Servers
service
Client Origin
Servers
DELETE
PUT
GET
C
DELETE DELETE
POST PUT PUT
GET
R GET
S
POST POST
DELETE
GET
C
DELETE
POST PUT
GET
R GET
S
POST
DM DELETE
GET
G
LinkG
GET
C
LinkC DELETE
POST PUT
LinkD
GET
R GET
S
POST
Mashup
REST
Composition
GET
C
DELETE DELETE
POST PUT PUT
GET
R GET
S
POST POST
GET
C
GET
R GET
S
Composite
API
Representation
Composite Origin
RESTful Servers
UI
service
Reusable
Client Origin services vs.
Servers Reusable
Widgets
©2009 - Cesare Pautasso 30
Single-Origin Sandbox
Can you always do this
from a web browser?
Composite
Representation
Composite Origin
RESTful Servers
service
Client Origin
Servers
UI Mashup
REST API
Composition
Reusable
Situational Service
Sandboxed
2. Example: DoodleMap
WSDL 1.1
…do not
use
WSDL
1.1
PUT
<onGet>
<Put R> GET
R
<Get S> POST
GET
P </onGet>
DELETE
<onDelete> PUT
POST
DELETE <Post R>
<Delete S>
GET
S
</onDelete>
</Resource> POST
DELETE
©2009 - Cesare Pautasso 42
RESTful Workflows
PUT P
GET
R
POST
DELETE
Use the resource interface
abstraction to publish
the state of the workflow