SlideShare uma empresa Scribd logo
1 de 44
Baixar para ler offline
This Presentation Courtesy of the
                          International SOA Symposium
                          October 7-8, 2008 Amsterdam Arena
                          www.soasymposium.com
                          info@soasymposium.com


                                       Founding Sponsors




Platinum Sponsors




Gold Sponsors       Silver Sponsors
REST vs. SOAP:
              Making the Right
            Architectural Decision
                      Cesare Pautasso
                     Faculty of Informatics
            University of Lugano (USI), Switzerland
                  http://www.pautasso.info


7.10.2008           SOA Symposium 2008, Amsterdam     1
                        ©2008 Cesare Pautasso
Agenda
  1. Motivation: A short history of Web Services
  2. Comparing REST vs. SOAP/WS-*
  3. Architectural Decision Modeling
  4. Conceptual Comparison
  5. Technology Comparison
  6. How to measure the “complexity” of WS-*
     or the “simplicity” of REST?
  7. Conclusion: Making the right Architectural
     Decision
7.10.2008        SOA Symposium 2008, Amsterdam     2
                     ©2008 Cesare Pautasso
Web Sites (1992)


        Web              HTML                    Web
      Browser            HTTP                   Server

 WS-* Web Services (2000)

                         SOAP                   WSDL
            Client        XML                   Server
7.10.2008
                          (HTTP) Amsterdam
                     SOA Symposium 2008,                 3
                        ©2008 Cesare Pautasso
RESTful Web Services (2006)




                              PO-XML
                      JSON


                                       RSS
                                                 WADL
                                                  Web
            Client
                             HTTP                Server

 WS-* Web Services (2000)

                          SOAP                   WSDL
            Client           XML                 Server
7.10.2008
                           (HTTP) Amsterdam
                      SOA Symposium 2008,                 4
                         ©2008 Cesare Pautasso
7.10.2008   SOA Symposium 2008, Amsterdam   5
                ©2008 Cesare Pautasso
RESTful
                  RSS


                  XML          JSON


                       MIME


            URI         HTTP


                         SSL
7.10.2008    SOA Symposium 2008, Amsterdam   6
                 ©2008 Cesare Pautasso
Is REST being used?




                                            Slide from Paul Downey, BT
7.10.2008   SOA Symposium 2008, Amsterdam                                7
                ©2008 Cesare Pautasso
Can we really compare
                   WS-* vs. REST?




            WS-*                                    REST




7.10.2008           SOA Symposium 2008, Amsterdam          8
                        ©2008 Cesare Pautasso
Can we really compare
                     WS-* vs. REST?




             WS-*                                     REST

        SOA Middleware                            Architectural
         Interoperability                           style for
            Standards                               the Web



7.10.2008             SOA Symposium 2008, Amsterdam               9
                          ©2008 Cesare Pautasso
How to compare?



                     Arch itectural
                   Decision  Modeling                   REST

            WS-*                                     Architectural
                                                       style for
 SOA Middleware                                        the Web
  Interoperability
     Standards

7.10.2008            SOA Symposium 2008, Amsterdam                   10
                         ©2008 Cesare Pautasso
Architectural Decisions
• Architectural decisions             Architectural Decision:
  capture the main design             Communication Protocol
  issues and the rationale
  behind a chosen technical           Architecture Alternatives:
  solution                            1. TCP
• The choice between REST             2. SMTP
  vs. WS-* is an important            3. HTTP
  architectural decision for          4. MQ
  integration projects                5. BEEP
• Architectural decisions             6. CORBA IIOP
  affect one another                  7. …

                                      Rationale
7.10.2008           SOA Symposium 2008, Amsterdam                  11
                        ©2008 Cesare Pautasso
Application Integration Styles


  Shared            Remote            Message Bus       File
 Database          Procedure                          Transfer
                      Call




            REST                WS-*


     Integration Technology Platform
7.10.2008             SOA Symposium 2008, Amsterdam              12
                          ©2008 Cesare Pautasso
Related Decisions (WS-*)


  Shared            Remote            Message Bus       File
 Database          Procedure                          Transfer
                      Call




            REST                WS-*




7.10.2008             SOA Symposium 2008, Amsterdam              13
                          ©2008 Cesare Pautasso
Related Decisions (RPC)


  Shared            Remote            Message Bus       File
 Database          Procedure                          Transfer
                      Call




            REST                WS-*




7.10.2008             SOA Symposium 2008, Amsterdam              14
                          ©2008 Cesare Pautasso
Decision Space Overview




7.10.2008    SOA Symposium 2008, Amsterdam   15
                 ©2008 Cesare Pautasso
Decision Space Summary
 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
                      REST or WS-*
7.10.2008            SOA Symposium 2008, Amsterdam   16
                         ©2008 Cesare Pautasso
Architectural Principles


      1. Protocol Layering
            • HTTP = Application-level Protocol (REST)
            • HTTP = Transport-level Protocol      (WS-*)
      2. Dealing with Heterogeneity
      3. Loose Coupling



7.10.2008             SOA Symposium 2008, Amsterdam         17
                          ©2008 Cesare Pautasso
RESTful Web Service Example

      HTTP Client                 Web Server               Database
    (Web Browser)

                                                 SELECT *
             GET /book?ISBN=222                 FROM books
                                               WHERE isbn=222

                 POST /order                         INSERT
                                                   INTO orders
            301 Location: /order/612


               PUT /order/612                    UPDATE orders
                                                 WHERE id=612
7.10.2008                 SOA Symposium 2008, Amsterdam               18
                              ©2008 Cesare Pautasso
Big Web Service Example
                      (from REST perspective)
                                                         Web Service
      HTTP Client               Web Server
                                                        Implementation
     (Stub Object)


            POST /soap/endpoint
                                           return getBook(222)

            POST /soap/endpoint
                                             return new Order()

            POST /soap/endpoint
                                           order.setCustomer(x)


7.10.2008               SOA Symposium 2008, Amsterdam                    19
                            ©2008 Cesare Pautasso
Protocol Layering
• “The Web is the universe of globally       • “The Web is the universal (tunneling)
  accessible information”                      transport for messages”
  (Tim Berners Lee)                              – Applications get a chance to
   – Applications should publish their             interact but they remain
     data on the Web (through URI)                 “outside of the Web”


   POX       RSS        JSON         …                        SOAP (WS-*)

  HTTP       HTTP      HTTP      HTTP                            HTTP
                                                    SMTP                     MQ…
  GET        POST      PUT       DEL                             POST

            Resource URI                                      Endpoint URI

              Application                                     Application
7.10.2008                     SOA Symposium 2008, Amsterdam                            20
                                  ©2008 Cesare Pautasso
Dealing with Heterogeneity

• Web Applications                  • Enterprise Computing




                                                             Picture from Eric Newcomer, IONA
             HTTP


                                                     CICS
                                                      IMS


 7.10.2008           SOA Symposium 2008, Amsterdam                21
                         ©2008 Cesare Pautasso
Conceptual Comparison




                            Note: this table
                             will scroll up
                            during the talk


7.10.2008    SOA Symposium 2008, Amsterdam     22
                 ©2008 Cesare Pautasso
Technology Comparison




                                Note: this table
                                 will scroll up
                                during the talk




7.10.2008    SOA Symposium 2008, Amsterdam         23
                 ©2008 Cesare Pautasso
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
                               REST                     WS-*
      Decisions                 17                       14
      Alternatives              27                       35
             Decisions with 1 or more alternative options
7.10.2008               SOA Symposium 2008, Amsterdam          24
                            ©2008 Cesare Pautasso
Measuring Complexity

                              REST                      WS-*
     Decisions                 5                         12
     Alternatives              16                        32
            Decisions with more than 1 alternative options

                               REST                     WS-*
      Decisions                 17                       14
      Alternatives              27                       35
             Decisions with 1 or more alternative options
7.10.2008               SOA Symposium 2008, Amsterdam          25
                            ©2008 Cesare Pautasso
Measuring Complexity

                              REST                      WS-*
     Decisions                 5                         12
     Alternatives              16                        32
            Decisions with more than 1 alternative options

                 • URI Design
                 • Resource Interaction Semantics
                 • Payload Format
                 • Service Description
                 • Service Composition
7.10.2008               SOA Symposium 2008, Amsterdam          26
                            ©2008 Cesare Pautasso
Measuring Complexity

                              REST                      WS-*
     Decisions                 5                         12
     Alternatives              16                        32
            Decisions with more than 1 alternative options

                              REST                      WS-*
      Decisions                12                        2
            Decisions with only 1 alternative option

7.10.2008               SOA Symposium 2008, Amsterdam          27
                            ©2008 Cesare Pautasso
Measuring Complexity


                            • Payload Format
                            • Data Representation Modeling



                              REST                      WS-*
      Decisions                12                        2
            Decisions with only 1 alternative option

7.10.2008               SOA Symposium 2008, Amsterdam          28
                            ©2008 Cesare Pautasso
Measuring Effort

                              REST                      WS-*
    Do-it-yourself             5                         0
    Alternatives
             Decisions with only do-it-yourself alternatives

                              REST                      WS-*
      Decisions                12                        2
            Decisions with only 1 alternative option

7.10.2008               SOA Symposium 2008, Amsterdam          29
                            ©2008 Cesare Pautasso
Measuring Effort

                             REST                      WS-*
    Do-it-yourself            5                         0
    Alternatives
            Decisions with only do-it-yourself alternatives

               • Resource Identification
               • Resource Relationship
               • Reliability
               • Transactions
               • Service Discovery
7.10.2008              SOA Symposium 2008, Amsterdam          30
                           ©2008 Cesare Pautasso
Freedom of Choice
            Freedom from Choice




7.10.2008   SOA Symposium 2008, Amsterdam   31
                ©2008 Cesare Pautasso
Comparison Summary
• Architectural Decisions measure complexity implied
  by alternative technologies

• REST simplicity = freedom from choice
    – 5 decisions require to choose among 16 alternatives
    – 12 decisions are already taken (but 5 are do-it-yourself)


• WS-* complexity = freedom of choice
    – 12 decisions require to choose among 32 alternatives
    – 2 decisions are already taken (SOAP, WSDL+XSD)
7.10.2008              SOA Symposium 2008, Amsterdam              32
                           ©2008 Cesare Pautasso
Conclusion
• You should focus on whatever solution gets the job
  done and try to avoid being religious about any
  specific architectures or technologies.
• WS-* has strengths and weaknesses and will be
  highly suitable to some applications and positively
  terrible for others. Likewise with REST.
• 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.
7.10.2008         SOA Symposium 2008, Amsterdam      33
                      ©2008 Cesare Pautasso
References
• Cesare Pautasso, Olaf Zimmermann, Frank Leymann,
  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.

• Cesare Pautasso, BPEL for REST, 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.

7.10.2008               SOA Symposium 2008, Amsterdam                  34
                            ©2008 Cesare Pautasso
REST vs. SOAP:
              Making the Right
            Architectural Decision
                      Cesare Pautasso
                     Faculty of Informatics
            University of Lugano (USI), Switzerland
                  http://www.pautasso.info


7.10.2008           SOA Symposium 2008, Amsterdam     35
                        ©2008 Cesare Pautasso
Backup Material
                   on REST

                      Cesare Pautasso
                     Faculty of Informatics
            University of Lugano (USI), Switzerland
                  http://www.pautasso.info


7.10.2008           SOA Symposium 2008, Amsterdam     36
                        ©2008 Cesare Pautasso
REST in one Slide
• REpresentational State Transfer defines the architectural
   style of the World Wide Web
• Its four principles can explain the success and the
   scalability of the HTTP protocol implementing them
1. Resource Identification through URI
2. Uniform Interface for all resources:
     GET (Query the state, idempotent, can be cached)
     POST (Update a resource or create child resource)
     PUT (Transfer the state on existing/new resource)
     DELETE (Delete a resource)
3. “Self-Descriptive” Message representations
4. Hyperlinks to define relationships between resources
   and valid state transitions of the service interaction
7.10.2008           SOA Symposium 2008, Amsterdam         37
                        ©2008 Cesare Pautasso
URI: Uniform Resource Identifier

• Internet Standard for resource naming and identification
  (originally from 1994, revised until 2005)
• Examples:
                 http://tools.ietf.org/html/rfc3986

             URI Scheme     Authority             Path
            https://www.google.ch/search?q=rest&start=10#1

                                                          Query   Fragment
• REST advocates the use of “nice” URIs
• In most HTTP stacks URIs cannot have arbitrary length (4Kb)

7.10.2008                 SOA Symposium 2008, Amsterdam                38
                              ©2008 Cesare Pautasso
What is a “nice” URI?
                                                  Prefer Nouns to Verbs
http://map.search.ch/lugano                            Keep them Short
                                      http://maps.google.com/lugano




              http://maps.google.com/maps?f=q&hl=en&q=lugano,
            +switzerland&layer=&ie=UTF8&z=12&om=1&iwloc=addr

7.10.2008              SOA Symposium 2008, Amsterdam                      39
                           ©2008 Cesare Pautasso
Uniform Interface Principle
              (CRUD Example)
      CRUD        REST
                                         Initialize the state of a
     CREATE    POST/PUT                        new resource
                                             at the given URI
                                          Retrieve the current
       READ         GET                   state of the resource
                                             Modify the state
     UPDATE         PUT                        of a resource
                                            Clear a resource,
     DELETE      DELETE                    after the URI is no
                                                longer valid
7.10.2008      SOA Symposium 2008, Amsterdam                         40
                   ©2008 Cesare Pautasso
POST vs. GET

• GET is a read-only operation.
  It can be repeated without
  affecting the state of the
  resource (idem-potent)
• POST is a read-write
  operation and may change
  the state of the resource
  and provoke side effects on
  the server.
  Web browsers warn
  you when refreshing
  a page generated
  with POST


7.10.2008             SOA Symposium 2008, Amsterdam   41
                          ©2008 Cesare Pautasso
RESTful Web Services Design
1. Identify resources to be exposed as




                                                                                 DELETE
   services (e.g., yearly risk report, book




                                                                          POST
   catalog, purchase order, open bugs)




                                                              GET
                                                                    PUT
2. Define “nice” URLs to address them
3. Understand what it means to do a GET,           /loan
   POST, PUT, DELETE on a given resource
   URI                                             /balance         X     X       X
4. Design and document resource                    /client                        ?
   representations (payload formats)
5. Model relationships (e.g., containment,         /book
   reference, state transitions) between           /order                 ?       ?
   resources with hyperlinks that can be
   followed to get more details
6. Implement and deploy on Web server
                                                   /soap      X     X             X
7. Test with a Web browser
7.10.2008                  SOA Symposium 2008, Amsterdam                          42
                               ©2008 Cesare Pautasso
Resource Representation
                      Formats: XML vs JSON
• XML                                • JavaScript Object Notation (JSON)
   – PO-XML                          • Wire format introduced for AJAX
   – SOAP (WS-*)                       Web applications (Browser-
   – RSS, ATOM                         Web Server communication)
• Standard textual syntax for        • Textual syntax for serialization of
  semi-structured data                 non-recurrent data structures
• Many tools available:              • Supported in most languages
  XML Schema, DOM, SAX, XPath,         (not only JavaScript)
  XSLT, XQuery                       • Not extensible
• Everyone can parse it                (does not need to be)
  (not necessarily understand it)    • “JSON has become the X in Ajax”
• Slow and Verbose


7.10.2008               SOA Symposium 2008, Amsterdam                    43
                            ©2008 Cesare Pautasso

Mais conteúdo relacionado

Semelhante a Cesare Pautasso R E S T V1

Soa amsterdam-restws-pautasso-talk
Soa amsterdam-restws-pautasso-talkSoa amsterdam-restws-pautasso-talk
Soa amsterdam-restws-pautasso-talkAravindharamanan S
 
WS-* vs. RESTful Services
WS-* vs. RESTful ServicesWS-* vs. RESTful Services
WS-* vs. RESTful ServicesCesare Pautasso
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registrydeimos
 
Building+restful+webservice
Building+restful+webserviceBuilding+restful+webservice
Building+restful+webservicelonegunman
 
Umit Yalcinalp Enterprise Mashupsfor S O A
Umit  Yalcinalp    Enterprise Mashupsfor S O AUmit  Yalcinalp    Enterprise Mashupsfor S O A
Umit Yalcinalp Enterprise Mashupsfor S O ASOA Symposium
 
Next Generation_WVI
Next Generation_WVINext Generation_WVI
Next Generation_WVIPrasad Kapu
 
Soap vs. rest - which is right web service protocol for your need?
Soap vs. rest -  which is right web service protocol for your need?Soap vs. rest -  which is right web service protocol for your need?
Soap vs. rest - which is right web service protocol for your need?Vijay Prasad Gupta
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni InturiSreeni I
 
Cics Web 2.0 With Atom Feeds And Php
Cics Web 2.0 With Atom Feeds And PhpCics Web 2.0 With Atom Feeds And Php
Cics Web 2.0 With Atom Feeds And PhpCICS ROADSHOW
 
Raj Anthony Carrato R E S T Patterns
Raj    Anthony  Carrato    R E S T PatternsRaj    Anthony  Carrato    R E S T Patterns
Raj Anthony Carrato R E S T PatternsSOA Symposium
 
Techniques for Composing REST services - SOA Symposium 2009
Techniques for Composing REST services - SOA Symposium 2009Techniques for Composing REST services - SOA Symposium 2009
Techniques for Composing REST services - SOA Symposium 2009Cesare Pautasso
 
Stratos and PaaS for London Java Community
Stratos and PaaS for London Java CommunityStratos and PaaS for London Java Community
Stratos and PaaS for London Java CommunityPaul Fremantle
 
Push-Enabling RESTful Business Processes
Push-Enabling RESTful Business ProcessesPush-Enabling RESTful Business Processes
Push-Enabling RESTful Business ProcessesCesare Pautasso
 
WCF Data Services - Bandung Charity Event - 2010
WCF Data Services  - Bandung Charity Event - 2010WCF Data Services  - Bandung Charity Event - 2010
WCF Data Services - Bandung Charity Event - 2010Andri Yadi
 
Radovan Janecek R E S Tor S O A Pv1
Radovan  Janecek    R E S Tor S O A Pv1Radovan  Janecek    R E S Tor S O A Pv1
Radovan Janecek R E S Tor S O A Pv1SOA Symposium
 
RESTful Service Composition with JOpera
RESTful Service Composition with JOperaRESTful Service Composition with JOpera
RESTful Service Composition with JOperaCesare Pautasso
 

Semelhante a Cesare Pautasso R E S T V1 (20)

REST vs. SOAP
REST vs. SOAPREST vs. SOAP
REST vs. SOAP
 
Soa amsterdam-restws-pautasso-talk
Soa amsterdam-restws-pautasso-talkSoa amsterdam-restws-pautasso-talk
Soa amsterdam-restws-pautasso-talk
 
WS-* vs. RESTful Services
WS-* vs. RESTful ServicesWS-* vs. RESTful Services
WS-* vs. RESTful Services
 
Bicocca Restws Pautasso Talk
Bicocca Restws Pautasso TalkBicocca Restws Pautasso Talk
Bicocca Restws Pautasso Talk
 
BPM with REST
BPM with RESTBPM with REST
BPM with REST
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
 
Building+restful+webservice
Building+restful+webserviceBuilding+restful+webservice
Building+restful+webservice
 
SOA2010 SOA with REST
SOA2010 SOA with RESTSOA2010 SOA with REST
SOA2010 SOA with REST
 
Umit Yalcinalp Enterprise Mashupsfor S O A
Umit  Yalcinalp    Enterprise Mashupsfor S O AUmit  Yalcinalp    Enterprise Mashupsfor S O A
Umit Yalcinalp Enterprise Mashupsfor S O A
 
Next Generation_WVI
Next Generation_WVINext Generation_WVI
Next Generation_WVI
 
Soap vs. rest - which is right web service protocol for your need?
Soap vs. rest -  which is right web service protocol for your need?Soap vs. rest -  which is right web service protocol for your need?
Soap vs. rest - which is right web service protocol for your need?
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
 
Cics Web 2.0 With Atom Feeds And Php
Cics Web 2.0 With Atom Feeds And PhpCics Web 2.0 With Atom Feeds And Php
Cics Web 2.0 With Atom Feeds And Php
 
Raj Anthony Carrato R E S T Patterns
Raj    Anthony  Carrato    R E S T PatternsRaj    Anthony  Carrato    R E S T Patterns
Raj Anthony Carrato R E S T Patterns
 
Techniques for Composing REST services - SOA Symposium 2009
Techniques for Composing REST services - SOA Symposium 2009Techniques for Composing REST services - SOA Symposium 2009
Techniques for Composing REST services - SOA Symposium 2009
 
Stratos and PaaS for London Java Community
Stratos and PaaS for London Java CommunityStratos and PaaS for London Java Community
Stratos and PaaS for London Java Community
 
Push-Enabling RESTful Business Processes
Push-Enabling RESTful Business ProcessesPush-Enabling RESTful Business Processes
Push-Enabling RESTful Business Processes
 
WCF Data Services - Bandung Charity Event - 2010
WCF Data Services  - Bandung Charity Event - 2010WCF Data Services  - Bandung Charity Event - 2010
WCF Data Services - Bandung Charity Event - 2010
 
Radovan Janecek R E S Tor S O A Pv1
Radovan  Janecek    R E S Tor S O A Pv1Radovan  Janecek    R E S Tor S O A Pv1
Radovan Janecek R E S Tor S O A Pv1
 
RESTful Service Composition with JOpera
RESTful Service Composition with JOperaRESTful Service Composition with JOpera
RESTful Service Composition with JOpera
 

Mais de SOA Symposium

Sven Hakan Olsson Composability Index V2
Sven Hakan Olsson    Composability  Index V2Sven Hakan Olsson    Composability  Index V2
Sven Hakan Olsson Composability Index V2SOA Symposium
 
Thomas Erl Introducing S O A Design Patterns
Thomas  Erl    Introducing  S O A  Design  PatternsThomas  Erl    Introducing  S O A  Design  Patterns
Thomas Erl Introducing S O A Design PatternsSOA Symposium
 
Radovan Janecek Avoiding S O A Pitfalls
Radovan  Janecek   Avoiding  S O A  PitfallsRadovan  Janecek   Avoiding  S O A  Pitfalls
Radovan Janecek Avoiding S O A PitfallsSOA Symposium
 
Natasja Paulssen S A P M D M And E S O A At Philips
Natasja  Paulssen    S A P  M D M And E S O A At  PhilipsNatasja  Paulssen    S A P  M D M And E S O A At  Philips
Natasja Paulssen S A P M D M And E S O A At PhilipsSOA Symposium
 
Anthony Carrato S O A Business Architecture
Anthony  Carrato    S O A  Business  ArchitectureAnthony  Carrato    S O A  Business  Architecture
Anthony Carrato S O A Business ArchitectureSOA Symposium
 
David Chappel S O A Grid
David  Chappel    S O A  GridDavid  Chappel    S O A  Grid
David Chappel S O A GridSOA Symposium
 
Johan Kumps Federal E S B
Johan  Kumps    Federal  E S BJohan  Kumps    Federal  E S B
Johan Kumps Federal E S BSOA Symposium
 
Laurent Tarin B P M Ilog
Laurent  Tarin    B P M  IlogLaurent  Tarin    B P M  Ilog
Laurent Tarin B P M IlogSOA Symposium
 
Jim Webber Guerrilla S O A With Web Services
Jim Webber    Guerrilla  S O A With  Web  ServicesJim Webber    Guerrilla  S O A With  Web  Services
Jim Webber Guerrilla S O A With Web ServicesSOA Symposium
 
Robert Schneider What Every Developer
Robert  Schneider    What Every DeveloperRobert  Schneider    What Every Developer
Robert Schneider What Every DeveloperSOA Symposium
 
Robert Schneider 10 Strategies
Robert  Schneider   10  StrategiesRobert  Schneider   10  Strategies
Robert Schneider 10 StrategiesSOA Symposium
 
Thomas Rischbeck Real Life E S B
Thomas  Rischbeck    Real  Life  E S BThomas  Rischbeck    Real  Life  E S B
Thomas Rischbeck Real Life E S BSOA Symposium
 
Stefan Pappe Making S O A Operational
Stefan  Pappe    Making  S O A  OperationalStefan  Pappe    Making  S O A  Operational
Stefan Pappe Making S O A OperationalSOA Symposium
 
Paul Brown Org Man Issues
Paul  Brown    Org  Man  IssuesPaul  Brown    Org  Man  Issues
Paul Brown Org Man IssuesSOA Symposium
 
Arnaud Simon Flight Data Processing
Arnaud  Simon    Flight  Data ProcessingArnaud  Simon    Flight  Data Processing
Arnaud Simon Flight Data ProcessingSOA Symposium
 
Paul Butterworth Policy Based Approach
Paul  Butterworth    Policy  Based  ApproachPaul  Butterworth    Policy  Based  Approach
Paul Butterworth Policy Based ApproachSOA Symposium
 
Mark Little Web Services And Transactions
Mark  Little    Web  Services And  TransactionsMark  Little    Web  Services And  Transactions
Mark Little Web Services And TransactionsSOA Symposium
 
S Ven Hakan Olsson Compos Index
S Ven  Hakan  Olsson    Compos IndexS Ven  Hakan  Olsson    Compos Index
S Ven Hakan Olsson Compos IndexSOA Symposium
 
Art Ligthart Service Identification Techniques
Art  Ligthart    Service  Identification  TechniquesArt  Ligthart    Service  Identification  Techniques
Art Ligthart Service Identification TechniquesSOA Symposium
 
Paul C Brown S O A Governance
Paul  C  Brown    S O A  GovernancePaul  C  Brown    S O A  Governance
Paul C Brown S O A GovernanceSOA Symposium
 

Mais de SOA Symposium (20)

Sven Hakan Olsson Composability Index V2
Sven Hakan Olsson    Composability  Index V2Sven Hakan Olsson    Composability  Index V2
Sven Hakan Olsson Composability Index V2
 
Thomas Erl Introducing S O A Design Patterns
Thomas  Erl    Introducing  S O A  Design  PatternsThomas  Erl    Introducing  S O A  Design  Patterns
Thomas Erl Introducing S O A Design Patterns
 
Radovan Janecek Avoiding S O A Pitfalls
Radovan  Janecek   Avoiding  S O A  PitfallsRadovan  Janecek   Avoiding  S O A  Pitfalls
Radovan Janecek Avoiding S O A Pitfalls
 
Natasja Paulssen S A P M D M And E S O A At Philips
Natasja  Paulssen    S A P  M D M And E S O A At  PhilipsNatasja  Paulssen    S A P  M D M And E S O A At  Philips
Natasja Paulssen S A P M D M And E S O A At Philips
 
Anthony Carrato S O A Business Architecture
Anthony  Carrato    S O A  Business  ArchitectureAnthony  Carrato    S O A  Business  Architecture
Anthony Carrato S O A Business Architecture
 
David Chappel S O A Grid
David  Chappel    S O A  GridDavid  Chappel    S O A  Grid
David Chappel S O A Grid
 
Johan Kumps Federal E S B
Johan  Kumps    Federal  E S BJohan  Kumps    Federal  E S B
Johan Kumps Federal E S B
 
Laurent Tarin B P M Ilog
Laurent  Tarin    B P M  IlogLaurent  Tarin    B P M  Ilog
Laurent Tarin B P M Ilog
 
Jim Webber Guerrilla S O A With Web Services
Jim Webber    Guerrilla  S O A With  Web  ServicesJim Webber    Guerrilla  S O A With  Web  Services
Jim Webber Guerrilla S O A With Web Services
 
Robert Schneider What Every Developer
Robert  Schneider    What Every DeveloperRobert  Schneider    What Every Developer
Robert Schneider What Every Developer
 
Robert Schneider 10 Strategies
Robert  Schneider   10  StrategiesRobert  Schneider   10  Strategies
Robert Schneider 10 Strategies
 
Thomas Rischbeck Real Life E S B
Thomas  Rischbeck    Real  Life  E S BThomas  Rischbeck    Real  Life  E S B
Thomas Rischbeck Real Life E S B
 
Stefan Pappe Making S O A Operational
Stefan  Pappe    Making  S O A  OperationalStefan  Pappe    Making  S O A  Operational
Stefan Pappe Making S O A Operational
 
Paul Brown Org Man Issues
Paul  Brown    Org  Man  IssuesPaul  Brown    Org  Man  Issues
Paul Brown Org Man Issues
 
Arnaud Simon Flight Data Processing
Arnaud  Simon    Flight  Data ProcessingArnaud  Simon    Flight  Data Processing
Arnaud Simon Flight Data Processing
 
Paul Butterworth Policy Based Approach
Paul  Butterworth    Policy  Based  ApproachPaul  Butterworth    Policy  Based  Approach
Paul Butterworth Policy Based Approach
 
Mark Little Web Services And Transactions
Mark  Little    Web  Services And  TransactionsMark  Little    Web  Services And  Transactions
Mark Little Web Services And Transactions
 
S Ven Hakan Olsson Compos Index
S Ven  Hakan  Olsson    Compos IndexS Ven  Hakan  Olsson    Compos Index
S Ven Hakan Olsson Compos Index
 
Art Ligthart Service Identification Techniques
Art  Ligthart    Service  Identification  TechniquesArt  Ligthart    Service  Identification  Techniques
Art Ligthart Service Identification Techniques
 
Paul C Brown S O A Governance
Paul  C  Brown    S O A  GovernancePaul  C  Brown    S O A  Governance
Paul C Brown S O A Governance
 

Último

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Último (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Cesare Pautasso R E S T V1

  • 1. This Presentation Courtesy of the International SOA Symposium October 7-8, 2008 Amsterdam Arena www.soasymposium.com info@soasymposium.com Founding Sponsors Platinum Sponsors Gold Sponsors Silver Sponsors
  • 2. REST vs. SOAP: Making the Right Architectural Decision Cesare Pautasso Faculty of Informatics University of Lugano (USI), Switzerland http://www.pautasso.info 7.10.2008 SOA Symposium 2008, Amsterdam 1 ©2008 Cesare Pautasso
  • 3. Agenda 1. Motivation: A short history of Web Services 2. Comparing REST vs. SOAP/WS-* 3. Architectural Decision Modeling 4. Conceptual Comparison 5. Technology Comparison 6. How to measure the “complexity” of WS-* or the “simplicity” of REST? 7. Conclusion: Making the right Architectural Decision 7.10.2008 SOA Symposium 2008, Amsterdam 2 ©2008 Cesare Pautasso
  • 4. Web Sites (1992) Web HTML Web Browser HTTP Server WS-* Web Services (2000) SOAP WSDL Client XML Server 7.10.2008 (HTTP) Amsterdam SOA Symposium 2008, 3 ©2008 Cesare Pautasso
  • 5. RESTful Web Services (2006) PO-XML JSON RSS WADL Web Client HTTP Server WS-* Web Services (2000) SOAP WSDL Client XML Server 7.10.2008 (HTTP) Amsterdam SOA Symposium 2008, 4 ©2008 Cesare Pautasso
  • 6. 7.10.2008 SOA Symposium 2008, Amsterdam 5 ©2008 Cesare Pautasso
  • 7. RESTful RSS XML JSON MIME URI HTTP SSL 7.10.2008 SOA Symposium 2008, Amsterdam 6 ©2008 Cesare Pautasso
  • 8. Is REST being used? Slide from Paul Downey, BT 7.10.2008 SOA Symposium 2008, Amsterdam 7 ©2008 Cesare Pautasso
  • 9. Can we really compare WS-* vs. REST? WS-* REST 7.10.2008 SOA Symposium 2008, Amsterdam 8 ©2008 Cesare Pautasso
  • 10. Can we really compare WS-* vs. REST? WS-* REST SOA Middleware Architectural Interoperability style for Standards the Web 7.10.2008 SOA Symposium 2008, Amsterdam 9 ©2008 Cesare Pautasso
  • 11. How to compare? Arch itectural Decision Modeling REST WS-* Architectural style for SOA Middleware the Web Interoperability Standards 7.10.2008 SOA Symposium 2008, Amsterdam 10 ©2008 Cesare Pautasso
  • 12. Architectural Decisions • Architectural decisions Architectural Decision: capture the main design Communication Protocol issues and the rationale behind a chosen technical Architecture Alternatives: solution 1. TCP • The choice between REST 2. SMTP vs. WS-* is an important 3. HTTP architectural decision for 4. MQ integration projects 5. BEEP • Architectural decisions 6. CORBA IIOP affect one another 7. … Rationale 7.10.2008 SOA Symposium 2008, Amsterdam 11 ©2008 Cesare Pautasso
  • 13. Application Integration Styles Shared Remote Message Bus File Database Procedure Transfer Call REST WS-* Integration Technology Platform 7.10.2008 SOA Symposium 2008, Amsterdam 12 ©2008 Cesare Pautasso
  • 14. Related Decisions (WS-*) Shared Remote Message Bus File Database Procedure Transfer Call REST WS-* 7.10.2008 SOA Symposium 2008, Amsterdam 13 ©2008 Cesare Pautasso
  • 15. Related Decisions (RPC) Shared Remote Message Bus File Database Procedure Transfer Call REST WS-* 7.10.2008 SOA Symposium 2008, Amsterdam 14 ©2008 Cesare Pautasso
  • 16. Decision Space Overview 7.10.2008 SOA Symposium 2008, Amsterdam 15 ©2008 Cesare Pautasso
  • 17. Decision Space Summary 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 REST or WS-* 7.10.2008 SOA Symposium 2008, Amsterdam 16 ©2008 Cesare Pautasso
  • 18. Architectural Principles 1. Protocol Layering • HTTP = Application-level Protocol (REST) • HTTP = Transport-level Protocol (WS-*) 2. Dealing with Heterogeneity 3. Loose Coupling 7.10.2008 SOA Symposium 2008, Amsterdam 17 ©2008 Cesare Pautasso
  • 19. RESTful Web Service Example HTTP Client Web Server Database (Web Browser) SELECT * GET /book?ISBN=222 FROM books WHERE isbn=222 POST /order INSERT INTO orders 301 Location: /order/612 PUT /order/612 UPDATE orders WHERE id=612 7.10.2008 SOA Symposium 2008, Amsterdam 18 ©2008 Cesare Pautasso
  • 20. Big Web Service Example (from REST perspective) Web Service HTTP Client Web Server Implementation (Stub Object) POST /soap/endpoint return getBook(222) POST /soap/endpoint return new Order() POST /soap/endpoint order.setCustomer(x) 7.10.2008 SOA Symposium 2008, Amsterdam 19 ©2008 Cesare Pautasso
  • 21. Protocol Layering • “The Web is the universe of globally • “The Web is the universal (tunneling) accessible information” transport for messages” (Tim Berners Lee) – Applications get a chance to – Applications should publish their interact but they remain data on the Web (through URI) “outside of the Web” POX RSS JSON … SOAP (WS-*) HTTP HTTP HTTP HTTP HTTP SMTP MQ… GET POST PUT DEL POST Resource URI Endpoint URI Application Application 7.10.2008 SOA Symposium 2008, Amsterdam 20 ©2008 Cesare Pautasso
  • 22. Dealing with Heterogeneity • Web Applications • Enterprise Computing Picture from Eric Newcomer, IONA HTTP CICS IMS 7.10.2008 SOA Symposium 2008, Amsterdam 21 ©2008 Cesare Pautasso
  • 23. Conceptual Comparison Note: this table will scroll up during the talk 7.10.2008 SOA Symposium 2008, Amsterdam 22 ©2008 Cesare Pautasso
  • 24. Technology Comparison Note: this table will scroll up during the talk 7.10.2008 SOA Symposium 2008, Amsterdam 23 ©2008 Cesare Pautasso
  • 25. 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 REST WS-* Decisions 17 14 Alternatives 27 35 Decisions with 1 or more alternative options 7.10.2008 SOA Symposium 2008, Amsterdam 24 ©2008 Cesare Pautasso
  • 26. Measuring Complexity REST WS-* Decisions 5 12 Alternatives 16 32 Decisions with more than 1 alternative options REST WS-* Decisions 17 14 Alternatives 27 35 Decisions with 1 or more alternative options 7.10.2008 SOA Symposium 2008, Amsterdam 25 ©2008 Cesare Pautasso
  • 27. Measuring Complexity REST WS-* Decisions 5 12 Alternatives 16 32 Decisions with more than 1 alternative options • URI Design • Resource Interaction Semantics • Payload Format • Service Description • Service Composition 7.10.2008 SOA Symposium 2008, Amsterdam 26 ©2008 Cesare Pautasso
  • 28. Measuring Complexity REST WS-* Decisions 5 12 Alternatives 16 32 Decisions with more than 1 alternative options REST WS-* Decisions 12 2 Decisions with only 1 alternative option 7.10.2008 SOA Symposium 2008, Amsterdam 27 ©2008 Cesare Pautasso
  • 29. Measuring Complexity • Payload Format • Data Representation Modeling REST WS-* Decisions 12 2 Decisions with only 1 alternative option 7.10.2008 SOA Symposium 2008, Amsterdam 28 ©2008 Cesare Pautasso
  • 30. Measuring Effort REST WS-* Do-it-yourself 5 0 Alternatives Decisions with only do-it-yourself alternatives REST WS-* Decisions 12 2 Decisions with only 1 alternative option 7.10.2008 SOA Symposium 2008, Amsterdam 29 ©2008 Cesare Pautasso
  • 31. Measuring Effort REST WS-* Do-it-yourself 5 0 Alternatives Decisions with only do-it-yourself alternatives • Resource Identification • Resource Relationship • Reliability • Transactions • Service Discovery 7.10.2008 SOA Symposium 2008, Amsterdam 30 ©2008 Cesare Pautasso
  • 32. Freedom of Choice Freedom from Choice 7.10.2008 SOA Symposium 2008, Amsterdam 31 ©2008 Cesare Pautasso
  • 33. Comparison Summary • Architectural Decisions measure complexity implied by alternative technologies • REST simplicity = freedom from choice – 5 decisions require to choose among 16 alternatives – 12 decisions are already taken (but 5 are do-it-yourself) • WS-* complexity = freedom of choice – 12 decisions require to choose among 32 alternatives – 2 decisions are already taken (SOAP, WSDL+XSD) 7.10.2008 SOA Symposium 2008, Amsterdam 32 ©2008 Cesare Pautasso
  • 34. Conclusion • You should focus on whatever solution gets the job done and try to avoid being religious about any specific architectures or technologies. • WS-* has strengths and weaknesses and will be highly suitable to some applications and positively terrible for others. Likewise with REST. • 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. 7.10.2008 SOA Symposium 2008, Amsterdam 33 ©2008 Cesare Pautasso
  • 35. References • Cesare Pautasso, Olaf Zimmermann, Frank Leymann, 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. • Cesare Pautasso, BPEL for REST, 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. 7.10.2008 SOA Symposium 2008, Amsterdam 34 ©2008 Cesare Pautasso
  • 36. REST vs. SOAP: Making the Right Architectural Decision Cesare Pautasso Faculty of Informatics University of Lugano (USI), Switzerland http://www.pautasso.info 7.10.2008 SOA Symposium 2008, Amsterdam 35 ©2008 Cesare Pautasso
  • 37. Backup Material on REST Cesare Pautasso Faculty of Informatics University of Lugano (USI), Switzerland http://www.pautasso.info 7.10.2008 SOA Symposium 2008, Amsterdam 36 ©2008 Cesare Pautasso
  • 38. REST in one Slide • REpresentational State Transfer defines the architectural style of the World Wide Web • Its four principles can explain the success and the scalability of the HTTP protocol implementing them 1. Resource Identification through URI 2. Uniform Interface for all resources: GET (Query the state, idempotent, can be cached) POST (Update a resource or create child resource) PUT (Transfer the state on existing/new resource) DELETE (Delete a resource) 3. “Self-Descriptive” Message representations 4. Hyperlinks to define relationships between resources and valid state transitions of the service interaction 7.10.2008 SOA Symposium 2008, Amsterdam 37 ©2008 Cesare Pautasso
  • 39. URI: Uniform Resource Identifier • Internet Standard for resource naming and identification (originally from 1994, revised until 2005) • Examples: http://tools.ietf.org/html/rfc3986 URI Scheme Authority Path https://www.google.ch/search?q=rest&start=10#1 Query Fragment • REST advocates the use of “nice” URIs • In most HTTP stacks URIs cannot have arbitrary length (4Kb) 7.10.2008 SOA Symposium 2008, Amsterdam 38 ©2008 Cesare Pautasso
  • 40. What is a “nice” URI? Prefer Nouns to Verbs http://map.search.ch/lugano Keep them Short http://maps.google.com/lugano http://maps.google.com/maps?f=q&hl=en&q=lugano, +switzerland&layer=&ie=UTF8&z=12&om=1&iwloc=addr 7.10.2008 SOA Symposium 2008, Amsterdam 39 ©2008 Cesare Pautasso
  • 41. Uniform Interface Principle (CRUD Example) CRUD REST Initialize the state of a CREATE POST/PUT new resource at the given URI Retrieve the current READ GET state of the resource Modify the state UPDATE PUT of a resource Clear a resource, DELETE DELETE after the URI is no longer valid 7.10.2008 SOA Symposium 2008, Amsterdam 40 ©2008 Cesare Pautasso
  • 42. POST vs. GET • GET is a read-only operation. It can be repeated without affecting the state of the resource (idem-potent) • POST is a read-write operation and may change the state of the resource and provoke side effects on the server. Web browsers warn you when refreshing a page generated with POST 7.10.2008 SOA Symposium 2008, Amsterdam 41 ©2008 Cesare Pautasso
  • 43. RESTful Web Services Design 1. Identify resources to be exposed as DELETE services (e.g., yearly risk report, book POST catalog, purchase order, open bugs) GET PUT 2. Define “nice” URLs to address them 3. Understand what it means to do a GET, /loan POST, PUT, DELETE on a given resource URI /balance X X X 4. Design and document resource /client ? representations (payload formats) 5. Model relationships (e.g., containment, /book reference, state transitions) between /order ? ? resources with hyperlinks that can be followed to get more details 6. Implement and deploy on Web server /soap X X X 7. Test with a Web browser 7.10.2008 SOA Symposium 2008, Amsterdam 42 ©2008 Cesare Pautasso
  • 44. Resource Representation Formats: XML vs JSON • XML • JavaScript Object Notation (JSON) – PO-XML • Wire format introduced for AJAX – SOAP (WS-*) Web applications (Browser- – RSS, ATOM Web Server communication) • Standard textual syntax for • Textual syntax for serialization of semi-structured data non-recurrent data structures • Many tools available: • Supported in most languages XML Schema, DOM, SAX, XPath, (not only JavaScript) XSLT, XQuery • Not extensible • Everyone can parse it (does not need to be) (not necessarily understand it) • “JSON has become the X in Ajax” • Slow and Verbose 7.10.2008 SOA Symposium 2008, Amsterdam 43 ©2008 Cesare Pautasso