SlideShare a Scribd company logo
1 of 83
Download to read offline
A Pragmatic
Introduction to REST
            QCon London 2008
  Stefan Tilkov, stefan.tilkov@innoq.com




           Copyright innoQ 2008. All rights reserved.

                                                        1
Stefan Tilkov
                                                      http://www.innoQ.com
                                                  stefan.tilkov@innoq.com
                                           http://www.innoq.com/blog/st/




                                                     http://www.InfoQ.com




                Copyright innoQ 2008. All rights reserved.

                                                                             2
REST vs. ... ?
  Copyright innoQ 2008. All rights reserved.

                                               3
REST vs. SOAP?
REST vs. SOA?
REST vs. WS-*?


   Copyright innoQ 2008. All rights reserved.

                                                4
Not today


 Copyright innoQ 2008. All rights reserved.

                                              5
(At least we’ll try)


     Copyright innoQ 2008. All rights reserved.

                                                  6
First, let’s define some
          things


       Copyright innoQ 2008. All rights reserved.

                                                    7
What is SOA?


  Copyright innoQ 2008. All rights reserved.

                                               8
3 Possible Definitions


      Copyright innoQ 2008. All rights reserved.

                                                   9
Take your pick


   Copyright innoQ 2008. All rights reserved.

                                                10
1


Copyright innoQ 2008. All rights reserved.

                                             11
SOA: An Approach to
   Business/IT Alignment
A different approach to an enterprise’s IT
architecture ...
... driven by business, not technology
... focusing on shared and re-used functionality
... aligning business and IT
... relying on strong governance

                 Copyright innoQ 2008. All rights reserved.

                                                              12
SOA: An Approach to
  Business/IT Alignment

... can be implemented using any architecture,
technology, or set of products




                Copyright innoQ 2008. All rights reserved.

                                                             13
2


Copyright innoQ 2008. All rights reserved.

                                             14
SOA: A Technical
         Architecture
Services with clearly defined interfaces
... autonomous and with explicit boundaries
... relying on shared schema, not shared code
... programming language-independent
... separating interface and implementation
... containing multiple specific operations

                Copyright innoQ 2008. All rights reserved.

                                                             15
SOA: A Technical
        Architecture

… somewhat technology-independent – can be
built with e.g. CORBA, DCE RPC, DCOM, RMI,
or Web services.




              Copyright innoQ 2008. All rights reserved.

                                                           16
3


Copyright innoQ 2008. All rights reserved.

                                             17
SOA = Web Services
Business data as XML messages
... sent in a SOAP body
... enriched with metadata in SOA headers
... described with WSDL and XML Schema
... configured through WS-Policy
... registered in a UDDI registry

                Copyright innoQ 2008. All rights reserved.

                                                             18
SOA = Web Services
... implemented using technologies and products
from the WS-* universe




               Copyright innoQ 2008. All rights reserved.

                                                            19
Web Services Standards Overview                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Dependencies




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               © innoQ Deutschland GmbH. All Rights Reserved. The poster may also contain references to other company, organisation, brand and product names. These company, organisation, brand and product names are used herein for identification purposes only and may be the trademarks of their respective owners.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Messaging Specifications
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SOAP 1.1



                                             Interoperability                                                                       Business Process Specifications                                                                                                                                                                                                                                                                                  Management Specifications                                                                                                                                                                                                                   Presentation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SOAP 1.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SOAP Message Transmission Optimization Mechanism



                                             Issues                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Specifications
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        WS-Notification

                                                                                                                                      Business Process Execution                                            WS-Choreography Model                                         Web Service Choreography                                         Web Service Choreography                                                                                          Management Using Web                                                    Management Of                                                                                                                                                                                                                                      WS-BaseNotification
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       WS-Management




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Resource

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Security
                                                                                                                                     Language for Web Services 1.1                                                Overview                                                       Interface                                                  Description Language                                                                                               Services (WSDM-MUWS)                                               Web Services (WSDM-MOWS)                                       AMD, Dell, Intel, Microsoft and Sun                                                                                                                                                    WS-Topics
                                                                                                                                           (BPEL4WS) · 1.1 · BEA Systems, IBM,                                                                                                       (WSCI) · 1.0 · W3C                                                                                                                                                                         1.0                                                                 1.0                                                     Microsystems
                                                                                                                                                                                                                             1.0 · W3C                                                                                                               (CDL4WS) · 1.0 · W3C                                                                                                                                                                                                                                                                                                                                                                                                               WS-BrokeredNotification
                                                                                                                                                      Microsoft, SAP,                                                                                                        Sun Microsystems, SAP, BEA Systems                                                                                                                                                                OASIS                                                               OASIS                                              Published Specification                                                                          Web Services for Remote
                                                                                                                                                                                                                            Working Draft                                                                                                         Candidate Recommendation
                                                                  Basic Profile                                                              Siebel Systems · OASIS-Standard                                                                                                          and Intalio · Note                                                                                                                                                                   OASIS-Standard                                                      OASIS-Standard
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Portlets (WSRP)                                                             WS-Addressing – Core
                                                                          1.1
                                                                         WS-I                                                       Business Process Execution Language for Web Services              WS-Choreography Model Overview defines the format               Web Service Choreography Interface (WSCI) describes             Web Service Choreography Description Language                                                                   Web Service Distributed Management: Management Using                 Web Service Distributed Management: Management Of           WS-Management describes a general SOAP-based                                                                                         2.0                                                         WS-Addressing – WSDL Binding
                                                                                                                                    1.1(BPEL4WS) provides a language for the formal                   and structure of the (SOAP) messages that are exchanged,        how Web Service operations can be choreographed in the          (CDL4WS) is to specify a declarative, XML based language                                                        Web Services (WSDM-MUWS) defines how an IT resource                  Web Services (WSDM-MOWS) addresses management of            protocol for managing systems such as PCs, servers,                                                                                OASIS
                                                                  Final Specification                                               specification of business processes and business interaction      and the sequence and conditions in which the messages           context of a message exchange in which the Web Service          that defines from a global viewpoint the common and                                                             connected to a network provides manageability interfaces             the components that form the network, the Web services      devices, Web services and other applications, and other
                                                                                                                                    protocols using Web Services.                                     are exchanged.                                                  participates.                                                   complementary observable behaviour, where message                                                               such that the IT resource can be managed locally and from            endpoints, using Web services protocols.                    manageable entities.                                                                                                            Committee Draft                                                  WS-Addressing – SOAP Binding
                                                                                                                                                                                                                                                                                                                                      exchanges occur, and when the jointly agreed ordering                                                           remote locations using Web services technologies.
                                              Basic Profile – The Basic Profile 1.1 provides                                                                                                                                                                                                                                          rules are satisfied.                                                                                                                                                                                                                                                                                                                                       Web Services for Remote Portlets (WSRP) defines a                                      WS-Eventing
                                              implementation guidelines for how related set of non-
                                              proprietary Web Service specifications should be used                                    Business Process Execution                                         Business Process Management                                         XML Process Definition
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 set of interfaces and related semantics which standardize
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 interactions with components providing user-facing                                     WS-Enumeration
                                              together for best interoperability.                                                    Language for Web Services 2.0                                               Language (BPML)                                                 Language (XPDL)                                                                                                                                                          Service Modeling Language                                                                                                                                                                                                              markup, including the processing of user interactions with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 that markup.
                                                                                                                                                   (BPEL4WS) · 2.0                                                                    1.1                                                                                                                                                                                                                    IBM, BEA, BMC, Cisco, Dell, HP, Intel,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Metadata Specifications
                                                                                                                                                                                                                                                                                                 2.0
                                                                                                                                       OASIS, BEA Systems, IBM, Microsoft, SAP,                                                    BPMI.org                                                                                                                                                                                                                            Microsoft, Sun
                                                                                                                                                                                                                                                                                                Final
                                                                                                                                          Siebel Systems · Committee Draft                                                        Final Draft                                                                                                                                                                                                                        Draft Specification
                                                                  Basic Profile
                                                                         1.2                                                        Business Process Execution Language for Web Services                Business Process Management Language (BPML)                   XML Process Definition Language (XPDL) provides an                                                                                                                                                                                                                                                                                                                                                                                                                                                                WS-Policy
                                                                                                                                    2.0 (BPEL4WS) provides a language for the formal                    provides a meta-language for expressing business              XML file format that can be used to interchange process                                                                                                                         Servcie Modeling Language (SML) is used to model
                                                                        WS-I                                                        specification of business processes and business interaction        processes and supporting entities.                            models between tools.                                                                                                                                                           complex IT services and systems, including their structure,                                                                                                                                                                                                                                                                       WS-PolicyAssertions
                                                                 Working Group Draft                                                protocols using Web Services.




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Security
                                                                                                                                                                                                                                                                                                                                                                                                                                                      constraints, policies, and best practices.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        WS-PolicyAttachment
                                              Basic Profile – The Basic Profile 1.2 builds on Basic Profile




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Messaging
                                              1.1 by incorporating Basic Profile 1.1 errata, requirements                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               WS-Discovery
                                              from Simple SOAP Binding Profile 1.0, and adding support
                                              for WS-Addressing and MTOM.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               WS-MetadataExchange

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Universal Description, Discovery and Integration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Web Service Description Language 1.1
                                                                  Basic Profile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Web Service Description Language 2.0 Core

                                                                                                                                    Metadata Specifications                                                                                                                                                  Reliability                                                                                               Security Specifications                                                                                                                                                       Transaction                                                                                           Resource
                                                                         2.0
                                                                        WS-I
                                                                 Working Group Draft                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Web Service Description Language 2.0 SOAP Binding


                                              Basic Profile – The Basic Profile 2.0 is an update of WS-I
                                              BP that includes a profile of SOAP 1.2.
                                                                                                                                                        WS-Policy                                                WS-PolicyAssertions                                                                         Specifications                                                                                                                WS-Security                                                     WS-SecurityPolicy                                                                         Specifications                                                                                        Specifications                                                              Security Specifications
                                                                                                                                                                                                                                1.1                                                                                                                                                                                                                                                                                    1.1                                                                                                                                                                                                                                                              WS-Security
                                                                                                                                                              1.5                                                                                                                                                                                                                                                                                  1.1
                                                                                                                                                                                                                           BEA Systems,                                                                                                                                                                                                                                                                          IBM, Microsoft,
                                                                                                                                                             W3C
                                                                                                                                                                                                                        IBM, Microsoft, SAP
                                                                                                                                                                                                                                                                                                                                                                                                                                                 OASIS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              RSA Security, VeriSign                                                                                WS-Coordination                                                                                   Web Services                                                      WS-Security: SOAP Message Security
                                                          Attachments Profile                                                                            Working Draft
                                                                                                                                                                                                                           Public Draft                                                                               WS-ReliableMessaging                                                                                                   OASIS-Standard
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Public Draft                                                                                                  1.1                                                                            Resource Framework (WSRF)
                                                                          1.0                                                                                                                                                                                                                                                         1.1                                                                                                                                                                                                                                                                                      OASIS                                                                                                                                                    WS-Security: Kerberos Binding
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1.2
                                                                         WS-I                                                                                                                                                                                                                                                       OASIS                                                                                                                                                                                                                                                                                   Working Draft
                                                                                                                                    WS-Policy describes the capabilities and constraints of           WS-PolicyAssertions provides an initial set of assertions                                                                                                                                                         WS-Security is a communications protocol providing a                  WS-SecurityPolicy defines how to describe policies related                                                                                                                                                                           OASIS
                                                                  Final Specification                                               the policies on intermediaries and endpoints (e.g. business       to address some common needs of Web Services                                                                               Committee Draft                                                                        means for applying security to Web Services.                          to various features defined in the WS-Security specification.                                                                                                                                                                                                                             WS-Security: SAML Token Profile




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Messaging
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               OASIS-Standard




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Reliability




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata
                                                                                                                                    rules, required security tokens, supported encryption             applications.                                                                                                                                                                                                                                                                                                                                                                                   WS-Coordination describes an extensible framework for providing
                                                                                                                                    algorithms, privacy rules).                                                                                                                                                                                                                                                                                                                                                                                                                                       protocols that coordinate the actions of distributed applications.                                   Web Services Resource Framework (WSRF) defines a family of                   WS-Security: X.509 Certificate Token Profile
                                              Attachments Profile – The Attachment Profile 1.0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             specifications for accessing stateful resources using Web Services.
                                              complements the Basic Profile 1.1 to add support                                                                                                                                                                                                                WS-ReliableMessaging describes a protocol that allows
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                WS-Business Activity                                                                                                                                                    WS-Security: Username Token Profile
                                              for interoperable SOAP Messages with attachments-based
                                              Web Services.
                                                                                                                                                                                                                                                                                                              Web services to communicate reliable in the presence of
                                                                                                                                                                                                                                                                                                              software component, system, or network failures. It defines                                                           WS-Security:                                                           WS-Security:                                                                                                          1.1                                                                                    WS-BaseFaults (WSRF)                                            WS-SecurityPolicy
                                                                                                                                                                                                                                                                                                              a SOAP binding that is required for interoperability.                                                             SOAP Message Security                                                  Username Token Profile                                                                                                  OASIS                                                                                                  1.2
                                                                                                                                             WS-PolicyAttachment                                                        WS-Discovery                                                                                                                                                                                                              1.1                                                                   1.1                                                                                                 Working Draft                                                                                           OASIS                                               WS-Trust
                                                                                                                                                         1.2                                                    Microsoft, BEA Systems, Canon,                                                                                                                                                                                                   OASIS                                                                 OASIS                                                                                                                                                                                                     Working Draft
                                                                 Simple SOAP                                                                            W3C                                                         Intel and webMethods                                                                             WS-Reliable Messaging                                                                                                Public Review Draft                                                   Public Review Draft
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      WS-Business Activity provides the definition of the business activity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      coordination type that is to be used with the extensible coordination                                                                                                             WS-Federation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           WS-BaseFaults (WSRF) defines a base set of information
                                                                Binding Profile                                                                  W3C Member Submission                                                       Draft                                                                                 Policy Assertion (WS-RM Policy)                                                                                                                                                                                                                                                    framework described in the WS-Coordination specification.                                            that may appear in fault messages. WS-BaseFaults defines an                  WS-SecureConversation
                                                                          1.0                                                                                                                                                                                                                                                                                                                                           WS-Security: SOAP Message Security describes                          WS-Security: Username Token Profile describes how                                                                                                                                                            XML schema type for base faults, along with rules for how
                                                                                                                                                                                                                                                                                                                                      1.1
                                                                         WS-I
                                                                                                                                    WS-PolicyAttachment defines two general-purpose                   WS-Discovery defines a multicast discovery protocol for                                                                       OASIS
                                                                                                                                                                                                                                                                                                                                                                                                                        enhancements to SOAP messaging to provide message
                                                                                                                                                                                                                                                                                                                                                                                                                        integrity and confidentiality. Specifically, this specification
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              a Web Service consumer can supply a Username Token as a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              means of identifying the requestor by username, and
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              WS-Atomic Transaction                                                                        this base fault type is used and extended by Web Services.
                                                                  Final Specification

                                              Simple SOAP Binding Profile – The Simple SOAP Binding
                                                                                                                                    mechanisms for associating policies with the subjects to
                                                                                                                                    which they apply; the policies may be defined as part
                                                                                                                                    of existing metadata about the subject or the policies may
                                                                                                                                                                                                      dynamic discovery of services on ad-hoc and managed
Why is SOA so
hard to define?


   Copyright innoQ 2008. All rights reserved.

                                                21
A Web service is a software system designed to
support interoperable machine-to-machine interaction
over a network. It has an interface described in a
machine-processable format (specifically WSDL). Other
systems interact with the Web service in a manner
prescribed by its description using SOAP messages,
typically conveyed using HTTP with an XML
serialization in conjunction with other Web-related
standards.
                 W3C Web Services Architecture WG
                                       http://www.w3.org/TR/2004/NOTE-ws-arch-20040211/




                 Copyright innoQ 2008. All rights reserved.

                                                                                          22
“Service Oriented Architecture is a paradigm
for organizing and utilizing distributed capabilities that
may be under the control of different ownership
domains. It provides a uniform means to offer, discover,
interact with and use capabilities to produce desired
effects consistent with measurable preconditions and
expectations.”
                                         OASIS SOA Reference Model
                  http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=soa-rm




                    Copyright innoQ 2008. All rights reserved.

                                                                                      23
“An Economy                                is a paradigm
for organizing and utilizing distributed capabilities that
may be under the control of different ownership
domains. It provides a uniform means to offer, discover,
interact with and use capabilities to produce desired
effects consistent with measurable preconditions and
expectations.”
                                                                     Nick Gall, VP, Gartner
             http://tech.groups.yahoo.com/group/service-orientated-architecture/message/9065




                        Copyright innoQ 2008. All rights reserved.

                                                                                               24
What is REST?


  Copyright innoQ 2008. All rights reserved.

                                               25
3 definitions again


     Copyright innoQ 2008. All rights reserved.

                                                  26
1


Copyright innoQ 2008. All rights reserved.

                                             27
REST: An Architectural Style
 One of a number of “architectural styles”
 ... described by Roy Fielding in his dissertation
 ... defined via a set of constraints that have to
     be met
 ... architectural principles underlying HTTP,
     defined a posteriori
 ... with the Web as one particular instance
     See: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
                     Copyright innoQ 2008. All rights reserved.

                                                                      28
2


Copyright innoQ 2008. All rights reserved.

                                             29
REST: The Web Used Correctly

  A system or application architecture
  ... that uses HTTP, URI and other Web
      standards “correctly”
  ... is “on” the Web, not tunneled through it
  ... also called “WOA”, “ROA”, “RESTful HTTP”


                  Copyright innoQ 2008. All rights reserved.

                                                               30
3


Copyright innoQ 2008. All rights reserved.

                                             31
REST: XML without SOAP

Send plain XML (w/o a SOAP Envelope) via
HTTP
... violating the Web as much as WS-*
... preferably use GET to invoke methods
... or tunnel everything through POST
... commonly called “POX”

                Copyright innoQ 2008. All rights reserved.

                                                             32
Only option 1 is the right one
     (because Roy said so)



          Copyright innoQ 2008. All rights reserved.

                                                       33
But we’ll go with option 2
  (and equate “REST” with
   “RESTful HTTP usage”)


        Copyright innoQ 2008. All rights reserved.

                                                     34
and avoid option 3 like
      the plague


       Copyright innoQ 2008. All rights reserved.

                                                    35
REST Explained
in 5 Easy Steps


   Copyright innoQ 2008. All rights reserved.

                                                36
1. Give Every “Thing” an ID

http://example.com/customers/1234

http://example.com/orders/2007/10/776654

http://example.com/products/4554

http://example.com/processes/sal-increase-234




               Copyright innoQ 2008. All rights reserved.

                                                            37
2. Link Things To Each Other

<order self=’http://example.com/orders/1234’>
  <amount>23</amount>
  <product ref=’http://example.com/products/4554’ />
  <customer ref=’http://example.com/customers/1234’ />
</order>




                   Copyright innoQ 2008. All rights reserved.

                                                                38
3. Use Standard Methods
 GET     retrieve information, possibly cached

 PUT         Update or create with known ID

 POST         Create or append sub-resource

DELETE                           (Logically) remove



             Copyright innoQ 2008. All rights reserved.

                                                          39
4. Allow for Multiple
      “Representations”
GET /customers/1234
Host: example.com
Accept: application/vnd.mycompany.customer+xml

<customer>...</customer>



GET /customers/1234
Host: example.com
Accept: text/x-vcard

begin:vcard
...
end:vcard
                Copyright innoQ 2008. All rights reserved.

                                                             40
5. Communicate Statelessly
       GET /customers/1234
       Host: example.com
       Accept: application/vnd.mycompany.customer+xml

       <customer><order ref=’./orders/46’</customer>

                                                                    shutdown
                                                                    update software
                                                                    replace hardware
                                                                    startup
       GET /customers/1234/orders/46
       Host: example.com
       Accept: application/vnd.mycompany.order+xml

       <order>...</order>
time                   Copyright innoQ 2008. All rights reserved.

                                                                                       41
Consequences


  Copyright innoQ 2008. All rights reserved.

                                               42
Copyright innoQ 2008. All rights reserved.

                                             43
Cheating?


Copyright innoQ 2008. All rights reserved.

                                             44
Maybe.


Copyright innoQ 2008. All rights reserved.

                                             45
many




many             very few
              (one per service)



                 Copyright innoQ 2008. All rights reserved.

                                                              46
many




very few                many
 (fixed)



                  Copyright innoQ 2008. All rights reserved.

                                                               47
Designing a RESTful Application

 Identify resources & design URIs
 Select formats (or create new ones)
 Identify method semantics
 Select response codes

                          See: http://bitworking.org/news/How_to_create_a_REST_Protocol

                Copyright innoQ 2008. All rights reserved.

                                                                                          48
What’s cool about
     REST?


    Copyright innoQ 2008. All rights reserved.

                                                 49
A very rough analogy
   (in pseudocode)



      Copyright innoQ 2008. All rights reserved.

                                                   50
generic
interface Resource {
     Resource(URI u)                                                  Any HTTP client
     Response get()                                                (Firefox, IE, curl, wget)
     Response post(Request r)
     Response put(Request r)                                          Any HTTP server
     Response delete()
}                                                                          Caches
                                                                           Proxies
                                                                   Google,Yahoo!, MSN

class CustomerCollection : Resource {                              Anything that knows
     ...                                                                your app
     Response post(Request r) {
          id = createCustomer(r)
          return new Response(201, r)
     }
     ...
}

                                                            specific
                      Copyright innoQ 2008. All rights reserved.

                                                                                               51
generic
                                                                        Anything that
interface Resource {                                                  understands HTTP
     ...
}




class AtomFeed : Resource {
     AtomFeed get()
                                                                       Any feed reader
     post(Entry e)
     ...
                                                                    Any AtomPub client
}                                                                       Yahoo! Pipes

class CustomerCollection : AtomFeed {                               Anything that knows
     ...                                                                 your app
}



                                                             specific
                       Copyright innoQ 2008. All rights reserved.

                                                                                          52
Some HTTP Features
Verbs (in order of popularity):
   GET, POST
   PUT, DELETE
   HEAD, OPTIONS, TRACE
Standardized (& meaningful) response codes
Content negotiation
Redirection
Caching (incl. validation/expiry)
Compression
Chunking
                Copyright innoQ 2008. All rights reserved.

                                                             53
RESTful HTTP Advantages

Universal support (programming languages, operating
systems, servers, ...)
Proven scalability
Real web integration for machine-2-machine
communication
Support for XML, but also other formats



                     Copyright innoQ 2008. All rights reserved.

                                                                  54
REST and Web Services


      Copyright innoQ 2008. All rights reserved.

                                                   55
Web Services Issues

Web Services are “Web” in name only
WS-* tends to ignore the web
Abstractions leak, anyway
Protocol independence is a bug, not a feature



               Copyright innoQ 2008. All rights reserved.

                                                            56
Web Services
   OrderManagementService

+ getOrders()
                                                       A separate interface (façade)
+ submitOrder()                                        for each purpose
+ getOrderDetails()
+ getOrdersForCustomers()
+ updateOrder()                                        As known CORBA, DCOM,
+ addOrderItem()
+ cancelOrder()                                        RMI/EJB
+ cancelAllOrders()
                                                       Often used for SOA
                                                       (“CORBA w/ angle
 CustomerManagementService
                                                       brackets)
+ getCustomers()
+ addCustomer()
+ getCustomerDetails()                                 Application-specific protocol
+ updateCustomer()
+ deleteCustomer()
+ deleteAllCustomers()


                            Copyright innoQ 2008. All rights reserved.

                                                                                       57
Contribution to the Net’s Value

2 URLs
  http://example.com/customerservice
  http://example.com/orderservice
1 method
  POST


              Copyright innoQ 2008. All rights reserved.

                                                           58
REST Approach
                                                               A single generic (uniform)
                                  /orders
                 GET - list all orders
                 PUT - unused
                 POST - add a new order
                 DELETE - cancel all orders                    interface for everything
                             /orders/{id}
                 GET - get order details
                 PUT - update order
                 POST - add item
                                                               Generic verbs mapped to
                 DELETE - cancel order
                                                               resource semantics
   «interface»               /customers
   Resource
GET
PUT
                 GET - list all customers
                 PUT - unused
                 POST - add new customer
                                                               A standard application
                                                               protocol (e.g. HTTP)
POST
                 DELETE - delete all customers
DELETE

                           /customers/{id}
                 GET - get customer details
                 PUT - update customer
                 POST - unused
                 DELETE - delete customer


                       /customers/{id}/orders
                 GET - get all orders for customer
                 PUT - unused
                 POST - add order
                 DELETE - cancel all customer orders



                                    Copyright innoQ 2008. All rights reserved.

                                                                                            59
Contribution to the Net’s Value

 Millions of URLs
   every customer
   every order
 4-6 supported methods per resource
   GET, PUT, POST, DELETE, OPTIONS, HEAD
 Cacheable, addressable, linkable, ...
                    Copyright innoQ 2008. All rights reserved.

                                                                 60
REST for SOA
                  vs.

 Business      SOA as an approach to business/IT alignment



Architecture      Technical SOA                               REST



Technology     SOAP, WSDL, WS-* (RESTful) HTTP, URI, ...


                 Copyright innoQ 2008. All rights reserved.

                                                                     61
REST as an
alternative way to
achieve SOA goals

      Copyright innoQ 2008. All rights reserved.

                                                   62
Why You Should Care


      Copyright innoQ 2008. All rights reserved.

                                                   63
WS-* Roots

The Enterprise
RPC, COM, CORBA, RMI, EJB
Transaction Systems
Controlled Environment
Top-down Approach


                 Copyright innoQ 2008. All rights reserved.

                                                              64
REST Roots

The Internet
Text formats
Wire Standards
FTP, POP, SMTP
Bottom-up Approach


                 Copyright innoQ 2008. All rights reserved.

                                                              65
Internet vs. Enterprise


       Copyright innoQ 2008. All rights reserved.

                                                    66
What’s the difference
between the Internet
    and a typical
     enterprise?

      Copyright innoQ 2008. All rights reserved.

                                                   67
Internet vs. Enterprise
One is a gigantic, uncontrollable anarchy of
heterogeneous systems with varying quality
that evolve independently and constantly get
connected in new and unexpected ways.

The other is a worldwide, publicly accessible
series of interconnected computer networks
that transmit data by packet switching using
the standard Internet Protocol (IP).
               Copyright innoQ 2008. All rights reserved.

                                                            68
REST Support


  Copyright innoQ 2008. All rights reserved.

                                               69
Everybody                                         HTTP Servers, Clients, Proxies, Libraries, ...

DHH & The Rails Community                         Ruby on Rails
Google                                            Base
                                                  GData
                                                  Calendar
                                                  Document Lists
                                                  Blogger
                                                  Notebook
                                                  Picasa
Amazon                                            Simple Storage Service (S3)
                                                  Queue Service
                                                  Flexible Payment
                                                  Search
Sun                                               JSR 311
                                                  Jersey

IBM                                               Abdera
                                                  Project Zero

Microsoft                                         Astoria
                                                  WCF

                        Copyright innoQ 2008. All rights reserved.

                                                                                                   70
Advanced Stuff


   Copyright innoQ 2008. All rights reserved.

                                                71
Description
What’s the WSDL equivalent in REST?




         Copyright innoQ 2008. All rights reserved.

                                                      72
There is none ...

XSD (95% of WSDL) is available to you, anyway
Of the remaining 5%, 90% is just silly
Why would you want to describe the uniform
interface over and over again?



                Copyright innoQ 2008. All rights reserved.

                                                             73
... unless you insist


WADL (Web Application Description Language)
https://wadl.dev.java.net/
Use URI Templates to define resource behavior




                    Copyright innoQ 2008. All rights reserved.

                                                                 74
WADL Example
<resources base=quot;http://api.search.yahoo.com/NewsSearchService/V1/quot;>
    <resource path=quot;newsSearchquot;>
        <method name=quot;GETquot; id=quot;searchquot;>
             <request>
                 <param name=quot;appidquot; type=quot;xsd:stringquot; style=quot;queryquot; required=quot;truequot;/>
                 <param name=quot;queryquot; type=quot;xsd:stringquot; style=quot;queryquot; required=quot;truequot;/>
                 <param name=quot;typequot; style=quot;queryquot; default=quot;allquot;>
                     <option value=quot;allquot;/>
                     <option value=quot;anyquot;/>
                     <option value=quot;phrasequot;/>
                 </param>
                 <param name=quot;resultsquot; style=quot;queryquot; type=quot;xsd:intquot; default=quot;10quot;/>
                 <param name=quot;startquot; style=quot;queryquot; type=quot;xsd:intquot; default=quot;1quot;/>
                 <param name=quot;sortquot; style=quot;queryquot; default=quot;rankquot;>
                     <option value=quot;rankquot;/>
                     <option value=quot;datequot;/>
                 </param>
                 <param name=quot;languagequot; style=quot;queryquot; type=quot;xsd:stringquot;/>
             </request>
             <response>
                 <representation mediaType=quot;application/xmlquot; element=quot;yn:ResultSetquot;/>
                 <fault status=quot;400quot; mediaType=quot;application/xmlquot; element=quot;ya:Errorquot;/>
             </response>
        </method>
    </resource>
</resources>
                             Copyright innoQ 2008. All rights reserved.

                                                                                         75
What You Should Do
 (in my very humble opinion)




        Copyright innoQ 2008. All rights reserved.

                                                     76
Be skeptical of WS-*
Learn more about REST
 Learn to love the URI

  Appreciate the Web

      Copyright innoQ 2008. All rights reserved.

                                                   77
If You Want to Know More



       Copyright innoQ 2008. All rights reserved.

                                                    78
http://www.innoq.com/resources/REST




          Copyright innoQ 2008. All rights reserved.

                                                       79
http://www.oreilly.com/catalog/9780596529260/
             Copyright innoQ 2008. All rights reserved.

                                                          80
http://www.infoq.com




  Copyright innoQ 2008. All rights reserved.

                                               81
Final Specification




                                                                              These company, organisation, brand and product names
                                                                             Copyright innoQ Deutschland GmbH. All Rights Reser
                                                                                           This poster is not to be reproduced or tr
                                                                                                                                                      Basic Security Profile
                                                                                                                                                               1.0
                                                                                                                                                              WS-I
                                                                                                                                                       Board Approval Draft



                                                                                                                                                        REL Token Profile
                                                                                                                                                                1.0
                                                                                                                                                               WS-I
                                                                                                                                                        Working Group Draft



                                                                                                                                                       SAML Token Profile
                                                                                                                                                                1.0




                                                                                           ©
                                                                                                                                                               WS-I
                                                                                                                                                        Working Group Draft




                        Thank you!
                                                                                                                                                      Conformance Claim
                                                                                                                                                    Attachment Mechanism
                                                                                                                                                               (CCAM)
                                                                                                                                                                 1.0
                                                                                                                                                                WS-I
                                                                                                                                                         Final Specification

                                                                                                                                                     Reliable Asynchronous
                                                                                                                                                    Messaging Profile (RAMP)
                                                                                                                                                                1.0
                                                                                                                                                              WS-I
                                                                                                                                                           Working Draft




                                                                                                          Version 3.0* · February 2007
Stefan Tilkov
http://www.innoq.com/blog/st/
stefan.tilkov@innoq.com                                                                                                                  innoQ Deutschland GmbH innoQ Schweiz GmbH
                                                                                                                                         Halskestraße 17            Gewerbestrasse 11
                                                                                                                                         D-40880 Ratingen           CH-6330 Cham
                                                                                                                                         Phone +49 21 02 77 162-100 Phone +41 41 743 0111
                                                                                                                                         info@innoq.com · www.innoq.com



                                Copyright innoQ 2008. All rights reserved.

                                                                                                                                                                                            82
Photo Credit


http://www.flickr.com/photos/toddography/462611643/
http://www.flickr.com/photos/raveller/159146501/
http://en.wikipedia.org/wiki/Image:Sangreal.jpg




                   Copyright innoQ 2008. All rights reserved.

                                                                83

More Related Content

Viewers also liked

Teach a Dog to REST
Teach a Dog to RESTTeach a Dog to REST
Teach a Dog to RESTBrian Mulloy
 
REST 101: An Overview To Representational State Transfer.
REST 101: An Overview To Representational State Transfer.REST 101: An Overview To Representational State Transfer.
REST 101: An Overview To Representational State Transfer.Omar Fernando Zafe
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service家弘 周
 
API, Integration, and SOA Convergence
API, Integration, and SOA ConvergenceAPI, Integration, and SOA Convergence
API, Integration, and SOA ConvergenceKasun Indrasiri
 
6 Reasons Why APIs Are Reshaping Your Business
6 Reasons Why APIs Are Reshaping Your Business6 Reasons Why APIs Are Reshaping Your Business
6 Reasons Why APIs Are Reshaping Your BusinessFabernovel
 
ReST (Representational State Transfer) Explained
ReST (Representational State Transfer) ExplainedReST (Representational State Transfer) Explained
ReST (Representational State Transfer) ExplainedDhananjay Nene
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101Akana
 
NRG Shipping Solutions Overview
NRG Shipping Solutions OverviewNRG Shipping Solutions Overview
NRG Shipping Solutions OverviewNRG Software
 
So What and Who Cares: Getting Your Message Right
So What and Who Cares: Getting Your Message RightSo What and Who Cares: Getting Your Message Right
So What and Who Cares: Getting Your Message RightKivi Leroux Miller
 
Imagenes Curiosas
Imagenes CuriosasImagenes Curiosas
Imagenes CuriosasDescojonate
 
Integrating social media and getting leadership buy in
Integrating social media and getting leadership buy in Integrating social media and getting leadership buy in
Integrating social media and getting leadership buy in Shashi Bellamkonda
 
Introduction And Graphs
Introduction And GraphsIntroduction And Graphs
Introduction And GraphsZia Khan
 
Search Marketing Analytics
Search Marketing AnalyticsSearch Marketing Analytics
Search Marketing AnalyticsIan Lurie
 
Comune Di Casier Per Pubblicazione Con Dati Di Confronto Inferiori A 10000 Ab
Comune Di Casier Per Pubblicazione Con Dati Di Confronto Inferiori A 10000 AbComune Di Casier Per Pubblicazione Con Dati Di Confronto Inferiori A 10000 Ab
Comune Di Casier Per Pubblicazione Con Dati Di Confronto Inferiori A 10000 Abmaurinbu
 
4 Simple Formulas for MLM Blog Success
4 Simple Formulas for MLM Blog Success4 Simple Formulas for MLM Blog Success
4 Simple Formulas for MLM Blog SuccessJeff Hoffman
 

Viewers also liked (19)

Teach a Dog to REST
Teach a Dog to RESTTeach a Dog to REST
Teach a Dog to REST
 
REST 101: An Overview To Representational State Transfer.
REST 101: An Overview To Representational State Transfer.REST 101: An Overview To Representational State Transfer.
REST 101: An Overview To Representational State Transfer.
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service
 
API, Integration, and SOA Convergence
API, Integration, and SOA ConvergenceAPI, Integration, and SOA Convergence
API, Integration, and SOA Convergence
 
6 Reasons Why APIs Are Reshaping Your Business
6 Reasons Why APIs Are Reshaping Your Business6 Reasons Why APIs Are Reshaping Your Business
6 Reasons Why APIs Are Reshaping Your Business
 
ReST (Representational State Transfer) Explained
ReST (Representational State Transfer) ExplainedReST (Representational State Transfer) Explained
ReST (Representational State Transfer) Explained
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101
 
NRG Shipping Solutions Overview
NRG Shipping Solutions OverviewNRG Shipping Solutions Overview
NRG Shipping Solutions Overview
 
So What and Who Cares: Getting Your Message Right
So What and Who Cares: Getting Your Message RightSo What and Who Cares: Getting Your Message Right
So What and Who Cares: Getting Your Message Right
 
Imagenes Curiosas
Imagenes CuriosasImagenes Curiosas
Imagenes Curiosas
 
Integrating social media and getting leadership buy in
Integrating social media and getting leadership buy in Integrating social media and getting leadership buy in
Integrating social media and getting leadership buy in
 
Introduction And Graphs
Introduction And GraphsIntroduction And Graphs
Introduction And Graphs
 
Clocker Now and Next
Clocker Now and NextClocker Now and Next
Clocker Now and Next
 
MiT6 - Louisa Stein
MiT6 - Louisa SteinMiT6 - Louisa Stein
MiT6 - Louisa Stein
 
Search Marketing Analytics
Search Marketing AnalyticsSearch Marketing Analytics
Search Marketing Analytics
 
Comune Di Casier Per Pubblicazione Con Dati Di Confronto Inferiori A 10000 Ab
Comune Di Casier Per Pubblicazione Con Dati Di Confronto Inferiori A 10000 AbComune Di Casier Per Pubblicazione Con Dati Di Confronto Inferiori A 10000 Ab
Comune Di Casier Per Pubblicazione Con Dati Di Confronto Inferiori A 10000 Ab
 
4 Simple Formulas for MLM Blog Success
4 Simple Formulas for MLM Blog Success4 Simple Formulas for MLM Blog Success
4 Simple Formulas for MLM Blog Success
 
Adobe
AdobeAdobe
Adobe
 

Similar to Stefan Tilkov Pragmatic Intro To Rest

HTML5 for Designers (HTML5 時代の Web デザイナーの新常識)
HTML5 for Designers (HTML5 時代の Web デザイナーの新常識)HTML5 for Designers (HTML5 時代の Web デザイナーの新常識)
HTML5 for Designers (HTML5 時代の Web デザイナーの新常識)dynamis
 
Web Technologies
Web TechnologiesWeb Technologies
Web Technologiesdynamis
 
2012 10 23_3013_rational_integration_tester_fo
2012 10 23_3013_rational_integration_tester_fo2012 10 23_3013_rational_integration_tester_fo
2012 10 23_3013_rational_integration_tester_foDarrel Rader
 
Mr Sahel Skype Net Neutrality DigiWorld Summit 2011
Mr Sahel Skype Net Neutrality DigiWorld Summit 2011Mr Sahel Skype Net Neutrality DigiWorld Summit 2011
Mr Sahel Skype Net Neutrality DigiWorld Summit 2011IDATE DigiWorld
 
Choose a tool for business intelligence in share point 2010
Choose a tool for business intelligence in share point 2010Choose a tool for business intelligence in share point 2010
Choose a tool for business intelligence in share point 2010Ard van Someren
 
09 08 21 Wish2009 Conit
09 08 21 Wish2009 Conit09 08 21 Wish2009 Conit
09 08 21 Wish2009 Conitconit
 
HTML5를 활용한 하이브리드 앱개발하기
HTML5를 활용한 하이브리드 앱개발하기HTML5를 활용한 하이브리드 앱개발하기
HTML5를 활용한 하이브리드 앱개발하기정현 황
 
Business And It Value
Business And It ValueBusiness And It Value
Business And It Valuealliej
 
Viedome Presentation Eu
Viedome Presentation EuViedome Presentation Eu
Viedome Presentation Eumwdgielen
 
Make my viral
Make my viralMake my viral
Make my viralNINANC
 
IXL Center detail
IXL Center detailIXL Center detail
IXL Center detailmonlohko
 
REST: putting the web back in to web services
REST: putting the web back in to web servicesREST: putting the web back in to web services
REST: putting the web back in to web servicesKerry Buckley
 
Using Node.js to improve the performance of Mobile apps and Mobile web
Using Node.js to improve  the performance of  Mobile apps and Mobile webUsing Node.js to improve  the performance of  Mobile apps and Mobile web
Using Node.js to improve the performance of Mobile apps and Mobile webTom Croucher
 
Mobile Marketing Mystery
Mobile Marketing MysteryMobile Marketing Mystery
Mobile Marketing MysteryBen Grossman
 
EduGeek.Net Open Source Schools UnConference Nottingham Green IT
EduGeek.Net Open Source Schools UnConference Nottingham Green ITEduGeek.Net Open Source Schools UnConference Nottingham Green IT
EduGeek.Net Open Source Schools UnConference Nottingham Green ITRussell Dyas
 
2012 10 23_2649_rational_integration_tester_vi
2012 10 23_2649_rational_integration_tester_vi2012 10 23_2649_rational_integration_tester_vi
2012 10 23_2649_rational_integration_tester_viDarrel Rader
 
E commerce search strategies
E commerce search strategiesE commerce search strategies
E commerce search strategiesRoger Xia
 

Similar to Stefan Tilkov Pragmatic Intro To Rest (20)

HTML5 for Designers (HTML5 時代の Web デザイナーの新常識)
HTML5 for Designers (HTML5 時代の Web デザイナーの新常識)HTML5 for Designers (HTML5 時代の Web デザイナーの新常識)
HTML5 for Designers (HTML5 時代の Web デザイナーの新常識)
 
Web Technologies
Web TechnologiesWeb Technologies
Web Technologies
 
2012 10 23_3013_rational_integration_tester_fo
2012 10 23_3013_rational_integration_tester_fo2012 10 23_3013_rational_integration_tester_fo
2012 10 23_3013_rational_integration_tester_fo
 
Mr Sahel Skype Net Neutrality DigiWorld Summit 2011
Mr Sahel Skype Net Neutrality DigiWorld Summit 2011Mr Sahel Skype Net Neutrality DigiWorld Summit 2011
Mr Sahel Skype Net Neutrality DigiWorld Summit 2011
 
Choose a tool for business intelligence in share point 2010
Choose a tool for business intelligence in share point 2010Choose a tool for business intelligence in share point 2010
Choose a tool for business intelligence in share point 2010
 
09 08 21 Wish2009 Conit
09 08 21 Wish2009 Conit09 08 21 Wish2009 Conit
09 08 21 Wish2009 Conit
 
HTML5를 활용한 하이브리드 앱개발하기
HTML5를 활용한 하이브리드 앱개발하기HTML5를 활용한 하이브리드 앱개발하기
HTML5를 활용한 하이브리드 앱개발하기
 
Business And It Value
Business And It ValueBusiness And It Value
Business And It Value
 
HTML5 on mobile
HTML5 on mobileHTML5 on mobile
HTML5 on mobile
 
Atlas Slide Deck
Atlas Slide DeckAtlas Slide Deck
Atlas Slide Deck
 
Viedome Presentation Eu
Viedome Presentation EuViedome Presentation Eu
Viedome Presentation Eu
 
Make my viral
Make my viralMake my viral
Make my viral
 
IXL Center detail
IXL Center detailIXL Center detail
IXL Center detail
 
REST: putting the web back in to web services
REST: putting the web back in to web servicesREST: putting the web back in to web services
REST: putting the web back in to web services
 
Using Node.js to improve the performance of Mobile apps and Mobile web
Using Node.js to improve  the performance of  Mobile apps and Mobile webUsing Node.js to improve  the performance of  Mobile apps and Mobile web
Using Node.js to improve the performance of Mobile apps and Mobile web
 
Open Source Search Applications
Open Source Search ApplicationsOpen Source Search Applications
Open Source Search Applications
 
Mobile Marketing Mystery
Mobile Marketing MysteryMobile Marketing Mystery
Mobile Marketing Mystery
 
EduGeek.Net Open Source Schools UnConference Nottingham Green IT
EduGeek.Net Open Source Schools UnConference Nottingham Green ITEduGeek.Net Open Source Schools UnConference Nottingham Green IT
EduGeek.Net Open Source Schools UnConference Nottingham Green IT
 
2012 10 23_2649_rational_integration_tester_vi
2012 10 23_2649_rational_integration_tester_vi2012 10 23_2649_rational_integration_tester_vi
2012 10 23_2649_rational_integration_tester_vi
 
E commerce search strategies
E commerce search strategiesE commerce search strategies
E commerce search strategies
 

More from deimos

Aspect Orientated Programming in Ruby
Aspect Orientated Programming in RubyAspect Orientated Programming in Ruby
Aspect Orientated Programming in Rubydeimos
 
Randy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural PrinciplesRandy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural Principlesdeimos
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuerydeimos
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwrdeimos
 
Aslak Hellesoy Executable User Stories R Spec Bdd
Aslak Hellesoy Executable User Stories R Spec BddAslak Hellesoy Executable User Stories R Spec Bdd
Aslak Hellesoy Executable User Stories R Spec Bdddeimos
 
Venkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In GroovyVenkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In Groovydeimos
 
Venkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic LanguagesVenkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic Languagesdeimos
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfacesdeimos
 
Tim Mackinnon Agile And Beyond
Tim Mackinnon Agile And BeyondTim Mackinnon Agile And Beyond
Tim Mackinnon Agile And Beyonddeimos
 
Steve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And SerendipitySteve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And Serendipitydeimos
 
Stefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The WebStefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The Webdeimos
 
Rod Johnson Cathedral
Rod Johnson CathedralRod Johnson Cathedral
Rod Johnson Cathedraldeimos
 
Mike Stolz Dramatic Scalability
Mike Stolz Dramatic ScalabilityMike Stolz Dramatic Scalability
Mike Stolz Dramatic Scalabilitydeimos
 
Matt Youill Betfair
Matt Youill BetfairMatt Youill Betfair
Matt Youill Betfairdeimos
 
Pete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two SystemsPete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two Systemsdeimos
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registrydeimos
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platformdeimos
 
Neal Gafter Java Evolution
Neal Gafter Java EvolutionNeal Gafter Java Evolution
Neal Gafter Java Evolutiondeimos
 
Markus Voelter Textual DSLs
Markus Voelter Textual DSLsMarkus Voelter Textual DSLs
Markus Voelter Textual DSLsdeimos
 
Marc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond AgileMarc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond Agiledeimos
 

More from deimos (20)

Aspect Orientated Programming in Ruby
Aspect Orientated Programming in RubyAspect Orientated Programming in Ruby
Aspect Orientated Programming in Ruby
 
Randy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural PrinciplesRandy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural Principles
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuery
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwr
 
Aslak Hellesoy Executable User Stories R Spec Bdd
Aslak Hellesoy Executable User Stories R Spec BddAslak Hellesoy Executable User Stories R Spec Bdd
Aslak Hellesoy Executable User Stories R Spec Bdd
 
Venkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In GroovyVenkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In Groovy
 
Venkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic LanguagesVenkat Subramaniam Blending Java With Dynamic Languages
Venkat Subramaniam Blending Java With Dynamic Languages
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
 
Tim Mackinnon Agile And Beyond
Tim Mackinnon Agile And BeyondTim Mackinnon Agile And Beyond
Tim Mackinnon Agile And Beyond
 
Steve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And SerendipitySteve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And Serendipity
 
Stefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The WebStefan Tilkov Soa Rest And The Web
Stefan Tilkov Soa Rest And The Web
 
Rod Johnson Cathedral
Rod Johnson CathedralRod Johnson Cathedral
Rod Johnson Cathedral
 
Mike Stolz Dramatic Scalability
Mike Stolz Dramatic ScalabilityMike Stolz Dramatic Scalability
Mike Stolz Dramatic Scalability
 
Matt Youill Betfair
Matt Youill BetfairMatt Youill Betfair
Matt Youill Betfair
 
Pete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two SystemsPete Goodliffe A Tale Of Two Systems
Pete Goodliffe A Tale Of Two Systems
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
 
Neal Gafter Java Evolution
Neal Gafter Java EvolutionNeal Gafter Java Evolution
Neal Gafter Java Evolution
 
Markus Voelter Textual DSLs
Markus Voelter Textual DSLsMarkus Voelter Textual DSLs
Markus Voelter Textual DSLs
 
Marc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond AgileMarc Evers People Vs Process Beyond Agile
Marc Evers People Vs Process Beyond Agile
 

Recently uploaded

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Stefan Tilkov Pragmatic Intro To Rest

  • 1. A Pragmatic Introduction to REST QCon London 2008 Stefan Tilkov, stefan.tilkov@innoq.com Copyright innoQ 2008. All rights reserved. 1
  • 2. Stefan Tilkov http://www.innoQ.com stefan.tilkov@innoq.com http://www.innoq.com/blog/st/ http://www.InfoQ.com Copyright innoQ 2008. All rights reserved. 2
  • 3. REST vs. ... ? Copyright innoQ 2008. All rights reserved. 3
  • 4. REST vs. SOAP? REST vs. SOA? REST vs. WS-*? Copyright innoQ 2008. All rights reserved. 4
  • 5. Not today Copyright innoQ 2008. All rights reserved. 5
  • 6. (At least we’ll try) Copyright innoQ 2008. All rights reserved. 6
  • 7. First, let’s define some things Copyright innoQ 2008. All rights reserved. 7
  • 8. What is SOA? Copyright innoQ 2008. All rights reserved. 8
  • 9. 3 Possible Definitions Copyright innoQ 2008. All rights reserved. 9
  • 10. Take your pick Copyright innoQ 2008. All rights reserved. 10
  • 11. 1 Copyright innoQ 2008. All rights reserved. 11
  • 12. SOA: An Approach to Business/IT Alignment A different approach to an enterprise’s IT architecture ... ... driven by business, not technology ... focusing on shared and re-used functionality ... aligning business and IT ... relying on strong governance Copyright innoQ 2008. All rights reserved. 12
  • 13. SOA: An Approach to Business/IT Alignment ... can be implemented using any architecture, technology, or set of products Copyright innoQ 2008. All rights reserved. 13
  • 14. 2 Copyright innoQ 2008. All rights reserved. 14
  • 15. SOA: A Technical Architecture Services with clearly defined interfaces ... autonomous and with explicit boundaries ... relying on shared schema, not shared code ... programming language-independent ... separating interface and implementation ... containing multiple specific operations Copyright innoQ 2008. All rights reserved. 15
  • 16. SOA: A Technical Architecture … somewhat technology-independent – can be built with e.g. CORBA, DCE RPC, DCOM, RMI, or Web services. Copyright innoQ 2008. All rights reserved. 16
  • 17. 3 Copyright innoQ 2008. All rights reserved. 17
  • 18. SOA = Web Services Business data as XML messages ... sent in a SOAP body ... enriched with metadata in SOA headers ... described with WSDL and XML Schema ... configured through WS-Policy ... registered in a UDDI registry Copyright innoQ 2008. All rights reserved. 18
  • 19. SOA = Web Services ... implemented using technologies and products from the WS-* universe Copyright innoQ 2008. All rights reserved. 19
  • 20. Web Services Standards Overview Dependencies © innoQ Deutschland GmbH. All Rights Reserved. The poster may also contain references to other company, organisation, brand and product names. These company, organisation, brand and product names are used herein for identification purposes only and may be the trademarks of their respective owners. Messaging Specifications SOAP 1.1 Interoperability Business Process Specifications Management Specifications Presentation SOAP 1.2 SOAP Message Transmission Optimization Mechanism Issues Specifications WS-Notification Business Process Execution WS-Choreography Model Web Service Choreography Web Service Choreography Management Using Web Management Of WS-BaseNotification WS-Management Metadata Resource Security Language for Web Services 1.1 Overview Interface Description Language Services (WSDM-MUWS) Web Services (WSDM-MOWS) AMD, Dell, Intel, Microsoft and Sun WS-Topics (BPEL4WS) · 1.1 · BEA Systems, IBM, (WSCI) · 1.0 · W3C 1.0 1.0 Microsystems 1.0 · W3C (CDL4WS) · 1.0 · W3C WS-BrokeredNotification Microsoft, SAP, Sun Microsystems, SAP, BEA Systems OASIS OASIS Published Specification Web Services for Remote Working Draft Candidate Recommendation Basic Profile Siebel Systems · OASIS-Standard and Intalio · Note OASIS-Standard OASIS-Standard Portlets (WSRP) WS-Addressing – Core 1.1 WS-I Business Process Execution Language for Web Services WS-Choreography Model Overview defines the format Web Service Choreography Interface (WSCI) describes Web Service Choreography Description Language Web Service Distributed Management: Management Using Web Service Distributed Management: Management Of WS-Management describes a general SOAP-based 2.0 WS-Addressing – WSDL Binding 1.1(BPEL4WS) provides a language for the formal and structure of the (SOAP) messages that are exchanged, how Web Service operations can be choreographed in the (CDL4WS) is to specify a declarative, XML based language Web Services (WSDM-MUWS) defines how an IT resource Web Services (WSDM-MOWS) addresses management of protocol for managing systems such as PCs, servers, OASIS Final Specification specification of business processes and business interaction and the sequence and conditions in which the messages context of a message exchange in which the Web Service that defines from a global viewpoint the common and connected to a network provides manageability interfaces the components that form the network, the Web services devices, Web services and other applications, and other protocols using Web Services. are exchanged. participates. complementary observable behaviour, where message such that the IT resource can be managed locally and from endpoints, using Web services protocols. manageable entities. Committee Draft WS-Addressing – SOAP Binding exchanges occur, and when the jointly agreed ordering remote locations using Web services technologies. Basic Profile – The Basic Profile 1.1 provides rules are satisfied. Web Services for Remote Portlets (WSRP) defines a WS-Eventing implementation guidelines for how related set of non- proprietary Web Service specifications should be used Business Process Execution Business Process Management XML Process Definition set of interfaces and related semantics which standardize interactions with components providing user-facing WS-Enumeration together for best interoperability. Language for Web Services 2.0 Language (BPML) Language (XPDL) Service Modeling Language markup, including the processing of user interactions with that markup. (BPEL4WS) · 2.0 1.1 IBM, BEA, BMC, Cisco, Dell, HP, Intel, Metadata Specifications 2.0 OASIS, BEA Systems, IBM, Microsoft, SAP, BPMI.org Microsoft, Sun Final Siebel Systems · Committee Draft Final Draft Draft Specification Basic Profile 1.2 Business Process Execution Language for Web Services Business Process Management Language (BPML) XML Process Definition Language (XPDL) provides an WS-Policy 2.0 (BPEL4WS) provides a language for the formal provides a meta-language for expressing business XML file format that can be used to interchange process Servcie Modeling Language (SML) is used to model WS-I specification of business processes and business interaction processes and supporting entities. models between tools. complex IT services and systems, including their structure, WS-PolicyAssertions Working Group Draft protocols using Web Services. Security constraints, policies, and best practices. WS-PolicyAttachment Basic Profile – The Basic Profile 1.2 builds on Basic Profile Messaging 1.1 by incorporating Basic Profile 1.1 errata, requirements WS-Discovery from Simple SOAP Binding Profile 1.0, and adding support for WS-Addressing and MTOM. WS-MetadataExchange Universal Description, Discovery and Integration Web Service Description Language 1.1 Basic Profile Web Service Description Language 2.0 Core Metadata Specifications Reliability Security Specifications Transaction Resource 2.0 WS-I Working Group Draft Web Service Description Language 2.0 SOAP Binding Basic Profile – The Basic Profile 2.0 is an update of WS-I BP that includes a profile of SOAP 1.2. WS-Policy WS-PolicyAssertions Specifications WS-Security WS-SecurityPolicy Specifications Specifications Security Specifications 1.1 1.1 WS-Security 1.5 1.1 BEA Systems, IBM, Microsoft, W3C IBM, Microsoft, SAP OASIS RSA Security, VeriSign WS-Coordination Web Services WS-Security: SOAP Message Security Attachments Profile Working Draft Public Draft WS-ReliableMessaging OASIS-Standard Public Draft 1.1 Resource Framework (WSRF) 1.0 1.1 OASIS WS-Security: Kerberos Binding 1.2 WS-I OASIS Working Draft WS-Policy describes the capabilities and constraints of WS-PolicyAssertions provides an initial set of assertions WS-Security is a communications protocol providing a WS-SecurityPolicy defines how to describe policies related OASIS Final Specification the policies on intermediaries and endpoints (e.g. business to address some common needs of Web Services Committee Draft means for applying security to Web Services. to various features defined in the WS-Security specification. WS-Security: SAML Token Profile Messaging OASIS-Standard Reliability Metadata rules, required security tokens, supported encryption applications. WS-Coordination describes an extensible framework for providing algorithms, privacy rules). protocols that coordinate the actions of distributed applications. Web Services Resource Framework (WSRF) defines a family of WS-Security: X.509 Certificate Token Profile Attachments Profile – The Attachment Profile 1.0 specifications for accessing stateful resources using Web Services. complements the Basic Profile 1.1 to add support WS-ReliableMessaging describes a protocol that allows WS-Business Activity WS-Security: Username Token Profile for interoperable SOAP Messages with attachments-based Web Services. Web services to communicate reliable in the presence of software component, system, or network failures. It defines WS-Security: WS-Security: 1.1 WS-BaseFaults (WSRF) WS-SecurityPolicy a SOAP binding that is required for interoperability. SOAP Message Security Username Token Profile OASIS 1.2 WS-PolicyAttachment WS-Discovery 1.1 1.1 Working Draft OASIS WS-Trust 1.2 Microsoft, BEA Systems, Canon, OASIS OASIS Working Draft Simple SOAP W3C Intel and webMethods WS-Reliable Messaging Public Review Draft Public Review Draft WS-Business Activity provides the definition of the business activity coordination type that is to be used with the extensible coordination WS-Federation WS-BaseFaults (WSRF) defines a base set of information Binding Profile W3C Member Submission Draft Policy Assertion (WS-RM Policy) framework described in the WS-Coordination specification. that may appear in fault messages. WS-BaseFaults defines an WS-SecureConversation 1.0 WS-Security: SOAP Message Security describes WS-Security: Username Token Profile describes how XML schema type for base faults, along with rules for how 1.1 WS-I WS-PolicyAttachment defines two general-purpose WS-Discovery defines a multicast discovery protocol for OASIS enhancements to SOAP messaging to provide message integrity and confidentiality. Specifically, this specification a Web Service consumer can supply a Username Token as a means of identifying the requestor by username, and WS-Atomic Transaction this base fault type is used and extended by Web Services. Final Specification Simple SOAP Binding Profile – The Simple SOAP Binding mechanisms for associating policies with the subjects to which they apply; the policies may be defined as part of existing metadata about the subject or the policies may dynamic discovery of services on ad-hoc and managed
  • 21. Why is SOA so hard to define? Copyright innoQ 2008. All rights reserved. 21
  • 22. A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards. W3C Web Services Architecture WG http://www.w3.org/TR/2004/NOTE-ws-arch-20040211/ Copyright innoQ 2008. All rights reserved. 22
  • 23. “Service Oriented Architecture is a paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains. It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations.” OASIS SOA Reference Model http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=soa-rm Copyright innoQ 2008. All rights reserved. 23
  • 24. “An Economy is a paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains. It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations.” Nick Gall, VP, Gartner http://tech.groups.yahoo.com/group/service-orientated-architecture/message/9065 Copyright innoQ 2008. All rights reserved. 24
  • 25. What is REST? Copyright innoQ 2008. All rights reserved. 25
  • 26. 3 definitions again Copyright innoQ 2008. All rights reserved. 26
  • 27. 1 Copyright innoQ 2008. All rights reserved. 27
  • 28. REST: An Architectural Style One of a number of “architectural styles” ... described by Roy Fielding in his dissertation ... defined via a set of constraints that have to be met ... architectural principles underlying HTTP, defined a posteriori ... with the Web as one particular instance See: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm Copyright innoQ 2008. All rights reserved. 28
  • 29. 2 Copyright innoQ 2008. All rights reserved. 29
  • 30. REST: The Web Used Correctly A system or application architecture ... that uses HTTP, URI and other Web standards “correctly” ... is “on” the Web, not tunneled through it ... also called “WOA”, “ROA”, “RESTful HTTP” Copyright innoQ 2008. All rights reserved. 30
  • 31. 3 Copyright innoQ 2008. All rights reserved. 31
  • 32. REST: XML without SOAP Send plain XML (w/o a SOAP Envelope) via HTTP ... violating the Web as much as WS-* ... preferably use GET to invoke methods ... or tunnel everything through POST ... commonly called “POX” Copyright innoQ 2008. All rights reserved. 32
  • 33. Only option 1 is the right one (because Roy said so) Copyright innoQ 2008. All rights reserved. 33
  • 34. But we’ll go with option 2 (and equate “REST” with “RESTful HTTP usage”) Copyright innoQ 2008. All rights reserved. 34
  • 35. and avoid option 3 like the plague Copyright innoQ 2008. All rights reserved. 35
  • 36. REST Explained in 5 Easy Steps Copyright innoQ 2008. All rights reserved. 36
  • 37. 1. Give Every “Thing” an ID http://example.com/customers/1234 http://example.com/orders/2007/10/776654 http://example.com/products/4554 http://example.com/processes/sal-increase-234 Copyright innoQ 2008. All rights reserved. 37
  • 38. 2. Link Things To Each Other <order self=’http://example.com/orders/1234’> <amount>23</amount> <product ref=’http://example.com/products/4554’ /> <customer ref=’http://example.com/customers/1234’ /> </order> Copyright innoQ 2008. All rights reserved. 38
  • 39. 3. Use Standard Methods GET retrieve information, possibly cached PUT Update or create with known ID POST Create or append sub-resource DELETE (Logically) remove Copyright innoQ 2008. All rights reserved. 39
  • 40. 4. Allow for Multiple “Representations” GET /customers/1234 Host: example.com Accept: application/vnd.mycompany.customer+xml <customer>...</customer> GET /customers/1234 Host: example.com Accept: text/x-vcard begin:vcard ... end:vcard Copyright innoQ 2008. All rights reserved. 40
  • 41. 5. Communicate Statelessly GET /customers/1234 Host: example.com Accept: application/vnd.mycompany.customer+xml <customer><order ref=’./orders/46’</customer> shutdown update software replace hardware startup GET /customers/1234/orders/46 Host: example.com Accept: application/vnd.mycompany.order+xml <order>...</order> time Copyright innoQ 2008. All rights reserved. 41
  • 42. Consequences Copyright innoQ 2008. All rights reserved. 42
  • 43. Copyright innoQ 2008. All rights reserved. 43
  • 44. Cheating? Copyright innoQ 2008. All rights reserved. 44
  • 45. Maybe. Copyright innoQ 2008. All rights reserved. 45
  • 46. many many very few (one per service) Copyright innoQ 2008. All rights reserved. 46
  • 47. many very few many (fixed) Copyright innoQ 2008. All rights reserved. 47
  • 48. Designing a RESTful Application Identify resources & design URIs Select formats (or create new ones) Identify method semantics Select response codes See: http://bitworking.org/news/How_to_create_a_REST_Protocol Copyright innoQ 2008. All rights reserved. 48
  • 49. What’s cool about REST? Copyright innoQ 2008. All rights reserved. 49
  • 50. A very rough analogy (in pseudocode) Copyright innoQ 2008. All rights reserved. 50
  • 51. generic interface Resource {      Resource(URI u) Any HTTP client      Response get() (Firefox, IE, curl, wget)      Response post(Request r)      Response put(Request r) Any HTTP server      Response delete() } Caches Proxies Google,Yahoo!, MSN class CustomerCollection : Resource { Anything that knows      ... your app      Response post(Request r) {           id = createCustomer(r)           return new Response(201, r) }      ... } specific Copyright innoQ 2008. All rights reserved. 51
  • 52. generic Anything that interface Resource { understands HTTP ... } class AtomFeed : Resource {      AtomFeed get() Any feed reader post(Entry e) ... Any AtomPub client } Yahoo! Pipes class CustomerCollection : AtomFeed { Anything that knows      ... your app } specific Copyright innoQ 2008. All rights reserved. 52
  • 53. Some HTTP Features Verbs (in order of popularity): GET, POST PUT, DELETE HEAD, OPTIONS, TRACE Standardized (& meaningful) response codes Content negotiation Redirection Caching (incl. validation/expiry) Compression Chunking Copyright innoQ 2008. All rights reserved. 53
  • 54. RESTful HTTP Advantages Universal support (programming languages, operating systems, servers, ...) Proven scalability Real web integration for machine-2-machine communication Support for XML, but also other formats Copyright innoQ 2008. All rights reserved. 54
  • 55. REST and Web Services Copyright innoQ 2008. All rights reserved. 55
  • 56. Web Services Issues Web Services are “Web” in name only WS-* tends to ignore the web Abstractions leak, anyway Protocol independence is a bug, not a feature Copyright innoQ 2008. All rights reserved. 56
  • 57. Web Services OrderManagementService + getOrders() A separate interface (façade) + submitOrder() for each purpose + getOrderDetails() + getOrdersForCustomers() + updateOrder() As known CORBA, DCOM, + addOrderItem() + cancelOrder() RMI/EJB + cancelAllOrders() Often used for SOA (“CORBA w/ angle CustomerManagementService brackets) + getCustomers() + addCustomer() + getCustomerDetails() Application-specific protocol + updateCustomer() + deleteCustomer() + deleteAllCustomers() Copyright innoQ 2008. All rights reserved. 57
  • 58. Contribution to the Net’s Value 2 URLs http://example.com/customerservice http://example.com/orderservice 1 method POST Copyright innoQ 2008. All rights reserved. 58
  • 59. REST Approach A single generic (uniform) /orders GET - list all orders PUT - unused POST - add a new order DELETE - cancel all orders interface for everything /orders/{id} GET - get order details PUT - update order POST - add item Generic verbs mapped to DELETE - cancel order resource semantics «interface» /customers Resource GET PUT GET - list all customers PUT - unused POST - add new customer A standard application protocol (e.g. HTTP) POST DELETE - delete all customers DELETE /customers/{id} GET - get customer details PUT - update customer POST - unused DELETE - delete customer /customers/{id}/orders GET - get all orders for customer PUT - unused POST - add order DELETE - cancel all customer orders Copyright innoQ 2008. All rights reserved. 59
  • 60. Contribution to the Net’s Value Millions of URLs every customer every order 4-6 supported methods per resource GET, PUT, POST, DELETE, OPTIONS, HEAD Cacheable, addressable, linkable, ... Copyright innoQ 2008. All rights reserved. 60
  • 61. REST for SOA vs. Business SOA as an approach to business/IT alignment Architecture Technical SOA REST Technology SOAP, WSDL, WS-* (RESTful) HTTP, URI, ... Copyright innoQ 2008. All rights reserved. 61
  • 62. REST as an alternative way to achieve SOA goals Copyright innoQ 2008. All rights reserved. 62
  • 63. Why You Should Care Copyright innoQ 2008. All rights reserved. 63
  • 64. WS-* Roots The Enterprise RPC, COM, CORBA, RMI, EJB Transaction Systems Controlled Environment Top-down Approach Copyright innoQ 2008. All rights reserved. 64
  • 65. REST Roots The Internet Text formats Wire Standards FTP, POP, SMTP Bottom-up Approach Copyright innoQ 2008. All rights reserved. 65
  • 66. Internet vs. Enterprise Copyright innoQ 2008. All rights reserved. 66
  • 67. What’s the difference between the Internet and a typical enterprise? Copyright innoQ 2008. All rights reserved. 67
  • 68. Internet vs. Enterprise One is a gigantic, uncontrollable anarchy of heterogeneous systems with varying quality that evolve independently and constantly get connected in new and unexpected ways. The other is a worldwide, publicly accessible series of interconnected computer networks that transmit data by packet switching using the standard Internet Protocol (IP). Copyright innoQ 2008. All rights reserved. 68
  • 69. REST Support Copyright innoQ 2008. All rights reserved. 69
  • 70. Everybody HTTP Servers, Clients, Proxies, Libraries, ... DHH & The Rails Community Ruby on Rails Google Base GData Calendar Document Lists Blogger Notebook Picasa Amazon Simple Storage Service (S3) Queue Service Flexible Payment Search Sun JSR 311 Jersey IBM Abdera Project Zero Microsoft Astoria WCF Copyright innoQ 2008. All rights reserved. 70
  • 71. Advanced Stuff Copyright innoQ 2008. All rights reserved. 71
  • 72. Description What’s the WSDL equivalent in REST? Copyright innoQ 2008. All rights reserved. 72
  • 73. There is none ... XSD (95% of WSDL) is available to you, anyway Of the remaining 5%, 90% is just silly Why would you want to describe the uniform interface over and over again? Copyright innoQ 2008. All rights reserved. 73
  • 74. ... unless you insist WADL (Web Application Description Language) https://wadl.dev.java.net/ Use URI Templates to define resource behavior Copyright innoQ 2008. All rights reserved. 74
  • 75. WADL Example <resources base=quot;http://api.search.yahoo.com/NewsSearchService/V1/quot;> <resource path=quot;newsSearchquot;> <method name=quot;GETquot; id=quot;searchquot;> <request> <param name=quot;appidquot; type=quot;xsd:stringquot; style=quot;queryquot; required=quot;truequot;/> <param name=quot;queryquot; type=quot;xsd:stringquot; style=quot;queryquot; required=quot;truequot;/> <param name=quot;typequot; style=quot;queryquot; default=quot;allquot;> <option value=quot;allquot;/> <option value=quot;anyquot;/> <option value=quot;phrasequot;/> </param> <param name=quot;resultsquot; style=quot;queryquot; type=quot;xsd:intquot; default=quot;10quot;/> <param name=quot;startquot; style=quot;queryquot; type=quot;xsd:intquot; default=quot;1quot;/> <param name=quot;sortquot; style=quot;queryquot; default=quot;rankquot;> <option value=quot;rankquot;/> <option value=quot;datequot;/> </param> <param name=quot;languagequot; style=quot;queryquot; type=quot;xsd:stringquot;/> </request> <response> <representation mediaType=quot;application/xmlquot; element=quot;yn:ResultSetquot;/> <fault status=quot;400quot; mediaType=quot;application/xmlquot; element=quot;ya:Errorquot;/> </response> </method> </resource> </resources> Copyright innoQ 2008. All rights reserved. 75
  • 76. What You Should Do (in my very humble opinion) Copyright innoQ 2008. All rights reserved. 76
  • 77. Be skeptical of WS-* Learn more about REST Learn to love the URI Appreciate the Web Copyright innoQ 2008. All rights reserved. 77
  • 78. If You Want to Know More Copyright innoQ 2008. All rights reserved. 78
  • 79. http://www.innoq.com/resources/REST Copyright innoQ 2008. All rights reserved. 79
  • 80. http://www.oreilly.com/catalog/9780596529260/ Copyright innoQ 2008. All rights reserved. 80
  • 81. http://www.infoq.com Copyright innoQ 2008. All rights reserved. 81
  • 82. Final Specification These company, organisation, brand and product names Copyright innoQ Deutschland GmbH. All Rights Reser This poster is not to be reproduced or tr Basic Security Profile 1.0 WS-I Board Approval Draft REL Token Profile 1.0 WS-I Working Group Draft SAML Token Profile 1.0 © WS-I Working Group Draft Thank you! Conformance Claim Attachment Mechanism (CCAM) 1.0 WS-I Final Specification Reliable Asynchronous Messaging Profile (RAMP) 1.0 WS-I Working Draft Version 3.0* · February 2007 Stefan Tilkov http://www.innoq.com/blog/st/ stefan.tilkov@innoq.com innoQ Deutschland GmbH innoQ Schweiz GmbH Halskestraße 17 Gewerbestrasse 11 D-40880 Ratingen CH-6330 Cham Phone +49 21 02 77 162-100 Phone +41 41 743 0111 info@innoq.com · www.innoq.com Copyright innoQ 2008. All rights reserved. 82