Web Service OrchestrationEmílio Francesquini, Felipe Besson, Leonardo Leite                   IME - USP       {emilio, bes...
Service - Definition• According to W3C, web service:  o Is a software system designed to support machine-to-    machine in...
Examples in the WebRSSGoogle Calendar (CalDAV over HTTP)can be synchronized with iCalAmazon Web Services (SOAP ou RESTover...
Web Services• Web services have been used to integrate systems,  replacing:  o   The use of TCP/IP sockets  o   CORBA, JRM...
WS – Features• Any language supporting TCP sockets are ready for using  web services• The use of HTTP make web services mo...
SOAP• Standard for supporting the interoperability of  heterogeneous systems.• Since 2003, it is a W3C standard• In the be...
Message Format                 7
Example of a Soap request                            8
Example of a Soap response                             9
WSDL - Hello world<?xml version="1.0" encoding="UTF-8"?><definitions xmlns:soap=””http://schemas.xmlsoap.org/wsdl/soap/"xm...
WSDL Example - Hello world<binding name="HelloWorldPortBinding" type="tns:HelloWorld"><soap:binding transport="http://sche...
Disadvantages• Messages are too big:  o Low performance during the processing in the client and    the server sides  o Req...
WS Composition• Tipically, a real case of WS Composition involves:   o More than one web service   o Order / interdependen...
Web Service Compositions• Orchestration - Centralized• Choreography - Distributed                                14
Composition - Example• Sale system:  o Customer registration  o Charging• Used in all computers of a store                ...
Solution 1• I can write the code using my favorite programming  language and then, I integrate the ws client into my  syst...
Solution 2• I can copy the code and deploy it with my website• Now, both website and client share the code containing  the...
Problems 1• Web services are implemented possibly in several languages ​  but the information flow and their relationship ...
Problems 2• Changes in web services, even small ones, involves customers  upgrade and deployment of new version of the sit...
Solution 3• A new web service is created  o Containing the entire workflow and composition rules  o Controlling transactio...
However, some problems remain• Workflow coupled to a specific programming language• The developer still must deal with the...
Orchestration• BPEL – Business Process Execution Language  o 2002    o   BPEL4WS – BEA (now Oracle)    o   WSFL – IBM    o...
BPELShin, 2010                    23
Motivations for using BPEL• A business standard• Supported by tools, some of them free, for editing and  executing BPEL   ...
BPEL Structure<process ...>  <partnerLinks> ... </partnerLinks>  <variables> ... </variables>  <correlationSets> ... </cor...
Activities accepted by BPEL• Basic                  •   Structured   •   <invoke>              • <if>   •   <receive>     ...
BPEL - synchronous example<?xml version="1.0" encoding="UTF-8"?><process name="SynchronousSample" ...><import namespace="h...
BPEL - synchronous example<partnerLinks><partnerLinkname="SynchronousSample"partnerLinkType="ns1:partnerlinktype1"myRole="...
BPEL - Exemplo síncrono<sequence><receive name="start" partnerLink="SynchronousSample" operation="operation1"portType="ns1...
BPEL - synchronous example                        30
BPEL - synchronous example                        31
ESB    • Acronym for Enterprise Service Bus    • The same idea of hardware bus, ESB is charge of:       o transporting,   ...
Petals• Open Source ESB – LGPL 2.1• Compatible with the standards: JBI and BPEL• Hot service deployment• Hot component ins...
Questions? This research has received founding from:                                             34
References• W3C Web Services Choreography Working Group Charter• http://www.w3.org/2005/12/wscwg-charter.html• Web Service...
References• ZHANG, Liang-Jie. Services Computing, Pequim,  Springer, 2007• Hewitt, Eben, Java SOA Cookbook, 1st Edition, 2...
Upcoming SlideShare
Loading in …5
×

USP presentation of CHOReOS @ FISL Conference

1,025 views
884 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,025
On SlideShare
0
From Embeds
0
Number of Embeds
171
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

USP presentation of CHOReOS @ FISL Conference

  1. 1. Web Service OrchestrationEmílio Francesquini, Felipe Besson, Leonardo Leite IME - USP {emilio, besson, leofl}@ime.usp.br FISL 12 Porto Alegre, June 29, 2011
  2. 2. Service - Definition• According to W3C, web service: o Is a software system designed to support machine-to- machine interaction over a network o Is described by an interface which is machine readable (more specific WSDL)• Other systems can interact with web services through Soap messages• The interaction is realized using XML over HTTP, and other web standards 2
  3. 3. Examples in the WebRSSGoogle Calendar (CalDAV over HTTP)can be synchronized with iCalAmazon Web Services (SOAP ou RESTover HTTP) o EC2 o S3 o SimpleDB o ... 3
  4. 4. Web Services• Web services have been used to integrate systems, replacing: o The use of TCP/IP sockets o CORBA, JRMI, RPC... 4
  5. 5. WS – Features• Any language supporting TCP sockets are ready for using web services• The use of HTTP make web services more suitable for bypassing firewalls, proxies, …• It is widely accepted by companies• Loose coupling and the possibility of evolution of the interface while maintaining backward compatibility 5
  6. 6. SOAP• Standard for supporting the interoperability of heterogeneous systems.• Since 2003, it is a W3C standard• In the beginning, Soap was an acronym for Simple Object Access Protocol o Then, it was decided that the acronym means nothing :-) 6
  7. 7. Message Format 7
  8. 8. Example of a Soap request 8
  9. 9. Example of a Soap response 9
  10. 10. WSDL - Hello world<?xml version="1.0" encoding="UTF-8"?><definitions xmlns:soap=””http://schemas.xmlsoap.org/wsdl/soap/"xmlns:tns=”http://hello” xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://hello/"name="HelloWorldService"><types><xsd:schema><xsd:import namespace="http://hello/"schemaLocatio=”http://localhost:8080/hello?xsd=1"></xsd:import></xsd:schema></types><message name="sayHelloTo"><part name="parameter" element="tns:sayHelloTo"></part></message><message name="sayHelloToResponse"><part name="parameter" element="tns:sayHelloToResponse"></part></message><portType name="HelloWorld"><operation name="sayHelloTo"><input message="tns:sayHelloTo"></input><output message="tns:sayHelloToResponse"></output></operation></portType> 10
  11. 11. WSDL Example - Hello world<binding name="HelloWorldPortBinding" type="tns:HelloWorld"><soap:binding transport="http://schemas.xmlsoap.org/soap/http”style="document"></soap:binding><operation name="sayHelloTo"><input><soap:body use="literal"></soap:body></input><output><soap:body use="literal"></soap:body></output></operation></binding><service name="HelloWorldService"><port name="HelloWorldPort" binding="tns:HelloWorldPortBinding"><soap:address location="http://localhost:8080/hello”></soap:address></port></service></definitions> 11
  12. 12. Disadvantages• Messages are too big: o Low performance during the processing in the client and the server sides o Requested Bandwidth is large o Extremely inefficient when compared to CORBA or JRMI technologies 12
  13. 13. WS Composition• Tipically, a real case of WS Composition involves: o More than one web service o Order / interdependence between requests to web services o Decision making during the workflow based on the information obtained so far o Dealing with services unavailability o Transaction control o Business automation o ... 13
  14. 14. Web Service Compositions• Orchestration - Centralized• Choreography - Distributed 14
  15. 15. Composition - Example• Sale system: o Customer registration o Charging• Used in all computers of a store 15
  16. 16. Solution 1• I can write the code using my favorite programming language and then, I integrate the ws client into my system: o web services access o exception handling• The workflow is defined by myself 16
  17. 17. Solution 2• I can copy the code and deploy it with my website• Now, both website and client share the code containing the workflow, rules, …. 17
  18. 18. Problems 1• Web services are implemented possibly in several languages ​ but the information flow and their relationship get couple to a specific language• The developer must deal with: o Paralelism o Transaction o Fault tolerance (e.g., service unavailability) 18
  19. 19. Problems 2• Changes in web services, even small ones, involves customers upgrade and deployment of new version of the site• Client/Site can became overloaded due the communication with the server• Limitation of devices / code replication.. 19
  20. 20. Solution 3• A new web service is created o Containing the entire workflow and composition rules o Controlling transactions, paralellism and exceptions handling• Clients, sites and devices begin to use this web service directly 20
  21. 21. However, some problems remain• Workflow coupled to a specific programming language• The developer still must deal with the transaction, parallelism and exceptions handling. 21
  22. 22. Orchestration• BPEL – Business Process Execution Language o 2002 o BPEL4WS – BEA (now Oracle) o WSFL – IBM o XLANG – Microsoft o ... SAP and Siebel Systems. o 2003 – Open Standard WS-BPEL, by OASIS o XML with .bpel extension o Normally called by BPEL when the specific version does not matter 22
  23. 23. BPELShin, 2010 23
  24. 24. Motivations for using BPEL• A business standard• Supported by tools, some of them free, for editing and executing BPEL o Apache – ODE o Oracle – OpenESB, NetBeans 6.X o Active Endpoints – The Active BPEL, ActiveBPEL Designer o Microsoft – BizTalk o Oracle – BPEL Process Manager o Petalslink – EasyBPEL• Portability* between different enforcement mechanisms 24
  25. 25. BPEL Structure<process ...> <partnerLinks> ... </partnerLinks> <variables> ... </variables> <correlationSets> ... </correlationSets> <compensationHandlers> ... </compensationHandlers> <eventHandlers> ... </eventHandlers> ... (activities belonging to the business flow)</process> 25
  26. 26. Activities accepted by BPEL• Basic • Structured • <invoke> • <if> • <receive> • <while> • <reply> • <repeatUntil> • <assign> • <foreach> • <throw> • <pick> • <wait> • <flow> • <empty> • <sequence> • <exit> • <scope> 26
  27. 27. BPEL - synchronous example<?xml version="1.0" encoding="UTF-8"?><process name="SynchronousSample" ...><import namespace="http://SynchronousSample"location="SynchronousSample.xsd"importType="http://www.w3.org/2001/XMLSchema"/><import namespace="http://SynchronousSample"location="SynchronousSample.wsdl"importType="http://schemas.xmlsoap.org/wsdl/"/> 27
  28. 28. BPEL - synchronous example<partnerLinks><partnerLinkname="SynchronousSample"partnerLinkType="ns1:partnerlinktype1"myRole="partnerlinktyperole1"></partnerLink></partnerLinks><variables><variable name="outputVar"messageType="ns1:responseMessage"/><variable name="inputVar"messageType="ns1:requestMessage"/></variables> 28
  29. 29. BPEL - Exemplo síncrono<sequence><receive name="start" partnerLink="SynchronousSample" operation="operation1"portType="ns1:portType1" variable="inputVar" createInstance="yes"/><assign name="Assign1"><copy><from>concat(Hello , $inputVar.inputType/ns2:paramA, !!!)</from><to>$outputVar.resultType/ns2:paramA</to></copy></assign><reply name="end" partnerLink="SynchronousSample" operation="operation1"portType="ns1:portType1" variable="outputVar"></reply></sequence></process> 29
  30. 30. BPEL - synchronous example 30
  31. 31. BPEL - synchronous example 31
  32. 32. ESB • Acronym for Enterprise Service Bus • The same idea of hardware bus, ESB is charge of: o transporting, o routing, o And messages delivering • Service access management  • These activities can be performed without an ESB o The goal of a ESB is just facilitate the work =p 32
  33. 33. Petals• Open Source ESB – LGPL 2.1• Compatible with the standards: JBI and BPEL• Hot service deployment• Hot component installation• Tools to support the development: o PetalsStudio o Web Console 33
  34. 34. Questions? This research has received founding from: 34
  35. 35. References• W3C Web Services Choreography Working Group Charter• http://www.w3.org/2005/12/wscwg-charter.html• Web Services Glossary, http://www.w3.org/TR/ws-gloss/ 35
  36. 36. References• ZHANG, Liang-Jie. Services Computing, Pequim, Springer, 2007• Hewitt, Eben, Java SOA Cookbook, 1st Edition, 2009,• Shin, San, SOA Using OpenESB, BPEL and NetBeans, 2010• http://ccsl.ime.usp.br/baile 36

×