funtional web service composition

Post on 15-Apr-2017

82 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Functional Composition of Web Services

Rohit Kumar GuptaMatrikel number : 2557833

Department of Computer ScienceUniversity of Saarland

Seminar : Advanced Topics in Service Computing2 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. Hospital2. Family3. Insurance4. 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

MeAs Client

Composed Service as

Server

Hospital Family

PoliceInsurance

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 ofweb 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

requesthandlers

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 correspondingrequest 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 dynamicallystate transition logic – based on response codeuniform 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 compositionExample : we have 3 services1. Commerce2. Seller3. 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

ClientComposed 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

SequenceWS 1 WS 2

Client

UnorderedSequence

WS 1 WS 2

Client WS 2 WS 1

37Functional Composition of Web Services

Control flows … continue

Alternate

WS 1

Client WS 2

IterativeWS 1

Client

Evaluation condition

38Functional Composition of Web Services

Parallel

WS 1

Client

WS 3

Parallel

1. Synchronization – for all2. Discriminator – for one3. Partial Join – fixed number4. 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

Parameterprocessing capacity : 100 request/secqueue size : 100 requestn : 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

Parameterprocessing capacity : 100 request/secqueue size : 100 requestn : 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

Parameterprocessing capacity : 100 request/secqueue size : 100 requestn : 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 M2Minteraction.

- 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

top related