Composing REST Services Open Dagstuhl Session Cesare Pautasso Faculty of Informatics University of Lugano (USI), Switzerland http:// www.pautasso.info
  The WS-BPEL process model is layered on top of the service model defined by WSDL 1.1. […]  Both the process and its partners are exposed as WSDL services [BPEL 2.0 Standard, Section 3] Web Service Composition Today “ ” WSDL 1.1 WS-BPEL 2.0
RESTful Web Services APIs… WSDL 1.1 … do not use WSDL 1.1
Compose RESTful Web Services Compose WSDL Web Services Use Business Process Modeling Languages The Goal Extend BPEL to support RESTful Web Services One Solution: BPEL for REST
Compose RESTful Web Services Compose WSDL Web Services Use Business Process Modeling Languages The Goal Visual Flow Language with Abstract Service Model Extensible Autonomic Engine Architecture Another Solution: JOpera
Web Services expose their  data and functionality trough  resources  identified by  URI Uniform Interface  Principle:  Clients interact with the state of resources through 4 verbs: GET (read), POST (create), PUT (update/create), DELETE Multiple representations  for the same resource Hyperlinks  model resource relationships and valid state transitions REST in one slide R PUT DELETE GET POST
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? Challenges for Composition Languages
JOpera Example: Doodle Map Mashup Setup a Doodle with Yahoo! Local search and visualize the results of the poll on Google Maps
Doodle Map Mashup Architecture Web Browser Workflow Engine RESTful Web Services APIs GET POST GET RESTful API
 
BPM Workflow Languages RESTful Web Service Composition
Abstract Workflow Service invocation technology does not matter Concrete Workflow Expose service invocation  technologies as explicit constructs in the workflow language RESTful Workflow Workflow as one kind of resource  exposed by a RESTful service Solution Space BPM Workflow Languages RESTful Web Service Composition BPM Workflow Languages RESTful Web Service Composition BPM Workflow Languages RESTful Web Service Composition
WSDL 2.0 HTTP Binding can wrap RESTful Web Services  1. Abstract Workflow Example: BPEL/WSDL (WS-BPEL 2.0 does not support WSDL 2.0) R  PUT R  GET R  POST R  DELETE
Idea: Make REST interaction primitives first-class language constructs 2. Concrete Workflow: BPEL for REST <Put R> <Get R> <Post R> <Delete R>
BPEL for REST – New Activities/Handlers Web Service <invoke> Web Service <invoke> <receive> <reply> <receive> <put> <get> <post> <delete> <onPut> <onGet> <onPost> <onDelete> R  esource PUT DELETE GET POST
Dynamically publish resources from BPEL processes and handle client requests BPEL for REST – Resource Block BPEL for REST < Resource P > <onGet> < Put R > < Get S > </onGet> < Post R > < Delete S > </onDelete> </Resource> <onDelete> R PUT DELETE GET POST S PUT DELETE GET POST P PUT DELETE GET POST
3. RESTful Workflows P Use the resource interface  abstraction to publish  the state of the workflow
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 Workflows as Resources – URI
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 Reading the state of the 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 Creating new workflow resources
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 Updating the workflow resource
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 Deleting workflow resources
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? Discussion
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) Conclusion
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 7 th  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 Some References http://www.jopera.org/

More Related Content

PDF
RESTful Service Composition with JOpera
PDF
Techniques for Composing REST services - SOA Symposium 2009
PDF
WS-* vs. RESTful Services
PDF
BPM with REST
PDF
Composing REST Services
PDF
Data Integration with server side Mashups
PDF
Pal gov.tutorial3.session13.bpel
PDF
JOpera - Eclipse-based Visual Composition Environment featuring a general lan...
RESTful Service Composition with JOpera
Techniques for Composing REST services - SOA Symposium 2009
WS-* vs. RESTful Services
BPM with REST
Composing REST Services
Data Integration with server side Mashups
Pal gov.tutorial3.session13.bpel
JOpera - Eclipse-based Visual Composition Environment featuring a general lan...

Similar to Composing REST Services (20)

PPT
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
PPTX
cloud enabling tecnologies , unit ii [cc]
PDF
Funtional Web Service Composition
PPTX
Restful webservice
PDF
Writing RESTful Web Services
PPT
Design And Implementation Of Web Service Testing Framework Mit Template
PPTX
About REST. Архитектурные семинары Softengi
PPT
Library Web Services for Discovery and Delivery of Scientific Information
PDF
Push-Enabling RESTful Business Processes
PPTX
Restful web services
PPTX
RESTful Web Services
PDF
USP presentation of CHOReOS @ FISL Conference
PDF
Role of Rest vs. Web Services and EI
PPT
Oracle
PPTX
Unerstanding and Using RESTful APIs
PDF
SOA and WS BPEL 1st Ed. Edition Yuli Vasiliev
PPTX
Party + REST = Win
PPT
ROA.ppt
PDF
HATEOAS: The Confusing Bit from REST
PDF
What are restful web services?
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
cloud enabling tecnologies , unit ii [cc]
Funtional Web Service Composition
Restful webservice
Writing RESTful Web Services
Design And Implementation Of Web Service Testing Framework Mit Template
About REST. Архитектурные семинары Softengi
Library Web Services for Discovery and Delivery of Scientific Information
Push-Enabling RESTful Business Processes
Restful web services
RESTful Web Services
USP presentation of CHOReOS @ FISL Conference
Role of Rest vs. Web Services and EI
Oracle
Unerstanding and Using RESTful APIs
SOA and WS BPEL 1st Ed. Edition Yuli Vasiliev
Party + REST = Win
ROA.ppt
HATEOAS: The Confusing Bit from REST
What are restful web services?
Ad

More from Cesare Pautasso (20)

PDF
Beautiful APIs - SOSE2021 Keynote
PDF
How do you back up and consistently recover your microservice architecture?
PDF
Microservices: An Eventually Inconsistent Architectural Style?
PDF
Disaster Recovery and Microservices: The BAC Theorem
PPTX
The Blockchain as a Software Connector
PPTX
Team Situational Awareness and Architectural Decision Making with the Softwar...
PDF
BPMN for REST
PDF
SOA with REST
PDF
Atomic Transactions for the REST of us
PDF
Service Oriented Architectures and Web Services
PDF
Exploiting Multicores to Optimize Business Process Execution
PDF
Real-time Mashups di Web Service Geografici
PDF
Towards Scalable Service Composition on Multicores
PDF
SOA2010 SOA with REST
PPT
USI SCUBE Associate Member
PDF
Lighweight Collaboration Management (Mashups09@OOPSLA)
PDF
Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009
PPT
Mashups09
PDF
Composing RESTful Services with JOpera
PDF
Scientific and Grid Workflow Management (SGS09)
Beautiful APIs - SOSE2021 Keynote
How do you back up and consistently recover your microservice architecture?
Microservices: An Eventually Inconsistent Architectural Style?
Disaster Recovery and Microservices: The BAC Theorem
The Blockchain as a Software Connector
Team Situational Awareness and Architectural Decision Making with the Softwar...
BPMN for REST
SOA with REST
Atomic Transactions for the REST of us
Service Oriented Architectures and Web Services
Exploiting Multicores to Optimize Business Process Execution
Real-time Mashups di Web Service Geografici
Towards Scalable Service Composition on Multicores
SOA2010 SOA with REST
USI SCUBE Associate Member
Lighweight Collaboration Management (Mashups09@OOPSLA)
Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009
Mashups09
Composing RESTful Services with JOpera
Scientific and Grid Workflow Management (SGS09)
Ad

Recently uploaded (20)

PDF
Architecture types and enterprise applications.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
Modernising the Digital Integration Hub
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
2018-HIPAA-Renewal-Training for executives
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Developing a website for English-speaking practice to English as a foreign la...
Architecture types and enterprise applications.pdf
Hindi spoken digit analysis for native and non-native speakers
Microsoft Excel 365/2024 Beginner's training
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Convolutional neural network based encoder-decoder for efficient real-time ob...
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
A contest of sentiment analysis: k-nearest neighbor versus neural network
The influence of sentiment analysis in enhancing early warning system model f...
Chapter 5: Probability Theory and Statistics
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Modernising the Digital Integration Hub
1 - Historical Antecedents, Social Consideration.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Custom Battery Pack Design Considerations for Performance and Safety
sustainability-14-14877-v2.pddhzftheheeeee
2018-HIPAA-Renewal-Training for executives
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Developing a website for English-speaking practice to English as a foreign la...

Composing REST Services

  • 1. Composing REST Services Open Dagstuhl Session Cesare Pautasso Faculty of Informatics University of Lugano (USI), Switzerland http:// www.pautasso.info
  • 2. The WS-BPEL process model is layered on top of the service model defined by WSDL 1.1. […] Both the process and its partners are exposed as WSDL services [BPEL 2.0 Standard, Section 3] Web Service Composition Today “ ” WSDL 1.1 WS-BPEL 2.0
  • 3. RESTful Web Services APIs… WSDL 1.1 … do not use WSDL 1.1
  • 4. Compose RESTful Web Services Compose WSDL Web Services Use Business Process Modeling Languages The Goal Extend BPEL to support RESTful Web Services One Solution: BPEL for REST
  • 5. Compose RESTful Web Services Compose WSDL Web Services Use Business Process Modeling Languages The Goal Visual Flow Language with Abstract Service Model Extensible Autonomic Engine Architecture Another Solution: JOpera
  • 6. Web Services expose their data and functionality trough resources identified by URI Uniform Interface Principle: Clients interact with the state of resources through 4 verbs: GET (read), POST (create), PUT (update/create), DELETE Multiple representations for the same resource Hyperlinks model resource relationships and valid state transitions REST in one slide R PUT DELETE GET POST
  • 7. 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? Challenges for Composition Languages
  • 8. JOpera Example: Doodle Map Mashup Setup a Doodle with Yahoo! Local search and visualize the results of the poll on Google Maps
  • 9. Doodle Map Mashup Architecture Web Browser Workflow Engine RESTful Web Services APIs GET POST GET RESTful API
  • 10.  
  • 11. BPM Workflow Languages RESTful Web Service Composition
  • 12. Abstract Workflow Service invocation technology does not matter Concrete Workflow Expose service invocation technologies as explicit constructs in the workflow language RESTful Workflow Workflow as one kind of resource exposed by a RESTful service Solution Space BPM Workflow Languages RESTful Web Service Composition BPM Workflow Languages RESTful Web Service Composition BPM Workflow Languages RESTful Web Service Composition
  • 13. WSDL 2.0 HTTP Binding can wrap RESTful Web Services 1. Abstract Workflow Example: BPEL/WSDL (WS-BPEL 2.0 does not support WSDL 2.0) R PUT R GET R POST R DELETE
  • 14. Idea: Make REST interaction primitives first-class language constructs 2. Concrete Workflow: BPEL for REST <Put R> <Get R> <Post R> <Delete R>
  • 15. BPEL for REST – New Activities/Handlers Web Service <invoke> Web Service <invoke> <receive> <reply> <receive> <put> <get> <post> <delete> <onPut> <onGet> <onPost> <onDelete> R esource PUT DELETE GET POST
  • 16. Dynamically publish resources from BPEL processes and handle client requests BPEL for REST – Resource Block BPEL for REST < Resource P > <onGet> < Put R > < Get S > </onGet> < Post R > < Delete S > </onDelete> </Resource> <onDelete> R PUT DELETE GET POST S PUT DELETE GET POST P PUT DELETE GET POST
  • 17. 3. RESTful Workflows P Use the resource interface abstraction to publish the state of the workflow
  • 18. 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 Workflows as Resources – URI
  • 19. 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 Reading the state of the workflow resources
  • 20. 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 Creating new workflow resources
  • 21. 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 Updating the workflow resource
  • 22. 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 Deleting workflow resources
  • 23. 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? Discussion
  • 24. 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) Conclusion
  • 25. 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 7 th 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 Some References http://www.jopera.org/