SlideShare a Scribd company logo
Functional Composition of Web Services
Rohit Kumar Gupta
Matrikel number : 2557833
Department of Computer Science
University of Saarland
Seminar : Advanced Topics in Service Computing
2 June, 2016
1Functional Composition of Web Services
2Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
3Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
4Functional Composition of Web Services
Web Service
• What is a Web Service?
- software application
- service over web
- interoperable
- URI
• Example
- single login service is utilized by many applications
Client Server
Software 1 Software 2
Network
Request
Response
login
service
Buxfer
Instagram
Quora
5Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
6Functional Composition of Web Services
REpresentational State Transfer (REST)
REST
- architectural pattern supporting
- modularity
- statelessness
- scalability
- everything is a resource
- every resource has a URI
- format : <protocol>://<application-name>/<ResourceType>/<ResourceID>
- Example - http://amazon.com/products
Standard invocation methods
- Get : provides read only access to resource
- Put : create a new resource
- Post : updates existing resource or create a new resource
- Delete : removes resource
7Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. Taxonomy
• WSDL
• REST
• BPEL
4. State of the Art
5. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
6. Evaluation
• Centralized vs Decentralized Web Service composition
7. References
8Functional Composition of Web Services
Motivation
• What is a Web Service Composition?
- integration of web services
- high level process
- new utility
Me
Family
Hos-
pital
Police
Insu-
rance
• Real world example : Lets suppose Mr. X had an accident....
4 services :
1. Hospital
2. Family
3. Insurance
4. Police
1
2
3
4
5
6
7
8
9Functional Composition of Web Services
Motivation
• If the services are not composed user will have to :
- find each web service separately
- process them and get response
- establish interaction with other web service
- co-ordinance among them
• Why ?
- adds value for client
- wider perspective
- reuse of existing services
-publishable as web services
Me
As Client
Composed
Service as
Server
Hospital Family
Police
Insuranc
e
10Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. Taxonomy
• WSDL
• REST
• BPEL
4. State of the Art
5. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
6. Evaluation
• Centralized vs Decentralized Web Service composition
7. References
11Functional Composition of Web Services
Core issues in composition
• Service access
- invoking different web services
- handling synchronous and asynchronous response
- management of low level details like interface
• Data flow
- data flow between services
- aggregating
- e.g: cost from Bill service is an input for Payment service
• Data modelling
- formatting
- splitting
- merging
• Control flow
- order of invocation
- decision-making
12Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
13Functional Composition of Web Services
State of the Art
• Web Services Business Process Execution Language (OASIS, 2006)
- assumes WSDL as service interface
- do not support REST features
• REST and Web services in WSDL 2.0 (E. Chinthaka , 2007)
- use new WSDL 2.0 bindings
- WSDL 2.0 is not fully developed to describe Restful web service
- Additional workload of writing WSDL 2.0
• Composing RESTful services with Jopera (Pautasso, 2009)
- stateful composition
• I mentioned these three, there are others as well
Next Target : Implement composition that has all REST features
WSDL – Web Service Description Language
14Functional Composition of Web Services
Business Process Execution Language (BPEL)
BPEL
- XML based composition language
- uses WSDL for web service interaction
- internal process control flow
- develops reusable business processes
- basic activities : invoke, receive, and reply
definition of
web service
WSDL
WSDL
WSDL
Client receive
invoke
invoke
reply
Web
service 1
Web
service 2
Flow diagram of BPEL web service
15Functional Composition of Web Services
State of the Art
• Web Services Business Process Execution Language (OASIS, 2006)
- assumes WSDL as service interface
- do not support REST features
• REST and Web services in WSDL 2.0 (E. Chinthaka , 2007)
- use new WSDL 2.0 bindings
- WSDL 2.0 is not fully developed to describe Restful web service
- Additional workload of writing WSDL 2.0
• Composing RESTful services with Jopera (Pautasso, 2009)
- stateful composition
• I mentioned these three, there are others as well
Next Target : Implement composition that has all REST features
16Functional Composition of Web Services
State of the Art
• BPEL, REST web services in WSDL 2.0(2007)
- WSDL 2.0 provides bindings for all HTTP request methods
- BPEL developers create WSDL 2.0 description
- BPEL designed with respect to WSDL 1.1
- lack of semantic information about REST operations
- Additional workload of writing WSDL 2.0
Source : Restful Web Service composition with BPEL for REST
17Functional Composition of Web Services
State of the Art
• Web Services Business Process Execution Language (OASIS, 2006)
- assumes WSDL as service interface
- do not support REST features
• REST and Web services in WSDL 2.0 (E. Chinthaka , 2007)
- use new WSDL 2.0 bindings
- WSDL 2.0 is not fully developed to describe Restful web service
- Additional workload of writing WSDL 2.0
• Composing RESTful services with Jopera (Pautasso, 2009)
- stateful composition
• I mentioned these three, there are others as well
Next Target : Implement composition that has all REST features
18Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
19Functional Composition of Web Services
BPEL for REST (extension of BPEL for compliance with Restful web services,
Pautasso,2009)
• Invoking Restful Web services
- 4 new activities : get, post, put and delete
- computes and stores URI in BPEL variables
- similar to invoke activity
• Handling invocation failures
- error response (HTTP code : 4xx or 5xx)
- defining fault handlers
• Defining request handlers
- marks progress of composition
- onGet, onPost, onDelete, onPut
• Composition
- receive request
- perform invocation
- inside scope
- outside scope
- inside request handler
-further invocation
-state transition logic
- framing response
defining request handlers
invocation activities according
to business logic
basic intuition
Restful
WS
request
Source : Restful Web Service composition with BPEL for REST
20Functional Composition of Web Services
Invocation of Restful web service
fault handlers
address of target resource response received from resource
Meta data
invocation
activity
Source : Restful Web Service composition with BPEL for REST
21Functional Composition of Web Services
Publishing Restful web service
tag to publish resource
BPEL variables
request
handlers
framing response
Source : Restful Web Service composition with BPEL for REST
22Functional Composition of Web Services
BPEL for REST’s Architecture
Front End : Handles HTTP requests from clients by routing BPEL engine to the corresponding
request handler
Back End : Invoke and bind a Restful services down to an HTTP request-response interaction
Source : Restful Web Service composition with BPEL for REST
23Functional Composition of Web Services
Example – E-commerce scenario
Client can :
• place an order
• get order information
•delete order
•update order
•pay
gives product information
and price catalog
composed service
state transition
Source : Restful Web Service composition with BPEL for REST
24Functional Composition of Web Services
Implementation Code
Source : Restful Web Service composition with BPEL for REST
25Functional Composition of Web Services
Outcome
• Issues addressed
dynamic late binding - appending URI dynamically (extract using XPath language)
dynamic typing - uses header attribute to know content-type dynamically
state transition logic – based on response code
uniform interface
• Open issues
 composition is stateful, BPEL process is centralized
 advanced control flow constructs is not discussed
 dealing with delayed response
26Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
27Functional Composition of Web Services
Control flow for Decentralized Restful Services (Bellido, Alarcon,
Pautasso,2013)
Four issues to handle :
1. Hypermedia Aware
2. Open Connection
3. Decentralization
4. Statelessness
The main focus of this paper include:
• leveraging existing communication protocols
• discuss control flow patterns
• stateless composition of Restful service
28Functional Composition of Web Services
Hypermedia aware
1. Hypermedia Aware
- component identification at runtime
- control flow discovery
- awareness about resources using ReLL
2. Open Connection
- handle long running business processes
- using callback connectors
3. Decentralization
- distribution of composition responsibility
- concurrency
- availability of composed service
- load balancing
4. Statelessness
- state information stored at client side
- scalability
- deallocate resources
29Functional Composition of Web Services
Hyper media awareness using Resource Linking Language (ReLL)
• Resource Linking Language
- XML document
- resource descriptor
- semantically defines links
- dynamic extraction of data
- contains resource identifier, representation, links to other resources
- composed service invokes descriptor of a resource as needed
Source : Control Flow for Decentralized REST
30Functional Composition of Web Services
Open Connection and Decentralization
1. Hypermedia aware
- component identification at runtime
- awareness about resources using ReLL
- control flow discovery
2. Open Connection
- handle long running business processes
- using callback connectors
3. Decentralization
- distribution of composition responsibility
- concurrency
- availability of composed service
- load balancing
4. Statelessness
- state information stored at client side
- scalability
- deallocate resources
31Functional Composition of Web Services
Centralized composition
Lets, first consider the case of Centralized composition
Example : we have 3 services
1. Commerce
2. Seller
3. Bank
Source : Control Flow for Decentralized REST
32Functional Composition of Web Services
Open Connection and Decentralized composition
• Each time different resource handles composition state
• Issue of coupling is also handled
Composition logic
and state stored
Component
resources
Source : Control Flow for Decentralized REST
33Functional Composition of Web Services
Statelessness
1. Hypermedia aware
- component identification at runtime
- awareness about resources using ReLL
- control flow discovery
2. Open Connection
- handle long running business processes
- using callback connectors
3. Decentralization
- distribution of composition responsibility
- concurrency
- availability of composed service
- load balancing
4. Statelessness
- state information stored at client side
- scalability
- deallocate resources
34Functional Composition of Web Services
Statelessness
Statelessness
- send aggregated state information to composite resources
- composite resource to stores only business logic
- composite resource redirects new state to client with fresh instructions
- callback address of next composite resource to invoke
- composite resource deallocates resources like memory used
- shared responsibility
Client
Composed
resource
• current state + old states received
• request for next instruction
• new state
• next instruction to execute
• callback address
Only business
logic stored
Composition
state stored
35Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flows
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
36Functional Composition of Web Services
Control flows
Sequence
WS 1 WS 2
Client
Unordered
Sequence
WS 1 WS 2
Client WS 2 WS 1
37Functional Composition of Web Services
Control flows … continue
Alternate
WS 1
Client WS 2
Iterative
WS 1
Client
Evaluation condition
38Functional Composition of Web Services
Parallel
WS 1
Client
WS 3
Parallel
1. Synchronization – for all
2. Discriminator – for one
3. Partial Join – fixed number
4. Selection – number not fixed
Control flows … continue
Evaluation condition
WS 2
39Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flow
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
40Functional Composition of Web Services
Centralized v/s Decentralized Web Service composition
Response Time
- total time between sending of request and receiving response
- resource loading and unloading tasks
Parameter
processing capacity : 100 request/sec
queue size : 100 request
n : number of components
Source : Control Flow for Decentralized REST
41Functional Composition of Web Services
Centralized v/s Decentralized Web Service composition ... continue
Availability
- proportion of successful service invocation
- concurrency
Parameter
processing capacity : 100 request/sec
queue size : 100 request
n : number of components
Source : Control Flow for Decentralized REST
42Functional Composition of Web Services
Centralized v/s Decentralized Web Service composition ... continue
Throughput
- Amount of workload processed per unit time
Parameter
processing capacity : 100 request/sec
queue size : 100 request
n : number of components
Source : Control Flow for Decentralized REST
43Functional Composition of Web Services
Resolved and Open issues
Open
- handling HTTP response with 200, while removing coupling issue
- dependency on user
- security of data financial data
- unresponsive web services
- handling exchange of massive state information over HTTP
Resolved
- scalability
- statelessness
- decentralization
- control flow
- asynchronous responses
44Functional Composition of Web Services
Outline
1. Introduction
• Web Service
• REST
2. Web Service Composition
• Motivation
• Issues in Web Service Composition
3. State of the Art
4. Proposed Solution
• BPEL for REST
• Control flow for Decentralized Restful Services
• Control flow
5. Evaluation
• Centralized vs Decentralized Web Service composition
6. References
45Functional Composition of Web Services
References
- A. Lagares Lemos, F. Daniel, B. Benatallah: “Web Service Composition: A Survey of Techniques and
Tools”. ACM Computing Surveys, 48(3), ACM. 2015
- M. Garriga, C. Mateos, A. Flores, A. Cechich, A. Zunino: “RESTful Service Composition at a Glance: A
Survey". Journal of Network and Computer Applications. Elsevier. 2015
- OASIS, Web Services Business Process Execution Language (WSBPEL) 2.0, 2006
- Bellido, J., Alarcon, R., and Sepulveda, C. 2011. Web linking-based protocols for guiding RESTful M2M
interaction.
- Composing restful services with jopera
Cited by :
- Autonomous Composition and Execution of REST APIs for Smart Sensors
- REST Web Service Description for Graph-Based Service Discovery
- An Overview and Classification of Service Description Approaches in Automated Service Composition
Research
Thank You
46Functional Composition of Web Services

More Related Content

PPTX
JavaPerformanceChapter_11
PPTX
Viestinnän seminaari 8.11.2012 / SharePoint
PDF
Esc 209 paper_doin
PPTX
Mashup Services Overview
PPT
Samoocenka 2014-2015
PPTX
Transition assessment power point
PPTX
Transition Training - Postsecondary Goals
PPTX
Fall 2015 Final Presentation
JavaPerformanceChapter_11
Viestinnän seminaari 8.11.2012 / SharePoint
Esc 209 paper_doin
Mashup Services Overview
Samoocenka 2014-2015
Transition assessment power point
Transition Training - Postsecondary Goals
Fall 2015 Final Presentation

Viewers also liked (9)

PDF
Addressing Quality Performance Across Supply Partners 2012
PPTX
Posibles inventos en los proximos 100 años
PDF
Tech Paper Dismantling WAGR PVandI 1999
PDF
레일스 환경 변수
PDF
Practical-bayesian-optimization-of-machine-learning-algorithms_ver2
PDF
Transition Training - IDEA
PDF
Financial software
PDF
Werving en selectie
Addressing Quality Performance Across Supply Partners 2012
Posibles inventos en los proximos 100 años
Tech Paper Dismantling WAGR PVandI 1999
레일스 환경 변수
Practical-bayesian-optimization-of-machine-learning-algorithms_ver2
Transition Training - IDEA
Financial software
Werving en selectie
Ad

Similar to Funtional Web Service Composition (20)

PPT
Composing REST Services
PPT
Introduction to soa composition
PDF
Composing REST Services
PDF
Writing RESTful Web Services
PDF
Web Services Composition
PDF
Semantic Web: A Study on Web Service Composition Approaches
PPTX
PPTX
cloud enabling tecnologies , unit ii [cc]
PDF
Web Service Composition
PPTX
PPTX
Party + REST = Win
PPTX
Modularizing RESTful Web Service Management with Aspect Oriented Programming
PPT
Automating the Use of Web APIs through Lightweight Semantics
PDF
Pal gov.tutorial3.session13.bpel
PPTX
About REST. Архитектурные семинары Softengi
PDF
Best Practices in Web Service Design
PPT
Design And Implementation Of Web Service Testing Framework Mit Template
PDF
Presentation M. Manouvrier #apidays 2013
PDF
USP presentation of CHOReOS @ FISL Conference
PPT
ROA.ppt
Composing REST Services
Introduction to soa composition
Composing REST Services
Writing RESTful Web Services
Web Services Composition
Semantic Web: A Study on Web Service Composition Approaches
cloud enabling tecnologies , unit ii [cc]
Web Service Composition
Party + REST = Win
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Automating the Use of Web APIs through Lightweight Semantics
Pal gov.tutorial3.session13.bpel
About REST. Архитектурные семинары Softengi
Best Practices in Web Service Design
Design And Implementation Of Web Service Testing Framework Mit Template
Presentation M. Manouvrier #apidays 2013
USP presentation of CHOReOS @ FISL Conference
ROA.ppt
Ad

Funtional Web Service Composition

  • 1. Functional Composition of Web Services Rohit Kumar Gupta Matrikel number : 2557833 Department of Computer Science University of Saarland Seminar : Advanced Topics in Service Computing 2 June, 2016 1Functional Composition of Web Services
  • 2. 2Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 3. 3Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 4. 4Functional Composition of Web Services Web Service • What is a Web Service? - software application - service over web - interoperable - URI • Example - single login service is utilized by many applications Client Server Software 1 Software 2 Network Request Response login service Buxfer Instagram Quora
  • 5. 5Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 6. 6Functional Composition of Web Services REpresentational State Transfer (REST) REST - architectural pattern supporting - modularity - statelessness - scalability - everything is a resource - every resource has a URI - format : <protocol>://<application-name>/<ResourceType>/<ResourceID> - Example - http://amazon.com/products Standard invocation methods - Get : provides read only access to resource - Put : create a new resource - Post : updates existing resource or create a new resource - Delete : removes resource
  • 7. 7Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. Taxonomy • WSDL • REST • BPEL 4. State of the Art 5. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 6. Evaluation • Centralized vs Decentralized Web Service composition 7. References
  • 8. 8Functional Composition of Web Services Motivation • What is a Web Service Composition? - integration of web services - high level process - new utility Me Family Hos- pital Police Insu- rance • Real world example : Lets suppose Mr. X had an accident.... 4 services : 1. Hospital 2. Family 3. Insurance 4. Police 1 2 3 4 5 6 7 8
  • 9. 9Functional Composition of Web Services Motivation • If the services are not composed user will have to : - find each web service separately - process them and get response - establish interaction with other web service - co-ordinance among them • Why ? - adds value for client - wider perspective - reuse of existing services -publishable as web services Me As Client Composed Service as Server Hospital Family Police Insuranc e
  • 10. 10Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. Taxonomy • WSDL • REST • BPEL 4. State of the Art 5. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 6. Evaluation • Centralized vs Decentralized Web Service composition 7. References
  • 11. 11Functional Composition of Web Services Core issues in composition • Service access - invoking different web services - handling synchronous and asynchronous response - management of low level details like interface • Data flow - data flow between services - aggregating - e.g: cost from Bill service is an input for Payment service • Data modelling - formatting - splitting - merging • Control flow - order of invocation - decision-making
  • 12. 12Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 13. 13Functional Composition of Web Services State of the Art • Web Services Business Process Execution Language (OASIS, 2006) - assumes WSDL as service interface - do not support REST features • REST and Web services in WSDL 2.0 (E. Chinthaka , 2007) - use new WSDL 2.0 bindings - WSDL 2.0 is not fully developed to describe Restful web service - Additional workload of writing WSDL 2.0 • Composing RESTful services with Jopera (Pautasso, 2009) - stateful composition • I mentioned these three, there are others as well Next Target : Implement composition that has all REST features WSDL – Web Service Description Language
  • 14. 14Functional Composition of Web Services Business Process Execution Language (BPEL) BPEL - XML based composition language - uses WSDL for web service interaction - internal process control flow - develops reusable business processes - basic activities : invoke, receive, and reply definition of web service WSDL WSDL WSDL Client receive invoke invoke reply Web service 1 Web service 2 Flow diagram of BPEL web service
  • 15. 15Functional Composition of Web Services State of the Art • Web Services Business Process Execution Language (OASIS, 2006) - assumes WSDL as service interface - do not support REST features • REST and Web services in WSDL 2.0 (E. Chinthaka , 2007) - use new WSDL 2.0 bindings - WSDL 2.0 is not fully developed to describe Restful web service - Additional workload of writing WSDL 2.0 • Composing RESTful services with Jopera (Pautasso, 2009) - stateful composition • I mentioned these three, there are others as well Next Target : Implement composition that has all REST features
  • 16. 16Functional Composition of Web Services State of the Art • BPEL, REST web services in WSDL 2.0(2007) - WSDL 2.0 provides bindings for all HTTP request methods - BPEL developers create WSDL 2.0 description - BPEL designed with respect to WSDL 1.1 - lack of semantic information about REST operations - Additional workload of writing WSDL 2.0 Source : Restful Web Service composition with BPEL for REST
  • 17. 17Functional Composition of Web Services State of the Art • Web Services Business Process Execution Language (OASIS, 2006) - assumes WSDL as service interface - do not support REST features • REST and Web services in WSDL 2.0 (E. Chinthaka , 2007) - use new WSDL 2.0 bindings - WSDL 2.0 is not fully developed to describe Restful web service - Additional workload of writing WSDL 2.0 • Composing RESTful services with Jopera (Pautasso, 2009) - stateful composition • I mentioned these three, there are others as well Next Target : Implement composition that has all REST features
  • 18. 18Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 19. 19Functional Composition of Web Services BPEL for REST (extension of BPEL for compliance with Restful web services, Pautasso,2009) • Invoking Restful Web services - 4 new activities : get, post, put and delete - computes and stores URI in BPEL variables - similar to invoke activity • Handling invocation failures - error response (HTTP code : 4xx or 5xx) - defining fault handlers • Defining request handlers - marks progress of composition - onGet, onPost, onDelete, onPut • Composition - receive request - perform invocation - inside scope - outside scope - inside request handler -further invocation -state transition logic - framing response defining request handlers invocation activities according to business logic basic intuition Restful WS request Source : Restful Web Service composition with BPEL for REST
  • 20. 20Functional Composition of Web Services Invocation of Restful web service fault handlers address of target resource response received from resource Meta data invocation activity Source : Restful Web Service composition with BPEL for REST
  • 21. 21Functional Composition of Web Services Publishing Restful web service tag to publish resource BPEL variables request handlers framing response Source : Restful Web Service composition with BPEL for REST
  • 22. 22Functional Composition of Web Services BPEL for REST’s Architecture Front End : Handles HTTP requests from clients by routing BPEL engine to the corresponding request handler Back End : Invoke and bind a Restful services down to an HTTP request-response interaction Source : Restful Web Service composition with BPEL for REST
  • 23. 23Functional Composition of Web Services Example – E-commerce scenario Client can : • place an order • get order information •delete order •update order •pay gives product information and price catalog composed service state transition Source : Restful Web Service composition with BPEL for REST
  • 24. 24Functional Composition of Web Services Implementation Code Source : Restful Web Service composition with BPEL for REST
  • 25. 25Functional Composition of Web Services Outcome • Issues addressed dynamic late binding - appending URI dynamically (extract using XPath language) dynamic typing - uses header attribute to know content-type dynamically state transition logic – based on response code uniform interface • Open issues  composition is stateful, BPEL process is centralized  advanced control flow constructs is not discussed  dealing with delayed response
  • 26. 26Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 27. 27Functional Composition of Web Services Control flow for Decentralized Restful Services (Bellido, Alarcon, Pautasso,2013) Four issues to handle : 1. Hypermedia Aware 2. Open Connection 3. Decentralization 4. Statelessness The main focus of this paper include: • leveraging existing communication protocols • discuss control flow patterns • stateless composition of Restful service
  • 28. 28Functional Composition of Web Services Hypermedia aware 1. Hypermedia Aware - component identification at runtime - control flow discovery - awareness about resources using ReLL 2. Open Connection - handle long running business processes - using callback connectors 3. Decentralization - distribution of composition responsibility - concurrency - availability of composed service - load balancing 4. Statelessness - state information stored at client side - scalability - deallocate resources
  • 29. 29Functional Composition of Web Services Hyper media awareness using Resource Linking Language (ReLL) • Resource Linking Language - XML document - resource descriptor - semantically defines links - dynamic extraction of data - contains resource identifier, representation, links to other resources - composed service invokes descriptor of a resource as needed Source : Control Flow for Decentralized REST
  • 30. 30Functional Composition of Web Services Open Connection and Decentralization 1. Hypermedia aware - component identification at runtime - awareness about resources using ReLL - control flow discovery 2. Open Connection - handle long running business processes - using callback connectors 3. Decentralization - distribution of composition responsibility - concurrency - availability of composed service - load balancing 4. Statelessness - state information stored at client side - scalability - deallocate resources
  • 31. 31Functional Composition of Web Services Centralized composition Lets, first consider the case of Centralized composition Example : we have 3 services 1. Commerce 2. Seller 3. Bank Source : Control Flow for Decentralized REST
  • 32. 32Functional Composition of Web Services Open Connection and Decentralized composition • Each time different resource handles composition state • Issue of coupling is also handled Composition logic and state stored Component resources Source : Control Flow for Decentralized REST
  • 33. 33Functional Composition of Web Services Statelessness 1. Hypermedia aware - component identification at runtime - awareness about resources using ReLL - control flow discovery 2. Open Connection - handle long running business processes - using callback connectors 3. Decentralization - distribution of composition responsibility - concurrency - availability of composed service - load balancing 4. Statelessness - state information stored at client side - scalability - deallocate resources
  • 34. 34Functional Composition of Web Services Statelessness Statelessness - send aggregated state information to composite resources - composite resource to stores only business logic - composite resource redirects new state to client with fresh instructions - callback address of next composite resource to invoke - composite resource deallocates resources like memory used - shared responsibility Client Composed resource • current state + old states received • request for next instruction • new state • next instruction to execute • callback address Only business logic stored Composition state stored
  • 35. 35Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flows 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 36. 36Functional Composition of Web Services Control flows Sequence WS 1 WS 2 Client Unordered Sequence WS 1 WS 2 Client WS 2 WS 1
  • 37. 37Functional Composition of Web Services Control flows … continue Alternate WS 1 Client WS 2 Iterative WS 1 Client Evaluation condition
  • 38. 38Functional Composition of Web Services Parallel WS 1 Client WS 3 Parallel 1. Synchronization – for all 2. Discriminator – for one 3. Partial Join – fixed number 4. Selection – number not fixed Control flows … continue Evaluation condition WS 2
  • 39. 39Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flow 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 40. 40Functional Composition of Web Services Centralized v/s Decentralized Web Service composition Response Time - total time between sending of request and receiving response - resource loading and unloading tasks Parameter processing capacity : 100 request/sec queue size : 100 request n : number of components Source : Control Flow for Decentralized REST
  • 41. 41Functional Composition of Web Services Centralized v/s Decentralized Web Service composition ... continue Availability - proportion of successful service invocation - concurrency Parameter processing capacity : 100 request/sec queue size : 100 request n : number of components Source : Control Flow for Decentralized REST
  • 42. 42Functional Composition of Web Services Centralized v/s Decentralized Web Service composition ... continue Throughput - Amount of workload processed per unit time Parameter processing capacity : 100 request/sec queue size : 100 request n : number of components Source : Control Flow for Decentralized REST
  • 43. 43Functional Composition of Web Services Resolved and Open issues Open - handling HTTP response with 200, while removing coupling issue - dependency on user - security of data financial data - unresponsive web services - handling exchange of massive state information over HTTP Resolved - scalability - statelessness - decentralization - control flow - asynchronous responses
  • 44. 44Functional Composition of Web Services Outline 1. Introduction • Web Service • REST 2. Web Service Composition • Motivation • Issues in Web Service Composition 3. State of the Art 4. Proposed Solution • BPEL for REST • Control flow for Decentralized Restful Services • Control flow 5. Evaluation • Centralized vs Decentralized Web Service composition 6. References
  • 45. 45Functional Composition of Web Services References - A. Lagares Lemos, F. Daniel, B. Benatallah: “Web Service Composition: A Survey of Techniques and Tools”. ACM Computing Surveys, 48(3), ACM. 2015 - M. Garriga, C. Mateos, A. Flores, A. Cechich, A. Zunino: “RESTful Service Composition at a Glance: A Survey". Journal of Network and Computer Applications. Elsevier. 2015 - OASIS, Web Services Business Process Execution Language (WSBPEL) 2.0, 2006 - Bellido, J., Alarcon, R., and Sepulveda, C. 2011. Web linking-based protocols for guiding RESTful M2M interaction. - Composing restful services with jopera Cited by : - Autonomous Composition and Execution of REST APIs for Smart Sensors - REST Web Service Description for Graph-Based Service Discovery - An Overview and Classification of Service Description Approaches in Automated Service Composition Research