service migration

23
Migrating of SOAP-based Services to RESTful Services Bipin Upadhyaya Queen’s University

Upload: bipin

Post on 14-Jul-2015

506 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Service migration

Migrating of SOAP-based Services to RESTful Services

Bipin Upadhyaya

Queen’s University

Page 2: Service migration

Limitations of SOAP-based Services

No Web in traditional web servicesNo use of scalability features of WebService provider dependent interfacesProblematic standardization process

InfightingLack of architectural coherence

2

Page 3: Service migration

RESTful Services

A resource is any entity that can be identified or named

Uniform interface for all resourcesHypermedia as the engine of application state

(HATEOAS)Not only the name of resources but also the

relationships between resources

3

Page 4: Service migration

4

1. Request

Resources

2. Response

How does client know about Resources ?Initial starting nodeAnd then the user agent is guided through the response

Links and Forms

GET http://../book?search=Night Star

<xml><book><name>Night Star </name><author> </author></book><a rel=“review” href=“http://..order/ns/reveiw” /><a rel=“order” href=“http://..order/ns” /></xml>

GET http://..order/ns/reveiw 3. Request

Page 5: Service migration

“….. 85% of service requests employed on RESTful API, not SOAP, and that querying Amazon using REST was roughly six times faster than with the SOAP equivalents”

-Jeff Barr [Amazon]

Protocol usage by API [src: programmableweb.com]

Total Service : 2198

5

Page 6: Service migration

SSOAOAPPRRESESTT

Motivation

RESTful services has various advantages over SOAP-based servicesScalability of component interactionsGenerality of interfacesIndependence in components deployment

New services and service clients support RESTful services

6

Page 7: Service migration

WSDL

I/O Parameters

7

Page 8: Service migration

Overview of Our Approach

8

Page 9: Service migration

Clustering WSDL Operations

Criteria for Clustering

923.1255

))15((*2),( =

++++=rByIDGetCustomeomerGetAllCustsimilarity

9

Page 10: Service migration

Identifying Resources From a Cluster

Extract NounsInput and output parameters is considered as

noun

Find word relationship/hierarchy between extracted words

Find resource/container relationship

10

Page 11: Service migration

Identifying Resources From a Cluster

Initially rank the words, according to the place of occurrence. Words in semantic region are given highest priority,

input parameters as second and output parameters as third.

Check if the word already exits as a resource. If so give increase its priority.

Check the relationship between the words and prioritize them according to the relationship.

Combine the words to form the resource.

11

Page 12: Service migration

Example Identify Noun

12

getModifiedCustomer getCustomerByCustID getAllCustomer

Semantic Customer Customer Customer

Output Operation

Customer Customer Customer[]

Input Operation

- CustID --

Resource : /customer

Page 13: Service migration

Identifying Resource Methods

Semantic analysis of each operationExtract and analyze verbs from the operation

namesBased on fan-in and fan-out of the operationsIn case of conflict, revisit the cluster to form the

new URI.

Example : getCards() Extract verb get [Equivalent to HTTP operation

Get]

13

Page 14: Service migration

Example Identify Resource Methods

14

getModifiedCustomer getCustomerByCustID getAllCustomer

Semantic Customer Customer Customer

Output Operation

Customer Customer Customer[]

Input Operation

- CustID --

Verb GET, Modified GET GET

Resource : /customer/{custid}HTTP-Method: GET

Resource : /customer/modifiedHTTP-Method: GET

Resource : /customerHTTP-Method: GET

Page 15: Service migration

Example

Resource HTTP-Methods Functions

/customer GET GetAllCustomers

/customer/modified GET GetModifiedCustomers

/customer/{custID} GET GetAllCustomerByCustID

/servicelocations GET GetAllServiceLocations

/servicelocations/modified GET GetModifiedServiceLocations

/servicelocations/{serloc} GET GetAllServiceLocationBySerLoc 15

Page 16: Service migration

Example

/campaign GetCampaings GET

CreateOrUpdateCampaign POST

DeleteCampaign DELETE

/campaign/account/recepients GetCampaignAccountRecepients GET

DeleteCampaignAccountRecepient DELETE

CreateOrUpdateCampaignAccountRecepient POST

/campaign/account/recepients? #methodname= ImportCampaignAccountRecepients

ImportCampaignAccountRecepients POST

16

Page 17: Service migration

Resource Verification

17

Page 18: Service migration

Wrapping SOAP-based Services

18

Page 19: Service migration

Case Study

• Analyzed publicly available WSDL documents.

Category # Description

Finance 12 Services related to financial management and banks.

Government 6 Services provided by government organization.

Travel/Tourism 17 Services that are related to travel and tourism e.g., flight book, hotel booking, and taxi reservation.

Ecommerce 13 Services provided by online business e.g., Amazon, BestBuy and EBay.

Others 13 Services from domains such as weather, music search, content sharing and aggregation.

19

Page 20: Service migration

Case Study

20

Category # Methods

#Predicted Resources

#misidentified Resources

#ActualResources

Precision Recall

Finance 59 35 8 40 0.77 0.67Government 39 25 2 27 0.92 0.85Travel/Tourism

132 97 16 110 0.83 0.73

Ecommerce 102 80 14 90 0.82 0.73

Others 78 47 6 53 0.87 0.77

Page 21: Service migration

Performance Measurement

21

Page 22: Service migration

Conclusion and Future work

Provide a mechanism to migrate SOAP-based services to RESTful services

Validate the mechanism with larger set of WSDL files

Extend the approach to migrate other legacy systems to RESTful services.

Page 23: Service migration