Web Services in 2008: to or not to? Cesare Pautasso Faculty of Informatics University of Lugano, CH http://www.pautasso.info 3 Web Sites (1992) Web Browser HTML Web Server Web Services (2000) Client SOAP XML () WSDL Server 4 1
ful Web Services (2007) Client RSS PO-XML JSON WADL Web Server Web Services (2000) Client SOAP XML () WSDL Server 5 6 2
ful RSS XML JSON MIME URI SSL 7 Is being used? Slide from Paul Downey, BT 8 3
Can we really compare vs.? 9 Can we really compare vs.? Middleware Interoperability Standards Architectural style for the Web 10 4
How to compare? Middleware Interoperability Standards Architectural Decision Modeling Architectural style for the Web 11 Architectural decisions capture the main design issues and the rationale behind a chosen technical solution The choice between vs. is an important architectural decision for integration projects Architectural decisions affect one another Architectural Decisions Architectural Decision: Communication Protocol Architecture Alternatives: 1. TCP 2. SMTP 3. 4. MQ 5. BEEP 6. CORBA IIOP 7. Rationale 12 5
Application Integration Styles Shared Database Remote Procedure Call Message Bus File Transfer Integration Technology Platform 13 Related Decisions () Shared Database Remote Procedure Call Message Bus File Transfer 14 6
Related Decisions (RPC) Shared Database Remote Procedure Call Message Bus File Transfer 15 Decision Space Overview 16 7
Outline 21 Decisions and 64 alternatives Classified by level of abstraction: 3 Architectural Principles 9 Conceptual Decisions 9 Technology-level Decisions Decisions help us to measure the complexity implied by the choice of or 17 Architectural Principles 1. Protocol Layering = Application-level Protocol () = Transport-level Protocol () 2. Dealing with Heterogeneity 3. Loose Coupling 18 8
ful Web Service Example Client (Web Browser) Web Server Database GET /book?isbn=222 POST /order 301 Location: /order/612 PUT /order/612 SELECT * FROM books WHERE isbn=222 INSERT INTO orders UPDATE orders WHERE id=612 19 Client (Stub Object) Big Web Service Example (from perspective) Web Server Web Service Implementation POST /soap/endpoint POST /soap/endpoint POST /soap/endpoint return getbook(222) return new Order() order.setcustomer(x) 20 9
Protocol Layering The Web is the universe of globally accessible information (Tim Berners Lee) Applications should publish their data on the Web (through URI) The Web is the universal (tunneling) transport for messages Applications get a chance to interact but they remain outside of the Web POX RSS JSON SOAP () GET POST PUT DEL SMTP POST MQ Resource URI Application Endpoint URI Application 21 Dealing with Heterogeneity Web Applications Enterprise Computing CICS IMS Picture from Eric Newcomer, IONA 22 10
Conceptual Comparison 23 Technology Comparison 24 11
Measuring Complexity Architectural Decisions give a quantitative measure of the complexity of an architectural design space: Total number of decisions For each decision, number of alternative options For each alternative option, estimate the effort Decisions Alternatives 17 27 14 35 Decisions with 1 or more alternative options 25 Measuring Complexity Decisions Alternatives 5 16 12 32 Decisions with more than 1 alternative options Decisions Alternatives 17 27 14 35 Decisions with 1 or more alternative options 26 12
Measuring Complexity Decisions Alternatives 5 16 12 32 Decisions with more than 1 alternative options URI Design Resource Interaction Semantics Payload Format Service Description Service Composition 27 Measuring Complexity Decisions Alternatives 5 16 12 32 Decisions with more than 1 alternative options Decisions 12 2 Decisions with only 1 alternative option 28 13
Measuring Complexity Payload Format Data Representation Modeling Decisions 12 2 Decisions with only 1 alternative option 29 Measuring Effort Do-it-yourself Alternatives 5 0 Decisions with only do-it-yourself alternatives Decisions 12 2 Decisions with only 1 alternative option 30 14
Measuring Effort Do-it-yourself Alternatives 5 0 Decisions with only do-it-yourself alternatives Resource Identification Resource Relationship Reliability Transactions Service Discovery 31 Freedom of Choice Freedom from Choice 32 15
Comparison Summary Architectural Decisions measure complexity implied by alternative technologies simplicity = freedom from choice 5 decisions require to choose among 16 alternatives 12 decisions are already taken (but 5 are do-it-yourself) complexity = freedom of choice 12 decisions require to choose among 32 alternatives 2 decisions are already taken (SOAP, WSDL+XSD) 33 Conclusion You should focus on whatever solution gets the job done and try to avoid being religious about any specific architectures or technologies. has strengths and weaknesses and will be highly suitable to some applications and positively terrible for others. Likewise with. The decision of which to use depends entirely on the application requirements and constraints. We hope this comparison will help you make the right choice. 34 16
References Cesare Pautasso, Olaf Zimmermann, Frank Leymann, ful 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. Cesare Pautasso, BPEL for, Proc. of the 6th International Conference on Business Process Management (BPM 2008), Milan, Italy, September 2008. Cesare Pautasso, Gustavo Alonso: From Web Service Composition to Megaprogramming In: Proceedings of the 5th VLDB Workshop on Technologies for E-Services (TES-04), Toronto, Canada, August 29-30, 2004. 35 17