SlideShare a Scribd company logo
Composing REST Services
                    Open Dagstuhl Session


                           Cesare Pautasso
                           Faculty of Informatics
                  University of Lugano (USI), Switzerland
                        http://www.pautasso.info



6 January 2009              ©2009 Cesare Pautasso | www.pautasso.info   1
Web Service Composition Today
            The WS-BPEL process
                                                                            WS-BPEL 2.0
          model is layered on top of
          the service model defined                                          WSDL 1.1
          by WSDL 1.1. […]
          Both the process and its
          partners are exposed as
          WSDL services
                  [BPEL 2.0 Standard, Section 3]



 6 January 2009                 ©2009 Cesare Pautasso | www.pautasso.info                 2
RESTful Web Services APIs…

                                                             WSDL 1.1



                                                             …do not use
                                                              WSDL 1.1



6 January 2009   ©2009 Cesare Pautasso | www.pautasso.info                 3
The Goal
     Compose RESTful Web Services
     Compose WSDL Web Services
     Use Business Process Modeling Languages


One Solution: BPEL for REST
    Extend BPEL to support RESTful Web Services


 6 January 2009      ©2009 Cesare Pautasso | www.pautasso.info   4
The Goal
     Compose RESTful Web Services
     Compose WSDL Web Services
     Use Business Process Modeling Languages


Another Solution: JOpera
    Visual Flow Language with Abstract Service Model
    Extensible Autonomic Engine Architecture

 6 January 2009      ©2009 Cesare Pautasso | www.pautasso.info   5
REST in one slide                                                   PUT

     Web Services expose their
     data and functionality trough                                 GET
                                                                          R
     resources identified by URI                                    POST
                                                                              DELETE
     Uniform Interface Principle: Clients interact with
     the state of resources through 4 verbs:
     GET (read), POST (create), PUT (update), DELETE
     Multiple representations for the same resource
     Hyperlinks model resource relationships and
     valid state transitions
 6 January 2009        ©2009 Cesare Pautasso | www.pautasso.info                  6
Challenges for Composition Languages
     Resource addressing through URI
       How to interact with dynamic, variable set of URI?
     Uniform Interface (GET, POST, PUT, DELETE)
       Does it help to make the verbs explicit in the workflow?
     Multiple resource representations
       How to negotiate the most appropriate representation?
     Hyperlinks
       Can the workflow implement state transition logic of a
       resource and generate new URIs dynamically as
       processes run to guide the clients invoking them?

 6 January 2009         ©2009 Cesare Pautasso | www.pautasso.info   7
JOpera Example: Doodle Map Mashup
       Setup a Doodle with Yahoo! Local search and
       visualize the results of the poll on Google Maps




 6 January 2009        ©2009 Cesare Pautasso | www.pautasso.info   8
Doodle Map Mashup Architecture
 Web Browser                           Workflow                                     RESTful
                                        Engine                                    Web Services
                  RESTful API                                                        APIs
                                                                            GET

                                                                       POST
                                                                        GET




 6 January 2009                 ©2009 Cesare Pautasso | www.pautasso.info                        9
6 January 2009   ©2009 Cesare Pautasso | www.pautasso.info   10
BPM                                    RESTful
        Workflow                               Web Service
       Languages                               Composition



6 January 2009   ©2009 Cesare Pautasso | www.pautasso.info   11
Solution Space                                                                   BPM
                                                                               Workflow
                                                                                                  RESTful
                                                                                                Web Service
                                                                              Languages         Composition

1. Abstract Workflow
                  Service invocation technology does not matter
2. Concrete Workflow
                                                                                      BPM
                  Expose service invocation
                                                                                              RESTful
                                                                                    Workflow Web Service
                                                                                   LanguagesComposition
                  technologies as explicit constructs
                  in the workflow language
3. RESTful Workflow
                                                                                             BPM
                  Workflow as one kind of resource
                                                                                             RESTful
                                                                                           Workflow
                                                                                           Web Service
                                                                                          Languages
                                                                                           Composition
                  exposed by a RESTful service

 6 January 2009                   ©2009 Cesare Pautasso | www.pautasso.info                                12
1. Abstract Workflow Example: BPEL/WSDL
    WSDL 2.0 HTTP Binding can wrap RESTful Web Services
    (WS-BPEL 2.0 does not support WSDL 2.0)


            BPEL         WSDL 2.0                                     PUT
                          Operations
                  ...
                                Op_1
        <Invoke Op_1>           Op_2
                                Op_3                                 GET
                                                                            R
        <Invoke Op_2>           Op_4

                  ...     HTTP Binding                                POST
                                                                                DELETE
        <Invoke Op_3>      Op  URI Method
                           Op_1 R PUT
                                   PUT
        <Invoke Op_4>      Op_2 R GET
                                   GET
                           Op_3 R POST
                                   POST
                  ...      Op_4 R DELETE
                                   DELETE

 6 January 2009          ©2009 Cesare Pautasso | www.pautasso.info                   13
2. Concrete Workflow: BPEL for REST
Idea: Make REST interaction primitives first-class language constructs



             BPEL for REST                                                  PUT
                     ...
                   <Put R>
                                                                           GET
                                                                                  R
                   <Get R>
                     ...                                                    POST
                                                                                      DELETE
                         R>
                   <Post R>
                  <Delete R>
                  <Delete R>
                     ...


 6 January 2009                ©2009 Cesare Pautasso | www.pautasso.info                   14
BPEL for REST – New Activities/Handlers
                   PUT
         <put>                   <onPut>
         <get>
                  GET
                       R esource <onGet>
        <post>                   <onPost>
                    POST
       <delete>          DELETE <onDelete>

                                           Web                <receive>
       <invoke>
                                          Service              <reply>

       <invoke>                            Web
                                                              <receive>
                                          Service
 6 January 2009   ©2009 Cesare Pautasso | www.pautasso.info           15
BPEL for REST – Resource Block
       Dynamically publish resources from BPEL
       processes and handle client requests
                                BPEL for REST                            PUT
                                 <Resource P>

             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
 6 January 2009                  ©2009 Cesare Pautasso | www.pautasso.info                      16
3. RESTful Workflows
                   PUT                                                   P

                  GET
                         R
                   POST
                             DELETE
Use the resource interface
abstraction to publish
the state of the workflow

 6 January 2009              ©2009 Cesare Pautasso | www.pautasso.info       17
Workflows as Resources – URI
  Publish workflows as resources identified by the URIs:
                            /package/process
                        /package/process/version
                    /package/process/version/instance
                  /package/process/version/instance/task
 /package/process/version/instance/task/parameter



 6 January 2009               ©2009 Cesare Pautasso | www.pautasso.info   18
Reading the state of the workflow resources
  GET /package/process
                                       Enumerate deployed process versions
  GET /package/process/version
                    Enumerate active instances of a given process version
  GET /package/process/version/instance
                             Read the current state of a workflow instance
  GET /package/process/version/instance/task
                        Read the current state of a workflow instance task
  GET /package/process/version/instance/task/param
                  Read the current value of a workflow instance parameter
 6 January 2009                  ©2009 Cesare Pautasso | www.pautasso.info   19
Creating new workflow resources
  POST /package
          Deploy new process template into package
  POST /package/process
          Deploy new version of a process
  POST /package/process/version
          Create new process instance




 6 January 2009             ©2009 Cesare Pautasso | www.pautasso.info   20
Updating the workflow resource
  PUT /package/process/version/instance/task
          Update the state of a workflow task (e.g., finished, failed)
  PUT /package/process/version/instance/task/param
          Write into task parameters some values




 6 January 2009               ©2009 Cesare Pautasso | www.pautasso.info   21
Deleting workflow resources
  DELETE /package/process
          Undeploy all versions of a process
          (and all the corresponding process instances)
  DELETE /package/process/version
          Undeploy a version of a process (and all of its instances)
  DELETE /package/process/version/instance
          Remove the state of a specific process instance only




 6 January 2009              ©2009 Cesare Pautasso | www.pautasso.info   22
Discussion
  Why should a workflow engine care about REST?
          Use workflows to compose RESTful Web services
          Implement RESTful services with a workflow
  Should a process explicitly include RESTful activities?
          Or it is better/enough to model REST implicitly?
  How much of the state of a process instance should
  be exposed as a resource?
          How to control which “parts” are visible?


 6 January 2009              ©2009 Cesare Pautasso | www.pautasso.info   23
Conclusion
  Business Process Modeling Languages have been
  applied with success to compose “traditional” WS-*
  Web Services (BPM = SOA + BPEL)
  Business Process Modeling Languages should also be
  applied to compose RESTful Web Services
  BPEL for REST is a lightweight BPEL extension for
  REST and WS-* service composition
  JOpera for Eclipse is a visual process modeling tool
  with an extensible engine for composing both kinds of
  services (and many more)
 6 January 2009     ©2009 Cesare Pautasso | www.pautasso.info   24
Some References
   R. Fielding, Architectural Styles and the Design of Network-
   based Software Architectures, PhD Thesis,
   University of California, Irvine, 2000
   C. Pautasso, O. Zimmermann, F. Leymann, RESTful Web
   Services vs. Big Web Services: Making the Right
   Architectural Decision, Proc. of the 17th International World
   Wide Web Conference (WWW2008), Bejing, China, April 2008
   C. Pautasso, BPEL for REST, Proc. of the 7th International
   Conference on Business Process Management
   (BPM 2008), Milano, Italy, September 2008
   Xiwei (Sherry) Xu, Liming Zhu, Yan Liu, Mark Staples, Resource-
   Oriented Architecture for Business Processes, APSEC’08

 6 January 2009              ©2009 Cesare Pautasso | www.pautasso.info   25
PhD positions available!


           Prof. Cesare Pautasso
      University of Lugano, Switzerland
            c.pautasso@ieee.org
         http://www.pautasso.info

                                          26
          ©2008 Cesare Pautasso

More Related Content

Similar to Composing REST Services

Push-Enabling RESTful Business Processes
Push-Enabling RESTful Business ProcessesPush-Enabling RESTful Business Processes
Push-Enabling RESTful Business Processes
Cesare Pautasso
 
BPM with REST
BPM with RESTBPM with REST
BPM with REST
Cesare Pautasso
 
BPMN for REST
BPMN for RESTBPMN for REST
BPMN for REST
Cesare Pautasso
 
WSO2 Mashups and BPM
WSO2 Mashups and BPMWSO2 Mashups and BPM
WSO2 Mashups and BPMWSO2
 
WebServices and Workflow technologies
WebServices and Workflow technologiesWebServices and Workflow technologies
WebServices and Workflow technologies
Nitin Pande
 
Open APIs in Telecom - Workshop Fokus Berlin 2009
Open APIs in Telecom - Workshop Fokus Berlin 2009Open APIs in Telecom - Workshop Fokus Berlin 2009
Open APIs in Telecom - Workshop Fokus Berlin 2009
Marc Schaer
 
Integration of Web Service Stacks in an Esb
Integration of Web Service Stacks in an EsbIntegration of Web Service Stacks in an Esb
Integration of Web Service Stacks in an Esb
Wen Zhu
 
SOA with REST
SOA with RESTSOA with REST
SOA with REST
Cesare Pautasso
 
WS-* vs. RESTful Services
WS-* vs. RESTful ServicesWS-* vs. RESTful Services
WS-* vs. RESTful Services
Cesare Pautasso
 
Designing a Language and System for REST-oriented service composition,as a se...
Designing a Language and System for REST-oriented service composition,as a se...Designing a Language and System for REST-oriented service composition,as a se...
Designing a Language and System for REST-oriented service composition,as a se...
raniakhalaf
 
Service Cloud OW2 Conference Nov10
Service Cloud OW2 Conference Nov10Service Cloud OW2 Conference Nov10
Service Cloud OW2 Conference Nov10OW2
 
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPELOracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPELGuido Schmutz
 
ESB and SOA
ESB and SOAESB and SOA
ESB and SOA
WSO2
 
JOpera - Eclipse-based Visual Composition Environment featuring a general lan...
JOpera - Eclipse-based Visual Composition Environment featuring a general lan...JOpera - Eclipse-based Visual Composition Environment featuring a general lan...
JOpera - Eclipse-based Visual Composition Environment featuring a general lan...
Cesare Pautasso
 
Tactics Esb Implementation
Tactics Esb ImplementationTactics Esb Implementation
Tactics Esb Implementation
Murali Manohar
 
New Ways To Engage With Tiempo 2011
New Ways To Engage With Tiempo 2011New Ways To Engage With Tiempo 2011
New Ways To Engage With Tiempo 2011
Tiempo Development
 
Reusing Existing Java EE Applications from SOA Suite 11g
Reusing Existing Java EE Applications from SOA Suite 11gReusing Existing Java EE Applications from SOA Suite 11g
Reusing Existing Java EE Applications from SOA Suite 11g
Guido Schmutz
 
Mashups and Business Process Management in SOA
Mashups and Business Process Management in SOAMashups and Business Process Management in SOA
Mashups and Business Process Management in SOA
WSO2
 
Frequently asked MuleSoft Interview Questions and Answers from Techlightning
Frequently asked MuleSoft Interview Questions and Answers from TechlightningFrequently asked MuleSoft Interview Questions and Answers from Techlightning
Frequently asked MuleSoft Interview Questions and Answers from Techlightning
Arul ChristhuRaj Alphonse
 
Rest api-interview
Rest api-interviewRest api-interview
Rest api-interview
Mohammed Kemal
 

Similar to Composing REST Services (20)

Push-Enabling RESTful Business Processes
Push-Enabling RESTful Business ProcessesPush-Enabling RESTful Business Processes
Push-Enabling RESTful Business Processes
 
BPM with REST
BPM with RESTBPM with REST
BPM with REST
 
BPMN for REST
BPMN for RESTBPMN for REST
BPMN for REST
 
WSO2 Mashups and BPM
WSO2 Mashups and BPMWSO2 Mashups and BPM
WSO2 Mashups and BPM
 
WebServices and Workflow technologies
WebServices and Workflow technologiesWebServices and Workflow technologies
WebServices and Workflow technologies
 
Open APIs in Telecom - Workshop Fokus Berlin 2009
Open APIs in Telecom - Workshop Fokus Berlin 2009Open APIs in Telecom - Workshop Fokus Berlin 2009
Open APIs in Telecom - Workshop Fokus Berlin 2009
 
Integration of Web Service Stacks in an Esb
Integration of Web Service Stacks in an EsbIntegration of Web Service Stacks in an Esb
Integration of Web Service Stacks in an Esb
 
SOA with REST
SOA with RESTSOA with REST
SOA with REST
 
WS-* vs. RESTful Services
WS-* vs. RESTful ServicesWS-* vs. RESTful Services
WS-* vs. RESTful Services
 
Designing a Language and System for REST-oriented service composition,as a se...
Designing a Language and System for REST-oriented service composition,as a se...Designing a Language and System for REST-oriented service composition,as a se...
Designing a Language and System for REST-oriented service composition,as a se...
 
Service Cloud OW2 Conference Nov10
Service Cloud OW2 Conference Nov10Service Cloud OW2 Conference Nov10
Service Cloud OW2 Conference Nov10
 
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPELOracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
 
ESB and SOA
ESB and SOAESB and SOA
ESB and SOA
 
JOpera - Eclipse-based Visual Composition Environment featuring a general lan...
JOpera - Eclipse-based Visual Composition Environment featuring a general lan...JOpera - Eclipse-based Visual Composition Environment featuring a general lan...
JOpera - Eclipse-based Visual Composition Environment featuring a general lan...
 
Tactics Esb Implementation
Tactics Esb ImplementationTactics Esb Implementation
Tactics Esb Implementation
 
New Ways To Engage With Tiempo 2011
New Ways To Engage With Tiempo 2011New Ways To Engage With Tiempo 2011
New Ways To Engage With Tiempo 2011
 
Reusing Existing Java EE Applications from SOA Suite 11g
Reusing Existing Java EE Applications from SOA Suite 11gReusing Existing Java EE Applications from SOA Suite 11g
Reusing Existing Java EE Applications from SOA Suite 11g
 
Mashups and Business Process Management in SOA
Mashups and Business Process Management in SOAMashups and Business Process Management in SOA
Mashups and Business Process Management in SOA
 
Frequently asked MuleSoft Interview Questions and Answers from Techlightning
Frequently asked MuleSoft Interview Questions and Answers from TechlightningFrequently asked MuleSoft Interview Questions and Answers from Techlightning
Frequently asked MuleSoft Interview Questions and Answers from Techlightning
 
Rest api-interview
Rest api-interviewRest api-interview
Rest api-interview
 

More from elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
elliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScriptelliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
elliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
elliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 

More from elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Recently uploaded

Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 

Recently uploaded (20)

Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 

Composing REST Services

  • 1. Composing REST Services Open Dagstuhl Session Cesare Pautasso Faculty of Informatics University of Lugano (USI), Switzerland http://www.pautasso.info 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 1
  • 2. Web Service Composition Today The WS-BPEL process WS-BPEL 2.0 model is layered on top of the service model defined WSDL 1.1 by WSDL 1.1. […] Both the process and its partners are exposed as WSDL services [BPEL 2.0 Standard, Section 3] 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 2
  • 3. RESTful Web Services APIs… WSDL 1.1 …do not use WSDL 1.1 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 3
  • 4. The Goal Compose RESTful Web Services Compose WSDL Web Services Use Business Process Modeling Languages One Solution: BPEL for REST Extend BPEL to support RESTful Web Services 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 4
  • 5. The Goal Compose RESTful Web Services Compose WSDL Web Services Use Business Process Modeling Languages Another Solution: JOpera Visual Flow Language with Abstract Service Model Extensible Autonomic Engine Architecture 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 5
  • 6. REST in one slide PUT Web Services expose their data and functionality trough GET R resources identified by URI POST DELETE Uniform Interface Principle: Clients interact with the state of resources through 4 verbs: GET (read), POST (create), PUT (update), DELETE Multiple representations for the same resource Hyperlinks model resource relationships and valid state transitions 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 6
  • 7. Challenges for Composition Languages Resource addressing through URI How to interact with dynamic, variable set of URI? Uniform Interface (GET, POST, PUT, DELETE) Does it help to make the verbs explicit in the workflow? Multiple resource representations How to negotiate the most appropriate representation? Hyperlinks Can the workflow implement state transition logic of a resource and generate new URIs dynamically as processes run to guide the clients invoking them? 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 7
  • 8. JOpera Example: Doodle Map Mashup Setup a Doodle with Yahoo! Local search and visualize the results of the poll on Google Maps 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 8
  • 9. Doodle Map Mashup Architecture Web Browser Workflow RESTful Engine Web Services RESTful API APIs GET POST GET 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 9
  • 10. 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 10
  • 11. BPM RESTful Workflow Web Service Languages Composition 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 11
  • 12. Solution Space BPM Workflow RESTful Web Service Languages Composition 1. Abstract Workflow Service invocation technology does not matter 2. Concrete Workflow BPM Expose service invocation RESTful Workflow Web Service LanguagesComposition technologies as explicit constructs in the workflow language 3. RESTful Workflow BPM Workflow as one kind of resource RESTful Workflow Web Service Languages Composition exposed by a RESTful service 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 12
  • 13. 1. Abstract Workflow Example: BPEL/WSDL WSDL 2.0 HTTP Binding can wrap RESTful Web Services (WS-BPEL 2.0 does not support WSDL 2.0) BPEL WSDL 2.0 PUT Operations ... Op_1 <Invoke Op_1> Op_2 Op_3 GET R <Invoke Op_2> Op_4 ... HTTP Binding POST DELETE <Invoke Op_3> Op URI Method Op_1 R PUT PUT <Invoke Op_4> Op_2 R GET GET Op_3 R POST POST ... Op_4 R DELETE DELETE 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 13
  • 14. 2. Concrete Workflow: BPEL for REST Idea: Make REST interaction primitives first-class language constructs BPEL for REST PUT ... <Put R> GET R <Get R> ... POST DELETE R> <Post R> <Delete R> <Delete R> ... 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 14
  • 15. BPEL for REST – New Activities/Handlers PUT <put> <onPut> <get> GET R esource <onGet> <post> <onPost> POST <delete> DELETE <onDelete> Web <receive> <invoke> Service <reply> <invoke> Web <receive> Service 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 15
  • 16. BPEL for REST – Resource Block Dynamically publish resources from BPEL processes and handle client requests BPEL for REST PUT <Resource P> 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 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 16
  • 17. 3. RESTful Workflows PUT P GET R POST DELETE Use the resource interface abstraction to publish the state of the workflow 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 17
  • 18. Workflows as Resources – URI Publish workflows as resources identified by the URIs: /package/process /package/process/version /package/process/version/instance /package/process/version/instance/task /package/process/version/instance/task/parameter 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 18
  • 19. Reading the state of the workflow resources GET /package/process Enumerate deployed process versions GET /package/process/version Enumerate active instances of a given process version GET /package/process/version/instance Read the current state of a workflow instance GET /package/process/version/instance/task Read the current state of a workflow instance task GET /package/process/version/instance/task/param Read the current value of a workflow instance parameter 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 19
  • 20. Creating new workflow resources POST /package Deploy new process template into package POST /package/process Deploy new version of a process POST /package/process/version Create new process instance 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 20
  • 21. Updating the workflow resource PUT /package/process/version/instance/task Update the state of a workflow task (e.g., finished, failed) PUT /package/process/version/instance/task/param Write into task parameters some values 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 21
  • 22. Deleting workflow resources DELETE /package/process Undeploy all versions of a process (and all the corresponding process instances) DELETE /package/process/version Undeploy a version of a process (and all of its instances) DELETE /package/process/version/instance Remove the state of a specific process instance only 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 22
  • 23. Discussion Why should a workflow engine care about REST? Use workflows to compose RESTful Web services Implement RESTful services with a workflow Should a process explicitly include RESTful activities? Or it is better/enough to model REST implicitly? How much of the state of a process instance should be exposed as a resource? How to control which “parts” are visible? 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 23
  • 24. Conclusion Business Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services (BPM = SOA + BPEL) Business Process Modeling Languages should also be applied to compose RESTful Web Services BPEL for REST is a lightweight BPEL extension for REST and WS-* service composition JOpera for Eclipse is a visual process modeling tool with an extensible engine for composing both kinds of services (and many more) 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 24
  • 25. Some References R. Fielding, Architectural Styles and the Design of Network- based Software Architectures, PhD Thesis, University of California, Irvine, 2000 C. Pautasso, O. Zimmermann, F. Leymann, RESTful Web Services vs. Big Web Services: Making the Right Architectural Decision, Proc. of the 17th International World Wide Web Conference (WWW2008), Bejing, China, April 2008 C. Pautasso, BPEL for REST, Proc. of the 7th International Conference on Business Process Management (BPM 2008), Milano, Italy, September 2008 Xiwei (Sherry) Xu, Liming Zhu, Yan Liu, Mark Staples, Resource- Oriented Architecture for Business Processes, APSEC’08 6 January 2009 ©2009 Cesare Pautasso | www.pautasso.info 25
  • 26. PhD positions available! Prof. Cesare Pautasso University of Lugano, Switzerland c.pautasso@ieee.org http://www.pautasso.info 26 ©2008 Cesare Pautasso