REST vs. SOAP:  Making the Right  Architectural Decision Cesare Pautasso Faculty of Informatics University of Lugano (USI)...
Agenda <ul><li>Motivation: A short history of Web Services </li></ul><ul><li>Comparing REST vs. SOAP/WS-* </li></ul><ul><l...
Web Sites (1992) HTTP HTML Web  Browser Web  Server
Web Sites (1992) HTTP HTML Web  Browser Web  Server (HTTP) SOAP Server Client XML WSDL WS-*  Web Services (2000)
RESTful  Web Services (2006) Client HTTP PO-XML RSS JSON Web  Server WADL WS-*  Web Services (2000) (HTTP) SOAP Server Cli...
 
XML URI HTTP MIME JSON RESTful SSL RSS
Is REST being used? Slide from Paul Downey, BT
Can we really compare  WS-* vs. REST? WS-* REST
Can we really compare  WS-* vs. REST? WS-* SOA Middleware Interoperability Standards REST Architectural style for  the Web
How to compare? WS-* SOA Middleware Interoperability Standards REST Architectural style for  the Web
How to compare? WS-* SOA Middleware Interoperability Standards REST Architectural style for  the Web Architectural Decisio...
Architectural Decisions <ul><li>Architectural decisions capture the main design issues and the rationale behind a chosen t...
Application Integration Styles File  Transfer Shared Database Message Bus Remote Procedure  Call
Application Integration Styles File  Transfer Shared Database Message Bus Remote Procedure  Call WS-* REST Integration Tec...
Related Decisions (WS-*) File  Transfer Shared Database Message Bus Remote Procedure  Call WS-* REST
Related Decisions (RPC) File  Transfer Shared Database Message Bus Remote Procedure  Call WS-* REST
Decision Space Overview
Decision Space Summary <ul><li>21 Decisions and 64 alternatives </li></ul><ul><li>Classified by level of abstraction: </li...
Decision Space Summary <ul><li>21 Decisions and 64 alternatives </li></ul><ul><li>Classified by level of abstraction: </li...
Architectural Principles <ul><li>Protocol Layering </li></ul><ul><ul><li>HTTP = Application-level Protocol  (REST) </li></...
RESTful Web Service Example HTTP Client (Web Browser) Web Server Database GET /book?ISBN=222 SELECT *  FROM books  WHERE i...
Big Web Service Example  (from REST perspective) HTTP Client (Stub Object) Web Server POST /soap/endpoint POST /soap/endpo...
Protocol Layering <ul><li>“ The Web is the universe of globally accessible information”  (Tim Berners Lee) </li></ul><ul><...
Dealing with Heterogeneity <ul><li>Enterprise Computing </li></ul><ul><li>Web Applications </li></ul>CICS IMS Picture from...
Dealing with Heterogeneity <ul><li>Enterprise Computing </li></ul><ul><li>Web Applications </li></ul>CICS IMS Picture from...
Conceptual Comparison
Conceptual Comparison
Conceptual Comparison
Technology Comparison
Technology Comparison
Technology Comparison
Technology Comparison
Technology Comparison
Measuring Complexity <ul><li>Architectural Decisions give a  quantitative measure  of the complexity  of an architectural ...
Measuring Complexity Decisions with  1 or more  alternative options Decisions with  more than 1  alternative options 35 27...
Measuring Complexity Decisions with  more than 1  alternative options <ul><li>URI Design </li></ul><ul><li>Resource Intera...
Measuring Complexity Decisions with  more than 1  alternative options Decisions with  only 1  alternative option 32 16 Alt...
Measuring Complexity Decisions with  only 1  alternative option <ul><li>Payload Format </li></ul><ul><li>Data Representati...
Measuring Effort Decisions with  only 1  alternative option Decisions with  only  do-it-yourself  alternatives 2 12 Decisi...
Measuring Effort Decisions with  only  do-it-yourself  alternatives <ul><li>Resource Identification </li></ul><ul><li>Reso...
Freedom of Choice Freedom from Choice
Comparison Summary <ul><li>Architectural Decisions measure complexity implied by alternative technologies </li></ul><ul><l...
Conclusion <ul><li>You should focus on whatever solution gets the job done and try to  avoid being religious  about any sp...
References <ul><li>Cesare Pautasso, Olaf Zimmermann, Frank Leymann, </li></ul><ul><li>RESTful  Web Services vs. Big Web Se...
Upcoming SlideShare
Loading in …5
×

REST vs. SOAP (Making the Right Architectural Decision) - 1st International SOA Symposium, Amsterdam, October 2008

44,449 views

Published on

Recent technology trends in Web services indicate that a solution eliminating the perceived complexity of the WS-* standard technology stack may be in sight: advocates of REpresentational State Transfer (REST) have come to believe that their ideas explaining why the World Wide Web works are just as applicable to solve enterprise application integration problems and to radically simplify the plumbing required to build service-oriented architectures.

In this talk we take a very detailed look at the WS-* vs. REST debate by presenting a technical comparison based on architectural principles and decisions. We show how the two approaches differ in the number of architectural decisions that must be made and in the number of available design alternatives each provides.

We will also reveal the truth behind the *perceived* complexity differences between these two architectural styles and we will demonstrate that there are very real consequences of choosing one over the other, resulting in both development and maintenance impacts. Our comparison helps technical decision makers to assess these two technology frameworks objectively and to select the one that best fits their needs.

Published in: Technology, Travel
5 Comments
115 Likes
Statistics
Notes
No Downloads
Views
Total views
44,449
On SlideShare
0
From Embeds
0
Number of Embeds
1,034
Actions
Shares
0
Downloads
0
Comments
5
Likes
115
Embeds 0
No embeds

No notes for slide
  • REST vs. SOAP (Making the Right Architectural Decision) - 1st International SOA Symposium, Amsterdam, October 2008

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

    ×