SlideShare una empresa de Scribd logo
1 de 87
Descargar para leer sin conexión
A Couple of Ways to Skin an
    Internet-Scale Cat
             Jim Webber
       http://jim.webber.name
Roadmap

•A little Swedish
•Some home truths
 –About Web Services and the Web
•Implementing Workflows
 –The Starbuck’s example
•Q&A
Jag heter Jim und kommer du England


•I like Web Services            •I wrote this book, about
  –I am a MESTian at heart       WS-*
•I like the Web
  –I have sympathies that lie
   with the RESTafarians
Jag heter Jim und kommer du England


•I like Web Services              •I am “similarly minded”
  –I am a MESTian at heart
•I like the Web
  –But I have sympathies
   that lie with the
   RESTafarians
      Mark Baker’s
   consulting company,
         Coactus




        That’s me
What is a Web Service?

•A Web Service is a
 system which exposes a
 message oriented-
 interface whose                            Application


 messages are in SOAP
 format                                   SOAP message
                                            processor
  –SOAP is the lowest point
   in the WS stack                       SOAP Messages

•A Web Service is just a
 technical mechanism for
                                                    Network
 hosting a business
 process
A Web Services Application

                      Purchase order
                          system               Purchase order
                                                 application




                 SOAP message             SOAP message
                   processor                processor




                          SOAP Messages

Example: ServiceA sends ServiceB a MessageX. ServiceB
responds with a MessageY or a MessageZ depending on the
content of the MessageX it received.
Typical SOA with Web Services
Administrative




                                             Administrative
  domain




                                               domain
Services Support Protocols
Engineered for Loose Coupling
Web Services are Evil?
                                      I hate WSDL. I
•Two things:                           wanna kick it
                                    squarely in the nuts!
  –WSDL
    • It’s an XML IDL for RPC
    • Therefore ill-suited for Internet scale

                                                                   Photo: Comedy Central

  –All the superfluous WS-* standards and politics
    • Too many dumb WS-KitchenSink standards
          – Not everything needs to be an OASIS standard!
    • Too many useful tools spent too long in standards wars
          – 3 transactions specs? Anyone heard of consistency???

•Toolkits hide messaging model, provide leaky
 abstractions over a distributed system
SSDL Embraces Messages

•WSDL is limited to request-response interactions
  –Can theoretically augment with BPEL for conversations
  –In practice tool support is limited, approach is verbose and
   complex
•SOAP Service Description Language (SSDL) is better!
  –All messages are SOAP + WS-Addressing over arbitrary
   transports specified by URI
  –Metadata describes conversation state machine for 1...N
   services
    • It does what WS-Choreography does too!
  –Tool support: http://soya.sourceforge.net
Why Web Services Rock My World

• Good Web Services/SOA are message-oriented
  – TCP/IP is message-oriented and has scaled really well!
  – SOAP Service Description Language provides message-oriented
    metadata for services
     • WSDL must die, die, die!
• Business processes tend to be message-oriented
  – Easy to map workflows onto
• Loose coupling by default
• End-to-end processing model
  – Defined by SOAP, not WSDL!
• Composable model
  – You can ignore all the dumb stuff in the WS-* stack           Photo: Comedy Central



     • Except WSDL because the toolkits embrace it
Web Abuse
                            Tunnelling is all a
•Two lo-fi approaches to     bunch of tree-
                           hugging hippy crap!
  “Web” integration
  –URI tunnelling
  –POX
•Both models treat HTTP as a                      Photo: Comedy Central




 transport
  –More or less
•Yet some of the Web jihadists don’t
 see this
•Both of these approaches overlay the
 Web with their own (weak) models...
Web Tunnelling
                                                 Remember: SOAP +
                                                  WS-Addressing is
•Web Services tunnel SOAP over HTTP               transport neutral
  –Using the Web as a transport only
  –Ignoring many of the features for robustness the Web has
   built in
•Lots of Web people doing the same!
  –URI tunnelling, POX approaches are the most popular
   styles on today’s Web
                                      But they claim to be
  –Worse than SOAP!                    “lightweight” and
    • Less metadata!                         RESTful
URI Tunnelling Pattern

•Web servers understand URIs
•URIs have structure
•Methods have signatures
•Can match URI structure to method signature
•E.g.
  – http://example.com/addNumbers?p1=10&p2=11
  – int addNumbers(int i, int j) { return i + j; }
URI Tunnelling Strengths

•Very easy to understand
•Great for simple procedure-calls
•Simple to code
  –Do it with the servlet API, HttpListener, IHttpHandler, Rails
   controllers, whatever!
•Interoperable
  –It’s just URIs!
URI Tunnelling Weaknesses

•It’s brittle RPC!
•Tight coupling, no metadata
  –No typing or “return values” specified in the URI
•Not robust – have to handle failure cases manually
•No metadata support
  –Construct the URIs yourself, map them to the function
   manually
•You can use GET (but also POST)
  –OK for functions, but contrary to the Web for functions
   with side-affects
POX Pattern

•Web servers understand how to process requests
 with bodies
  –Because they understand forms
•And how to respond with a body
  –Because that’s how the Web works
•POX uses XML in the HTTP request and response to
 move a call stack between client and server
POX Strengths

•Simplicity – just use HTTP POST and XML
•Re-use existing infrastructure and libraries
•Interoperable
  –It’s just XML and HTTP POST
•Can use complex data structures
  –By representing them in XML
POX Weaknesses

•Client and server must collude on XML payload
  –Tightly coupled approach
•No metadata support
  –Unless you’re using a POX toolkit that supports WSDL with
   HTTP binding (like WCF)
•Does not use Web for robustness
•Does not use SOAP + WS-* for robustness
RPC is Commonplace Today

•To err is human, to really mess things up you need a
 computer
•To really, really mess things up you need a
 distributed system
  –“A Note on Distributed Computing”
•Bad Web Services and Web integration
 have much in common
  –It’s RPC!
  –With latencies and nasty partial failure characteristics
</rant>
Web Fundamentals

•To embrace the Web, we need to understand how it
 works
  –Which means understanding RFC 2616 to a degree
•The Web is a distributed hypermedia model
  –It doesn’t try to hide that distribution from you!
•Our challenge:
  –Figure out the mapping between our problem domain and
   the underlying Web platform
Web History

•Started as a distributed hypermedia platform
  –CERN, Berners-Lee, 1990
•Revolutionised hypermedia
  –Imagine emailing someone a hypermedia deck nowadays!
•Architecture of the Web largely fortuitous
  –W3C and others have since retrofitted/captured the Web’s
   architectural characteristics
The REST Architectural Style

•Fielding captured his interpretation of the WWW
 architecture in his 2000 thesis
  –REpresentational State Transfer (REST)
•Since then the Web community has been working on
 ways to make distributed systems behave more like
 the Web
  –Championed by some very vocal people!
RESTafarians?




Bob Marley                  Mark Baker,
Photo by PanAfrican.tv      Photo by Paul Downey
Web Characteristics

•Scalable
•Fault-tolerant
•Recoverable
•Secure
•Loosely coupled

•Precisely the same characteristics we want in
 business software systems!
Scalability

•Web is truly Internet-scale
  –Uniform interface
    • HTTP defines a standard interface for all actors on the Web
    • Replication and caching is baked into this model
          – Caches have the same interface as real resources!
  –Stateless model
    • Supports horizontal scaling
Fault Tolerant

•The Web supports a stateless model
  –All information required to process a request must be
   present in that request
    • Sessions are still available, but must be handled in a Web-
      consistent manner
•Statelessness also means easy replication
  –One Web server is replaceable with another
  –Easy fail-over, horizontal scaling
Recoverable

•The Web places emphasis on repeatable information
 retrieval
  –In failure cases, can safely repeat GET on resources
•HTTP verbs plus rich error handling help to remove
 guesswork from recovery
  –HTTP statuses tell you what happened!
Secure

•HTTPs is a mature technology
  –Based on SSL for secure point-to-point information
   retrieval
•Isn’t sympathetic to Web architecture
  –Can’t cache!
•But $billions transacted through HTTPs everyday
Loosely Coupled

•Adding a Web site to the WWW does not affect any
 other existing sites
•All Web actors support the same, uniform interface
  –Easy to plumb new caches, proxies, servers, resources, etc
   into the Web
Tenets for Web-based Services

•Resource-based
  –Rather than service-oriented
•Addressability
  –Interesting things should have names
•Statelessness
  –No stateful conversations with a resource
•Representations
  –Resources can be serialised into representations
•Links
  –Resources
•Uniform Interface
  –No plumbing surprises!
Resources

•A resource is something “interesting” in your system
•Can be anything
  –Spreadsheet (or one of its cells)
  –Blog posting
  –Printer
  –Winning lottery numbers
  –A transaction
  –Others?
•Making your system Web-friendly increases its surface
 area
  –You expose many resources, rather than fewer endpoints
Resource Representations

•We deal with representations of resources
  –Not the resources themselves
    • “Pass-by-value” semantics
  –Representation can be in any format
    • Any media type
•Each resource has one or more representations
  –Representations like JSON or XML are good for Web-based
   services
•Each resource implements the uniform HTTP
 interface
•Resources have names and addresses (URIs)
Resource Architecture

   Consumer
  (Web Client)       Uniform Interface
                       (Web Server)




                                Logical Resources

Resource Representation
 (e.g. XML document)
                                               Physical Resources
URIs                                    See URI
                                                       Templates later...

•Resource URIs should be descriptive, predictable?
  –http://spreadsheet/cells/a2,a9
  –http://jim.webber.name/2007/06.aspx
    • Convey some ideas about how the underlying resources are
      arranged
    • Can infer http://spreadsheet/cells/b0,b10 and
      http://jim.webber.name/2005/05.aspx for example
•URIs should be opaque?
  –http://tinyurl.com/6
  –TimBL says “opque URIs are cool”
    • Convey no semantics, can’t infer anything from them
         – Can’t introduce coupling
URI Templates, in brief


•Use URI templates to make your resource
 structure easy to understand – transparent!
•For Amazon S3 (storage service) it’s easy:
  – http://s3.amazon.com/{bucket-name}/{object-name}



Bucket1                      Bucket2
            Object2
  Object1                      Object1
                 Object3                   Object2
URI Templates in Action

•Once you can reason about a URI, you can apply the
 standard HTTP techniques to it
  –Because of the uniform interface
•You have metadata for each resource
  –OPTIONS, HEAD
  –Which yield permitted verbs and resource representations
•Can program against this easily using Web client
 libraries and regular expressions
Links

•Connectedness is good in Web-based systems
•Resource representations can contain other URIs
  –Resources contain links (or URI templates) to other resources
•Links act as state transitions
  –Think of resources as states in a state machine
  –And links as state transitions
•Application (conversation) state is captured in terms of
 these states
  –Server state is captured in the resources themselves, and their
   underlying data stores
The HTTP Verbs




                                                 Decreasing likelihood of being understood by
•Retrieve a representation of a resource: GET
•Get metadata about an existing resource: HEAD
•Create a new resource: PUT to a new URI,




                                                              a Web server today
                                                              a Web server today
 or POST to an existing URI
•Modify an existing resource: PUT to an
 existing URI
•Delete an existing resource: DELETE
•See which of the verbs the resource
 understands: OPTIONS
GET Semantics

•GET retrieves the representation of a resource
•Should be idempotent
  –Shared understanding of GET semantics
  –Don’t violate that understanding!
POST Semantics

•POST creates a new resource
•But the server decides on that resource’s URI
•Common human Web example: posting to a blog
  –Server decides URI of posting and any comments made on
   that post
•Programmatic Web example: creating a new
 employee record
  –And subsequently adding to it
POST Request

POST / HTTP/1.1           Verb, path, and HTTP
                                 version
Content-Type: text/xml
Host: localhost:8888
Content-Length: ....
                          Content type (XML)
Connection: Keep-Alive

<buy>
  <symbol>ABCD</symbol>
                          Content (again XML)
  <price>27.39</price>
</buy>
POST Response

201 CREATED
Location: /orders/jwebber/ABCD/2007-07-
 08-13-50-53
PUT Semantics

•PUT creates a new resource but the client decides
 on the URI
  –Providing the server logic allows it
•Also used to update existing resources by
 overwriting them in-place
•Don’t use POST here
  –Because PUT is idempotent!
PUT Request
PUT /orders/jwebber/ABCD/2007-07-08-13-50-53 HTTP/1.1
Content-Type: text/xml
Host: localhost:8888
Content-Length: ....
                                        Verb, path and HTTP
Connection: Keep-Alive                         version

<buy>
                                       Updated content
  <symbol>ABCD</symbol>
                                      (higher buy price)
  <price>27.44</price>
</buy>
PUT Response

200 OK
Location: /orders/jwebber/ABCD/2007-07-080-13:50:53
Content-Type: application/xml

<nyse:priceUpdated .../>
                                Minimalist response might contain
                                     only status and location
This is important for
                  DELETE Semantics                  decoupling
                                              implementation details
                                                 from resources
•Stop the resource from being accessible
  –Logical delete, not necessarily physical
•Request
  DELETE /user/jwebber HTTP 1.1
  Host: example.org
•Response
  200 OK
  Content-Type: application/xml
  <admin:userDeleted>
    jwebber
  </admin:userDeleted>
HEAD Semantics

•HEAD is like GET, except it only retrieves metadata
•Request
  HEAD /user/jwebber HTTP 1.1
  Host: example.org                Useful for caching,
•Response                            performance
  200 OK
  Content-Type: application/xml
  Last-Modified: 2007-07-08T15:00:34Z
  ETag: aabd653b-65d0-74da-bc63-4bca-
   ba3ef3f50432
OPTIONS Semantics

•Asks which methods are supported by a resource
  –Easy to spot read-only resources for example


•Request
  OPTIONS /user/jwebber HTTP 1.1
  Host: example.org
•Response                         You can only read and add
  200 OK                               to this resource

  Allowed: GET,HEAD,POST
HTTP Status Codes

•The HTTP status codes provide metadata about the state
 of resources
•They are part of what makes the Web a rich platform for
 building distributed systems
•They cover five broad categories
  –1xx   - Metadata
  –2xx   – Everything’s fine
  –3xx   – Redirection
  –4xx   – Client did something wrong
  –5xx   – Server did a bad thing
•There are a handful of these codes that we need to
 know in more detail
Common Status Codes

•100 – Continue
                       •400 – Bad Request
•200 – OK
                       •401 – Unauthorised
•201 – Created
                       •403 – Forbidden
•301 – Moved
                       •404 – Not Found
 Permanently
                       •405 – Method Not
•303 – See Other
                        Allowed
•304 – Not Modified
                       •500 – Internal Server
                        Error
HTTP Headers

•Headers provide metadata to assist processing
  –Identify resource representation format (media type),
   length of payload, supported verbs, etc
•HTTP defines a wealth of these
  –And like status codes they are our building blocks for
   robust service implementations
Some Useful Headers

•Authorization                    •If-Modified-Since/Last-
  –Contains credentials (basic,    Modified
   digest, WSSE, etc)               –Used for conditional GET
  –Extensible                        too
•Content-Type                     •Location
  –The resource                     –Used to flag the location of
   representation form               a created/moved resource
    • E.g. application/xml,         –In combination with:
      application/xhtml+xml            • 201 Created, 301 Moved
•ETag/If-None-Match                      Permanently, 302 Found,
                                         307 Temporary Redirect,
  –Opaque identifier – think             300 Multiple Choices, 303
   “checksum” for resource               See Other
   representations                •WWW-Authenticate
  –Used for conditional GET
                                    –Used with 401 status
                                       • Tells client what
                                         authentication is needed
We have a comprehensive model for distributed
computing…
   … but we still need a way of programming it.
Describing Contracts with Links

•The value of the Web is its “linked-ness”
  –Links on a Web page constitute a contract/API for page
   traversals
•The same is true of the programmatic Web
•Use Links to describe state transitions in
 programmatic Web services
  –By navigating resources (aka application state)
Links as APIs

<confirm xmlns=quot;...quot;>
                             •Following a link causes
<link rel=quot;paymentquot;
 href=quot;https://payquot;           an action to occur
  type=quot;application/xmlquot;/>   •This is the start of a
<link rel=quot;postponequot;
 href=quot;https://wishlistquot;      state machine!
  type=quot;application/xmlquot;/>   •Links lead to other
</confirm>
                              resources which also
                              have links
                             •Can make this stronger
                              with semantics
                               –Microformats
Links are State Transitions
Microformats

•Microformats are an example of little “s” semantics
•Innovation at the edges of the Web
  –Not by some central design authority (e.g. W3C)
•Started by embedding machine-processable
 elements in Web pages
  –E.g. Calendar information, contact information, etc
  –Using existing HTML features like class, rel, etc
Microformats and Resources

•Use Microformats to structure resources where
 formats exist
  –I.e. Use hCard for contacts, hCalendar for data
•Create your own formats (sparingly) in other places
  –Annotating links is a good start
  –<link rel=quot;withdraw.cashquot; .../>
  –<link rel=quot;service.postquot;
   type=quot;application/x.atom+xmlquot; href=quot;{post-
   uri}quot; title=quot;some titlequot;>
•The rel attribute describes the semantics of the
 referred resource
“Subjunctive Programming”

•With changing contracts embedded as part of a
 resource, we can’t be too imperative anymore
•Think “subjunctive”
•Code for Web integration by thinking “what if” rather
 than “if then”
  –The Web is declarative!
We have a framework!

•The Web gives us a processing and metadata model
  –Verbs and status codes
  –Headers


•Gives us metadata contracts or Web “APIs”
  –URI Templates
  –Links


•Strengthened with semantics
  –Little “s”
Workflow

•How does a typical enterprise workflow look when
 it’s implemented in a Web-friendly way?
•Let’s take Starbuck’s as an example, the happy path
 is:
  –Make selection
    • Add any specialities
  –Pay
  –Wait for a while
  –Collect drink
Workflow and MOM


•With Web Services we
 exchange messages
 with the service
•Resource state is hidden      Order Drink
 from view
•Conversation state is all   Add Specialities
 we know
  –Advertise it with SSDL,   Order Confirmation
   BPEL
•Uniform interface, roles           Pay
 defined by SOAP
  –No “operations”                  Coffee!
Web-friendly Workflow

•What happens if workflow stages are modelled as
 resources?
•And state transitions are modelled as hyperlinks or
 URI templates?
•And events modelled by traversing links and
 changing resource states?
•Answer: we get Web-friendly workflow
  –With all the quality of service provided by the Web
Placing an Order


•Place your order by POSTing it to a well-known
 URI
  – http://example.starbucks.com/order




                                         Starbuck’s Service
       Client
Placing an Order: On the Wire

•Request
POST /order HTTP 1.1                   •Response
Host: starbucks.example.com            201 Created
Content-Type: application/xml          Location:
                                        http://starbucks.example.com/o
Content-Length: ...
                                        rder?1234
                                       Content-Type: application/xml
<order xmlns=quot;urn:starbucksquot;>
                                       Content-Length: ...
  <drink>latte</drink>
</order>
                                       <order xmlns=quot;urn:starbucksquot;>
                                         <drink>latte</drink>
                                        <link rel=quot;paymentquot;
             If we have a (private)     href=quot;https://starbucks.exampl
                 A link! Is this the
             microformat, this can      e.com/payment/order?1234quot;
                  start of an API?
              become a neat API!         type=quot;application/xmlquot;/>
                                       </order>
Whoops! A mistake


•I like my coffee to taste like coffee!
•I need another shot of espresso
  –What are my OPTIONS?


  Request                        Response
OPTIONS /order?1234 HTTP 1.1   Allow: GET, PUT
Host: starbucks.example.com                      Phew! I can
                                                 update my
                                                    order
Look Before You Leap


•See if the resource has changed since you
 submitted your order
  –If you’re fast your drink hasn’t been prepared yet


  Request                        Response
PUT /order?1234 HTTP 1.1       200 OK
Host: starbucks.example.com
                                             I can still PUT this
Expect: 100-Continue                         resource, for now
Amending an Order


•Add specialities to you order via PUT
  –Starbucks needs 2 shots!




                                  Starbuck’s Service
      Client
Amending an Order: On the Wire

•Request                            •Response
PUT /order?1234 HTTP 1.1            200 OK
Host: starbucks.example.com         Location:
Content-Type: application/xml        http://starbucks.example.com/ord
Content-Length: ...                  er?1234
                                    Content-Type: application/xml
<order xmlns=quot;urn:starbucksquot;>       Content-Length: ...
  <drink>latte</drink>
  <additions>shot</additions>       <order xmlns=quot;urn:starbucksquot;>
  <link rel=quot;paymentquot;                 <drink>latte</drink>
 href=quot;https://starbucks.example.     <additions>shot</additions>
 com/payment/order?1234quot;             <link rel=quot;paymentquot;
  type=quot;application/xmlquot;/>           href=quot;https://starbucks.example.
</order>                             com/payment/order?1234quot;
                                      type=quot;application/xmlquot;/>
                                    </order>
Statelessness

•Remember interactions with resources are stateless
•The resource “forgets” about you while you’re not
 directly interacting with it
•Which means race conditions are possible
•Use If-Unmodified-Since to make sure
•You’ll get a 412 – Precondition Failed if you
 lost the race
  –But you’ll avoid potentially putting the resource into some
   inconsistent state
Warning: Don’t be Slow!


•Can only make changes until someone actually
 makes your drink
  –Resources can change without your intervention


  Request                        Response
PUT /order?1234 HTTP 1.1
                               409 - Conflict
Host: starbucks.example.com
...                                   Too slow! Someone else has
                                     changed the state of my order
      Request                    Response
OPTIONS /order?1234 HTTP 1.1   Allow: GET
Host: starbucks.example.com
Order Confirmation


•Check your order status by GETing it




                                 Starbuck’s Service
     Client
Order Confirmation: On the Wire


•Request                               •Response
GET /order?1234 HTTP 1.1               200 OK
Host: starbucks.example.com            Location:
Content-Type: application/xml            http://starbucks.example.com/order
Content-Length: ...                      ?1234
                                       Content-Type: application/xml
                                       Content-Length: ...


                                       <order xmlns=quot;urn:starbucksquot;>
                                         <drink>latte</drink>
                                         <additions>shot</additions>
                                        <link rel=quot;paymentquot;
                                         href=quot;https://starbucks.example.co
          Are they trying to tell me     m/order?1234quot;
                                         type=quot;application/xmlquot;/>
                 something?
                                       </order>
Order Payment


•POST your payment to the order resource
  https://starbucks.example.com/order?1234




                                                     Starbuck’s Service
       Client




                                New resource!
                https://starbucks.example.com/payment/order?1234
How did I know to POST?


•The client knew the URI to POST to from the link
•Verified with OPTIONS
  –Just in case you were in any doubt ☺



  Request                         Response
OPTIONS /order?1234 HTTP 1.1    Allow: GET, POST
Host: starbucks.example.com
Order Payment: On the Wire

•Request                          •Response
POST /order?1234 HTTP 1.1         201 Created
Host: starbucks.example.com       Location:
Content-Type: application/xml      https://starbucks.example.com/pa
Content-Length: ...                yment/order?1234
                                  Content-Type: application/xml
<payment xmlns=quot;urn:starbucksquot;>   Content-Length: ...
  <cardNo>123456789</cardNo>
  <expires>07/07</expires>
  <name>John Citizen</name>       <payment xmlns=quot;urn:starbucksquot;>
  <amount>4.00</amount>             <cardNo>123456789</cardNo>
</payment>                          <expires>07/07</expires>
                                    <name>John Citizen</name>
                                    <amount>4.00</amount>
                                  </payment>
Check that you’ve paid


•Request                        •Response
GET /order?1234 HTTP 1.1        200 OK
Host: starbucks.example.com     Content-Type: application/xml
Content-Type: application/xml   Content-Length: ...
Content-Length: ...

       My “API” has changed,    <order xmlns=quot;urn:starbucksquot;>
         because I’ve paid        <drink>latte</drink>
            enough now            <additions>shot</additions>
                                </order>
What Happened Behind the Scenes?

•Starbucks can use the same resources!
•Plus some private resources of their own
  –Master list of coffees to be prepared
•Authenticate to provide security on some resources
  –E.g. only Starbuck’s are allowed to view payments
Master Coffee List


•/orders URI for all orders, only accepts GET
  – Anyone can use it, but it is only useful for Starbuck’s
  – It’s not identified in any of our public APIs anywhere, but the back-end
    systems know the URI
                                       Response
  Request                           200 OK
                                    Content-Type: application/xml
GET /orders HTTP 1.1                Content-Length: ...
                                    <?xml version=quot;1.0quot; ?>
Host: starbucks.example.com         <feed xmlns=quot;http://www.w3.org/2005/Atomquot;>
                                     <title>Coffees to make</title>
                                     <link rel=quot;alternatequot;
                                    href=quot;http://example.starbucks.com/order.atomquot;/>
                                     <updated>2007-07-10T09:18:43Z</updated>
                                     <author><name>Johnny Barrista</name></author>
                Atom feed!           <id>urn:starkbucks:45ftis90</id>
                                     <entry>
                                      <link rel=quot;alternatequot; type=quot;application/xmlquot;
                                    href=quot;http://starbucks.example.com/order?1234quot;/>
                                      <id>urn:starbucks:a3tfpfz3</id>
                                     </entry>
                                     ...
                                    </feed>
Payment

  • Only Starbucks systems can access the record of payments
     – Using the URI template: http://.../payment/order?{order_id}
  • We can use HTTP authorisation to enforce this

  Request                               Response
                                      401 Unauthorized
GET /payment/order?1234 HTTP 1.1
                                      WWW-Authenticate: Digest
Host: starbucks.example.com           realm=quot;starbucks.example.comquot;,
                                      qop=quot;authquot;, nonce=quot;ab656...quot;,
                                      opaque=quot;b6a9...quot;


  Request                               Response
GET /payment/order?1234 HTTP 1.1      200 OK
Host: starbucks.example.com
Authorization: Digest username=quot;jwquot;   Content-Type: application/xml
realm=quot;starbucks.example.com“         Content-Length: ...
nonce=quot;...quot;
uri=quot;payment/order?1234quot;              <payment xmlns=quot;urn:starbucksquot;>
qop=auth                                <cardNo>123456789</cardNo>
nc=00000001                             <expires>07/07</expires>
cnonce=quot;...quot;                            <name>John Citizen</name>
reponse=quot;...quot;                           <amount>4.00</amount>
opaque=quot;...quot;                          </payment>
Finally drink your coffee...




Source: http://images.businessweek.com/ss/06/07/top_brands/image/starbucks.jpg
What did we learn from Starbuck’s?

•HTTP has a header/status combination for every
 occasion
•APIs are expressed in terms of links, and links are great!
  –APP-esque APIs
•APIs can also be constructed with URI templates and
 inference
•XML is fine, but we could also use formats like APP,
 JSON or even default to XHTML as a sensible middle
 ground
•State machines (defined by links) are important
  –Just as in Web Services…
Summary

•Both the Web and Web Services suffer from poor
 patterns and practices, awful tooling
•Both platforms are about externalising state
 machines when done well
  –Conversation state machines for Web Services
  –Hypermedia state machines for Web
•WS-* is bloated, but most of it can (should!) be
 safely ignored
•The Web is now starting to feel the love from
 middleware vendors too – beware!
•MEST and REST are both sensible approaches
Questions?



Developing Web-based
      Services                   Blog:
   (working title)
                       http://jim.webber.name
     Jim Webber
  Savas Parastatidis
    Ian Robinson

   Coming 2008…

Más contenido relacionado

La actualidad más candente

Esposito Ajax Remote
Esposito Ajax RemoteEsposito Ajax Remote
Esposito Ajax Remote
ask bills
 
Ruby on Rails Security
Ruby on Rails SecurityRuby on Rails Security
Ruby on Rails Security
amiable_indian
 

La actualidad más candente (10)

Esposito Ajax Remote
Esposito Ajax RemoteEsposito Ajax Remote
Esposito Ajax Remote
 
Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)
 
Qcon
QconQcon
Qcon
 
Consuming SOAP
Consuming SOAPConsuming SOAP
Consuming SOAP
 
Ruby on Rails Security
Ruby on Rails SecurityRuby on Rails Security
Ruby on Rails Security
 
REST services and IBM Domino/XWork - DanNotes 19-20. november 2014
REST services and IBM Domino/XWork - DanNotes 19-20. november 2014REST services and IBM Domino/XWork - DanNotes 19-20. november 2014
REST services and IBM Domino/XWork - DanNotes 19-20. november 2014
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 
Softsphere 08 web services bootcamp
Softsphere 08 web services bootcampSoftsphere 08 web services bootcamp
Softsphere 08 web services bootcamp
 
HK CodeConf 2015 - Your WebPerf Sucks
HK CodeConf 2015 - Your WebPerf Sucks HK CodeConf 2015 - Your WebPerf Sucks
HK CodeConf 2015 - Your WebPerf Sucks
 

Destacado

Day 2 2nd_weekcris
Day 2 2nd_weekcrisDay 2 2nd_weekcris
Day 2 2nd_weekcris
cristiarnau
 
Exercícios de Trigonometria Resolvidos
Exercícios de Trigonometria ResolvidosExercícios de Trigonometria Resolvidos
Exercícios de Trigonometria Resolvidos
Flaber Bertochi
 
Proxecto de recuperación do río Corgo nos Salgueiriños
Proxecto de recuperación do río Corgo nos SalgueiriñosProxecto de recuperación do río Corgo nos Salgueiriños
Proxecto de recuperación do río Corgo nos Salgueiriños
bng.compostela
 
Firefox的安全性
Firefox的安全性Firefox的安全性
Firefox的安全性
Liu Xing
 

Destacado (20)

pmc trip
pmc trippmc trip
pmc trip
 
Day 2 2nd_weekcris
Day 2 2nd_weekcrisDay 2 2nd_weekcris
Day 2 2nd_weekcris
 
Adobe
AdobeAdobe
Adobe
 
Deploying Complex Applications on Docker using Apache Brooklyn
Deploying Complex Applications on Docker using Apache BrooklynDeploying Complex Applications on Docker using Apache Brooklyn
Deploying Complex Applications on Docker using Apache Brooklyn
 
Set the World on Fire, keynote, Colorado Association of Libraries
Set the World on Fire, keynote, Colorado Association of LibrariesSet the World on Fire, keynote, Colorado Association of Libraries
Set the World on Fire, keynote, Colorado Association of Libraries
 
Apresiasi NSPM Penataan Ruang (srn-ed07)
Apresiasi NSPM Penataan Ruang (srn-ed07)Apresiasi NSPM Penataan Ruang (srn-ed07)
Apresiasi NSPM Penataan Ruang (srn-ed07)
 
Library 101 82208
Library 101 82208Library 101 82208
Library 101 82208
 
The Black List - Vol. 1 - Social Media Masters
The Black List - Vol. 1 - Social Media MastersThe Black List - Vol. 1 - Social Media Masters
The Black List - Vol. 1 - Social Media Masters
 
Survival Tips for Nonprofit Marketers
Survival Tips for Nonprofit MarketersSurvival Tips for Nonprofit Marketers
Survival Tips for Nonprofit Marketers
 
Bring on the Rain Putting the Cloud to Work for You: an introduction to cloud...
Bring on the Rain Putting the Cloud to Work for You: an introduction to cloud...Bring on the Rain Putting the Cloud to Work for You: an introduction to cloud...
Bring on the Rain Putting the Cloud to Work for You: an introduction to cloud...
 
Horizontal Leadership Managing Change And Complexity
Horizontal Leadership   Managing Change And ComplexityHorizontal Leadership   Managing Change And Complexity
Horizontal Leadership Managing Change And Complexity
 
The Realtime Story - part 2
The Realtime Story - part 2The Realtime Story - part 2
The Realtime Story - part 2
 
Exercícios de Trigonometria Resolvidos
Exercícios de Trigonometria ResolvidosExercícios de Trigonometria Resolvidos
Exercícios de Trigonometria Resolvidos
 
Walking Track in Groningen
Walking Track in GroningenWalking Track in Groningen
Walking Track in Groningen
 
Avid Powerpoint by Group 5
Avid Powerpoint by Group 5Avid Powerpoint by Group 5
Avid Powerpoint by Group 5
 
Presentation to GIBBS MBA class on Disruption and Innovation
Presentation to GIBBS MBA class on Disruption and InnovationPresentation to GIBBS MBA class on Disruption and Innovation
Presentation to GIBBS MBA class on Disruption and Innovation
 
Proxecto de recuperación do río Corgo nos Salgueiriños
Proxecto de recuperación do río Corgo nos SalgueiriñosProxecto de recuperación do río Corgo nos Salgueiriños
Proxecto de recuperación do río Corgo nos Salgueiriños
 
Ubuntu
UbuntuUbuntu
Ubuntu
 
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
 
Firefox的安全性
Firefox的安全性Firefox的安全性
Firefox的安全性
 

Similar a Jim Webber A Couple Of Ways To Skin An Internet Scale Catx

Writing & Using Web Services
Writing & Using Web ServicesWriting & Using Web Services
Writing & Using Web Services
Rajarshi Guha
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
Raveendra Bhat
 
Jim Webber R E S Tful Services
Jim  Webber    R E S Tful  ServicesJim  Webber    R E S Tful  Services
Jim Webber R E S Tful Services
SOA Symposium
 
VTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData projectVTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData project
Tom Klaasen
 
The Java Microservice Library
The Java Microservice LibraryThe Java Microservice Library
The Java Microservice Library
Rick Hightower
 

Similar a Jim Webber A Couple Of Ways To Skin An Internet Scale Catx (20)

ReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... YawnReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... Yawn
 
Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289
 
Writing & Using Web Services
Writing & Using Web ServicesWriting & Using Web Services
Writing & Using Web Services
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
 
Jim Webber R E S Tful Services
Jim  Webber    R E S Tful  ServicesJim  Webber    R E S Tful  Services
Jim Webber R E S Tful Services
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 
Web sockets - Pentesting
Web sockets - Pentesting Web sockets - Pentesting
Web sockets - Pentesting
 
Do We Need Esb Any More
Do We Need Esb Any MoreDo We Need Esb Any More
Do We Need Esb Any More
 
Windows communication foundation (part1) jaliya udagedara
Windows communication foundation (part1)    jaliya udagedaraWindows communication foundation (part1)    jaliya udagedara
Windows communication foundation (part1) jaliya udagedara
 
API Design and WebSocket
API Design and WebSocketAPI Design and WebSocket
API Design and WebSocket
 
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
 
Web Services Foundation Technologies
Web Services Foundation TechnologiesWeb Services Foundation Technologies
Web Services Foundation Technologies
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
VTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData projectVTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData project
 
The Java Microservice Library
The Java Microservice LibraryThe Java Microservice Library
The Java Microservice Library
 
Real-Time with Flowdock
Real-Time with FlowdockReal-Time with Flowdock
Real-Time with Flowdock
 
Meanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraMeanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore Chandra
 
Decoupled cms sunshinephp 2014
Decoupled cms sunshinephp 2014Decoupled cms sunshinephp 2014
Decoupled cms sunshinephp 2014
 
Ntg web services
Ntg   web servicesNtg   web services
Ntg web services
 

Más de deimos

Randy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural PrinciplesRandy Shoup eBays Architectural Principles
Randy Shoup eBays Architectural Principles
deimos
 
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
deimos
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvm
deimos
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwr
deimos
 
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
deimos
 
Venkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In GroovyVenkat Subramaniam Building DSLs In Groovy
Venkat Subramaniam Building DSLs In Groovy
deimos
 
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
deimos
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
deimos
 
Tim Mackinnon Agile And Beyond
Tim Mackinnon Agile And BeyondTim Mackinnon Agile And Beyond
Tim Mackinnon Agile And Beyond
deimos
 
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
deimos
 
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
deimos
 
Stefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To RestStefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To Rest
deimos
 
Rod Johnson Cathedral
Rod Johnson CathedralRod Johnson Cathedral
Rod Johnson Cathedral
deimos
 
Mike Stolz Dramatic Scalability
Mike Stolz Dramatic ScalabilityMike Stolz Dramatic Scalability
Mike Stolz Dramatic Scalability
deimos
 
Matt Youill Betfair
Matt Youill BetfairMatt Youill Betfair
Matt Youill Betfair
deimos
 
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
deimos
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
deimos
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
deimos
 
Neal Gafter Java Evolution
Neal Gafter Java EvolutionNeal Gafter Java Evolution
Neal Gafter Java Evolution
deimos
 

Más de 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
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvm
 
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
 
Stefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To RestStefan Tilkov Pragmatic Intro To Rest
Stefan Tilkov Pragmatic Intro To Rest
 
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
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Jim Webber A Couple Of Ways To Skin An Internet Scale Catx

  • 1. A Couple of Ways to Skin an Internet-Scale Cat Jim Webber http://jim.webber.name
  • 2. Roadmap •A little Swedish •Some home truths –About Web Services and the Web •Implementing Workflows –The Starbuck’s example •Q&A
  • 3. Jag heter Jim und kommer du England •I like Web Services •I wrote this book, about –I am a MESTian at heart WS-* •I like the Web –I have sympathies that lie with the RESTafarians
  • 4. Jag heter Jim und kommer du England •I like Web Services •I am “similarly minded” –I am a MESTian at heart •I like the Web –But I have sympathies that lie with the RESTafarians Mark Baker’s consulting company, Coactus That’s me
  • 5. What is a Web Service? •A Web Service is a system which exposes a message oriented- interface whose Application messages are in SOAP format SOAP message processor –SOAP is the lowest point in the WS stack SOAP Messages •A Web Service is just a technical mechanism for Network hosting a business process
  • 6. A Web Services Application Purchase order system Purchase order application SOAP message SOAP message processor processor SOAP Messages Example: ServiceA sends ServiceB a MessageX. ServiceB responds with a MessageY or a MessageZ depending on the content of the MessageX it received.
  • 7. Typical SOA with Web Services Administrative Administrative domain domain
  • 10. Web Services are Evil? I hate WSDL. I •Two things: wanna kick it squarely in the nuts! –WSDL • It’s an XML IDL for RPC • Therefore ill-suited for Internet scale Photo: Comedy Central –All the superfluous WS-* standards and politics • Too many dumb WS-KitchenSink standards – Not everything needs to be an OASIS standard! • Too many useful tools spent too long in standards wars – 3 transactions specs? Anyone heard of consistency??? •Toolkits hide messaging model, provide leaky abstractions over a distributed system
  • 11. SSDL Embraces Messages •WSDL is limited to request-response interactions –Can theoretically augment with BPEL for conversations –In practice tool support is limited, approach is verbose and complex •SOAP Service Description Language (SSDL) is better! –All messages are SOAP + WS-Addressing over arbitrary transports specified by URI –Metadata describes conversation state machine for 1...N services • It does what WS-Choreography does too! –Tool support: http://soya.sourceforge.net
  • 12. Why Web Services Rock My World • Good Web Services/SOA are message-oriented – TCP/IP is message-oriented and has scaled really well! – SOAP Service Description Language provides message-oriented metadata for services • WSDL must die, die, die! • Business processes tend to be message-oriented – Easy to map workflows onto • Loose coupling by default • End-to-end processing model – Defined by SOAP, not WSDL! • Composable model – You can ignore all the dumb stuff in the WS-* stack Photo: Comedy Central • Except WSDL because the toolkits embrace it
  • 13. Web Abuse Tunnelling is all a •Two lo-fi approaches to bunch of tree- hugging hippy crap! “Web” integration –URI tunnelling –POX •Both models treat HTTP as a Photo: Comedy Central transport –More or less •Yet some of the Web jihadists don’t see this •Both of these approaches overlay the Web with their own (weak) models...
  • 14. Web Tunnelling Remember: SOAP + WS-Addressing is •Web Services tunnel SOAP over HTTP transport neutral –Using the Web as a transport only –Ignoring many of the features for robustness the Web has built in •Lots of Web people doing the same! –URI tunnelling, POX approaches are the most popular styles on today’s Web But they claim to be –Worse than SOAP! “lightweight” and • Less metadata! RESTful
  • 15. URI Tunnelling Pattern •Web servers understand URIs •URIs have structure •Methods have signatures •Can match URI structure to method signature •E.g. – http://example.com/addNumbers?p1=10&p2=11 – int addNumbers(int i, int j) { return i + j; }
  • 16. URI Tunnelling Strengths •Very easy to understand •Great for simple procedure-calls •Simple to code –Do it with the servlet API, HttpListener, IHttpHandler, Rails controllers, whatever! •Interoperable –It’s just URIs!
  • 17. URI Tunnelling Weaknesses •It’s brittle RPC! •Tight coupling, no metadata –No typing or “return values” specified in the URI •Not robust – have to handle failure cases manually •No metadata support –Construct the URIs yourself, map them to the function manually •You can use GET (but also POST) –OK for functions, but contrary to the Web for functions with side-affects
  • 18. POX Pattern •Web servers understand how to process requests with bodies –Because they understand forms •And how to respond with a body –Because that’s how the Web works •POX uses XML in the HTTP request and response to move a call stack between client and server
  • 19. POX Strengths •Simplicity – just use HTTP POST and XML •Re-use existing infrastructure and libraries •Interoperable –It’s just XML and HTTP POST •Can use complex data structures –By representing them in XML
  • 20. POX Weaknesses •Client and server must collude on XML payload –Tightly coupled approach •No metadata support –Unless you’re using a POX toolkit that supports WSDL with HTTP binding (like WCF) •Does not use Web for robustness •Does not use SOAP + WS-* for robustness
  • 21. RPC is Commonplace Today •To err is human, to really mess things up you need a computer •To really, really mess things up you need a distributed system –“A Note on Distributed Computing” •Bad Web Services and Web integration have much in common –It’s RPC! –With latencies and nasty partial failure characteristics
  • 23. Web Fundamentals •To embrace the Web, we need to understand how it works –Which means understanding RFC 2616 to a degree •The Web is a distributed hypermedia model –It doesn’t try to hide that distribution from you! •Our challenge: –Figure out the mapping between our problem domain and the underlying Web platform
  • 24. Web History •Started as a distributed hypermedia platform –CERN, Berners-Lee, 1990 •Revolutionised hypermedia –Imagine emailing someone a hypermedia deck nowadays! •Architecture of the Web largely fortuitous –W3C and others have since retrofitted/captured the Web’s architectural characteristics
  • 25. The REST Architectural Style •Fielding captured his interpretation of the WWW architecture in his 2000 thesis –REpresentational State Transfer (REST) •Since then the Web community has been working on ways to make distributed systems behave more like the Web –Championed by some very vocal people!
  • 26. RESTafarians? Bob Marley Mark Baker, Photo by PanAfrican.tv Photo by Paul Downey
  • 28. Scalability •Web is truly Internet-scale –Uniform interface • HTTP defines a standard interface for all actors on the Web • Replication and caching is baked into this model – Caches have the same interface as real resources! –Stateless model • Supports horizontal scaling
  • 29. Fault Tolerant •The Web supports a stateless model –All information required to process a request must be present in that request • Sessions are still available, but must be handled in a Web- consistent manner •Statelessness also means easy replication –One Web server is replaceable with another –Easy fail-over, horizontal scaling
  • 30. Recoverable •The Web places emphasis on repeatable information retrieval –In failure cases, can safely repeat GET on resources •HTTP verbs plus rich error handling help to remove guesswork from recovery –HTTP statuses tell you what happened!
  • 31. Secure •HTTPs is a mature technology –Based on SSL for secure point-to-point information retrieval •Isn’t sympathetic to Web architecture –Can’t cache! •But $billions transacted through HTTPs everyday
  • 32. Loosely Coupled •Adding a Web site to the WWW does not affect any other existing sites •All Web actors support the same, uniform interface –Easy to plumb new caches, proxies, servers, resources, etc into the Web
  • 33. Tenets for Web-based Services •Resource-based –Rather than service-oriented •Addressability –Interesting things should have names •Statelessness –No stateful conversations with a resource •Representations –Resources can be serialised into representations •Links –Resources •Uniform Interface –No plumbing surprises!
  • 34. Resources •A resource is something “interesting” in your system •Can be anything –Spreadsheet (or one of its cells) –Blog posting –Printer –Winning lottery numbers –A transaction –Others? •Making your system Web-friendly increases its surface area –You expose many resources, rather than fewer endpoints
  • 35. Resource Representations •We deal with representations of resources –Not the resources themselves • “Pass-by-value” semantics –Representation can be in any format • Any media type •Each resource has one or more representations –Representations like JSON or XML are good for Web-based services •Each resource implements the uniform HTTP interface •Resources have names and addresses (URIs)
  • 36. Resource Architecture Consumer (Web Client) Uniform Interface (Web Server) Logical Resources Resource Representation (e.g. XML document) Physical Resources
  • 37. URIs See URI Templates later... •Resource URIs should be descriptive, predictable? –http://spreadsheet/cells/a2,a9 –http://jim.webber.name/2007/06.aspx • Convey some ideas about how the underlying resources are arranged • Can infer http://spreadsheet/cells/b0,b10 and http://jim.webber.name/2005/05.aspx for example •URIs should be opaque? –http://tinyurl.com/6 –TimBL says “opque URIs are cool” • Convey no semantics, can’t infer anything from them – Can’t introduce coupling
  • 38. URI Templates, in brief •Use URI templates to make your resource structure easy to understand – transparent! •For Amazon S3 (storage service) it’s easy: – http://s3.amazon.com/{bucket-name}/{object-name} Bucket1 Bucket2 Object2 Object1 Object1 Object3 Object2
  • 39. URI Templates in Action •Once you can reason about a URI, you can apply the standard HTTP techniques to it –Because of the uniform interface •You have metadata for each resource –OPTIONS, HEAD –Which yield permitted verbs and resource representations •Can program against this easily using Web client libraries and regular expressions
  • 40. Links •Connectedness is good in Web-based systems •Resource representations can contain other URIs –Resources contain links (or URI templates) to other resources •Links act as state transitions –Think of resources as states in a state machine –And links as state transitions •Application (conversation) state is captured in terms of these states –Server state is captured in the resources themselves, and their underlying data stores
  • 41. The HTTP Verbs Decreasing likelihood of being understood by •Retrieve a representation of a resource: GET •Get metadata about an existing resource: HEAD •Create a new resource: PUT to a new URI, a Web server today a Web server today or POST to an existing URI •Modify an existing resource: PUT to an existing URI •Delete an existing resource: DELETE •See which of the verbs the resource understands: OPTIONS
  • 42. GET Semantics •GET retrieves the representation of a resource •Should be idempotent –Shared understanding of GET semantics –Don’t violate that understanding!
  • 43. POST Semantics •POST creates a new resource •But the server decides on that resource’s URI •Common human Web example: posting to a blog –Server decides URI of posting and any comments made on that post •Programmatic Web example: creating a new employee record –And subsequently adding to it
  • 44. POST Request POST / HTTP/1.1 Verb, path, and HTTP version Content-Type: text/xml Host: localhost:8888 Content-Length: .... Content type (XML) Connection: Keep-Alive <buy> <symbol>ABCD</symbol> Content (again XML) <price>27.39</price> </buy>
  • 45. POST Response 201 CREATED Location: /orders/jwebber/ABCD/2007-07- 08-13-50-53
  • 46. PUT Semantics •PUT creates a new resource but the client decides on the URI –Providing the server logic allows it •Also used to update existing resources by overwriting them in-place •Don’t use POST here –Because PUT is idempotent!
  • 47. PUT Request PUT /orders/jwebber/ABCD/2007-07-08-13-50-53 HTTP/1.1 Content-Type: text/xml Host: localhost:8888 Content-Length: .... Verb, path and HTTP Connection: Keep-Alive version <buy> Updated content <symbol>ABCD</symbol> (higher buy price) <price>27.44</price> </buy>
  • 48. PUT Response 200 OK Location: /orders/jwebber/ABCD/2007-07-080-13:50:53 Content-Type: application/xml <nyse:priceUpdated .../> Minimalist response might contain only status and location
  • 49. This is important for DELETE Semantics decoupling implementation details from resources •Stop the resource from being accessible –Logical delete, not necessarily physical •Request DELETE /user/jwebber HTTP 1.1 Host: example.org •Response 200 OK Content-Type: application/xml <admin:userDeleted> jwebber </admin:userDeleted>
  • 50. HEAD Semantics •HEAD is like GET, except it only retrieves metadata •Request HEAD /user/jwebber HTTP 1.1 Host: example.org Useful for caching, •Response performance 200 OK Content-Type: application/xml Last-Modified: 2007-07-08T15:00:34Z ETag: aabd653b-65d0-74da-bc63-4bca- ba3ef3f50432
  • 51. OPTIONS Semantics •Asks which methods are supported by a resource –Easy to spot read-only resources for example •Request OPTIONS /user/jwebber HTTP 1.1 Host: example.org •Response You can only read and add 200 OK to this resource Allowed: GET,HEAD,POST
  • 52. HTTP Status Codes •The HTTP status codes provide metadata about the state of resources •They are part of what makes the Web a rich platform for building distributed systems •They cover five broad categories –1xx - Metadata –2xx – Everything’s fine –3xx – Redirection –4xx – Client did something wrong –5xx – Server did a bad thing •There are a handful of these codes that we need to know in more detail
  • 53. Common Status Codes •100 – Continue •400 – Bad Request •200 – OK •401 – Unauthorised •201 – Created •403 – Forbidden •301 – Moved •404 – Not Found Permanently •405 – Method Not •303 – See Other Allowed •304 – Not Modified •500 – Internal Server Error
  • 54. HTTP Headers •Headers provide metadata to assist processing –Identify resource representation format (media type), length of payload, supported verbs, etc •HTTP defines a wealth of these –And like status codes they are our building blocks for robust service implementations
  • 55. Some Useful Headers •Authorization •If-Modified-Since/Last- –Contains credentials (basic, Modified digest, WSSE, etc) –Used for conditional GET –Extensible too •Content-Type •Location –The resource –Used to flag the location of representation form a created/moved resource • E.g. application/xml, –In combination with: application/xhtml+xml • 201 Created, 301 Moved •ETag/If-None-Match Permanently, 302 Found, 307 Temporary Redirect, –Opaque identifier – think 300 Multiple Choices, 303 “checksum” for resource See Other representations •WWW-Authenticate –Used for conditional GET –Used with 401 status • Tells client what authentication is needed
  • 56. We have a comprehensive model for distributed computing… … but we still need a way of programming it.
  • 57. Describing Contracts with Links •The value of the Web is its “linked-ness” –Links on a Web page constitute a contract/API for page traversals •The same is true of the programmatic Web •Use Links to describe state transitions in programmatic Web services –By navigating resources (aka application state)
  • 58. Links as APIs <confirm xmlns=quot;...quot;> •Following a link causes <link rel=quot;paymentquot; href=quot;https://payquot; an action to occur type=quot;application/xmlquot;/> •This is the start of a <link rel=quot;postponequot; href=quot;https://wishlistquot; state machine! type=quot;application/xmlquot;/> •Links lead to other </confirm> resources which also have links •Can make this stronger with semantics –Microformats
  • 59. Links are State Transitions
  • 60. Microformats •Microformats are an example of little “s” semantics •Innovation at the edges of the Web –Not by some central design authority (e.g. W3C) •Started by embedding machine-processable elements in Web pages –E.g. Calendar information, contact information, etc –Using existing HTML features like class, rel, etc
  • 61. Microformats and Resources •Use Microformats to structure resources where formats exist –I.e. Use hCard for contacts, hCalendar for data •Create your own formats (sparingly) in other places –Annotating links is a good start –<link rel=quot;withdraw.cashquot; .../> –<link rel=quot;service.postquot; type=quot;application/x.atom+xmlquot; href=quot;{post- uri}quot; title=quot;some titlequot;> •The rel attribute describes the semantics of the referred resource
  • 62. “Subjunctive Programming” •With changing contracts embedded as part of a resource, we can’t be too imperative anymore •Think “subjunctive” •Code for Web integration by thinking “what if” rather than “if then” –The Web is declarative!
  • 63. We have a framework! •The Web gives us a processing and metadata model –Verbs and status codes –Headers •Gives us metadata contracts or Web “APIs” –URI Templates –Links •Strengthened with semantics –Little “s”
  • 64. Workflow •How does a typical enterprise workflow look when it’s implemented in a Web-friendly way? •Let’s take Starbuck’s as an example, the happy path is: –Make selection • Add any specialities –Pay –Wait for a while –Collect drink
  • 65. Workflow and MOM •With Web Services we exchange messages with the service •Resource state is hidden Order Drink from view •Conversation state is all Add Specialities we know –Advertise it with SSDL, Order Confirmation BPEL •Uniform interface, roles Pay defined by SOAP –No “operations” Coffee!
  • 66. Web-friendly Workflow •What happens if workflow stages are modelled as resources? •And state transitions are modelled as hyperlinks or URI templates? •And events modelled by traversing links and changing resource states? •Answer: we get Web-friendly workflow –With all the quality of service provided by the Web
  • 67. Placing an Order •Place your order by POSTing it to a well-known URI – http://example.starbucks.com/order Starbuck’s Service Client
  • 68. Placing an Order: On the Wire •Request POST /order HTTP 1.1 •Response Host: starbucks.example.com 201 Created Content-Type: application/xml Location: http://starbucks.example.com/o Content-Length: ... rder?1234 Content-Type: application/xml <order xmlns=quot;urn:starbucksquot;> Content-Length: ... <drink>latte</drink> </order> <order xmlns=quot;urn:starbucksquot;> <drink>latte</drink> <link rel=quot;paymentquot; If we have a (private) href=quot;https://starbucks.exampl A link! Is this the microformat, this can e.com/payment/order?1234quot; start of an API? become a neat API! type=quot;application/xmlquot;/> </order>
  • 69. Whoops! A mistake •I like my coffee to taste like coffee! •I need another shot of espresso –What are my OPTIONS? Request Response OPTIONS /order?1234 HTTP 1.1 Allow: GET, PUT Host: starbucks.example.com Phew! I can update my order
  • 70. Look Before You Leap •See if the resource has changed since you submitted your order –If you’re fast your drink hasn’t been prepared yet Request Response PUT /order?1234 HTTP 1.1 200 OK Host: starbucks.example.com I can still PUT this Expect: 100-Continue resource, for now
  • 71. Amending an Order •Add specialities to you order via PUT –Starbucks needs 2 shots! Starbuck’s Service Client
  • 72. Amending an Order: On the Wire •Request •Response PUT /order?1234 HTTP 1.1 200 OK Host: starbucks.example.com Location: Content-Type: application/xml http://starbucks.example.com/ord Content-Length: ... er?1234 Content-Type: application/xml <order xmlns=quot;urn:starbucksquot;> Content-Length: ... <drink>latte</drink> <additions>shot</additions> <order xmlns=quot;urn:starbucksquot;> <link rel=quot;paymentquot; <drink>latte</drink> href=quot;https://starbucks.example. <additions>shot</additions> com/payment/order?1234quot; <link rel=quot;paymentquot; type=quot;application/xmlquot;/> href=quot;https://starbucks.example. </order> com/payment/order?1234quot; type=quot;application/xmlquot;/> </order>
  • 73. Statelessness •Remember interactions with resources are stateless •The resource “forgets” about you while you’re not directly interacting with it •Which means race conditions are possible •Use If-Unmodified-Since to make sure •You’ll get a 412 – Precondition Failed if you lost the race –But you’ll avoid potentially putting the resource into some inconsistent state
  • 74. Warning: Don’t be Slow! •Can only make changes until someone actually makes your drink –Resources can change without your intervention Request Response PUT /order?1234 HTTP 1.1 409 - Conflict Host: starbucks.example.com ... Too slow! Someone else has changed the state of my order Request Response OPTIONS /order?1234 HTTP 1.1 Allow: GET Host: starbucks.example.com
  • 75. Order Confirmation •Check your order status by GETing it Starbuck’s Service Client
  • 76. Order Confirmation: On the Wire •Request •Response GET /order?1234 HTTP 1.1 200 OK Host: starbucks.example.com Location: Content-Type: application/xml http://starbucks.example.com/order Content-Length: ... ?1234 Content-Type: application/xml Content-Length: ... <order xmlns=quot;urn:starbucksquot;> <drink>latte</drink> <additions>shot</additions> <link rel=quot;paymentquot; href=quot;https://starbucks.example.co Are they trying to tell me m/order?1234quot; type=quot;application/xmlquot;/> something? </order>
  • 77. Order Payment •POST your payment to the order resource https://starbucks.example.com/order?1234 Starbuck’s Service Client New resource! https://starbucks.example.com/payment/order?1234
  • 78. How did I know to POST? •The client knew the URI to POST to from the link •Verified with OPTIONS –Just in case you were in any doubt ☺ Request Response OPTIONS /order?1234 HTTP 1.1 Allow: GET, POST Host: starbucks.example.com
  • 79. Order Payment: On the Wire •Request •Response POST /order?1234 HTTP 1.1 201 Created Host: starbucks.example.com Location: Content-Type: application/xml https://starbucks.example.com/pa Content-Length: ... yment/order?1234 Content-Type: application/xml <payment xmlns=quot;urn:starbucksquot;> Content-Length: ... <cardNo>123456789</cardNo> <expires>07/07</expires> <name>John Citizen</name> <payment xmlns=quot;urn:starbucksquot;> <amount>4.00</amount> <cardNo>123456789</cardNo> </payment> <expires>07/07</expires> <name>John Citizen</name> <amount>4.00</amount> </payment>
  • 80. Check that you’ve paid •Request •Response GET /order?1234 HTTP 1.1 200 OK Host: starbucks.example.com Content-Type: application/xml Content-Type: application/xml Content-Length: ... Content-Length: ... My “API” has changed, <order xmlns=quot;urn:starbucksquot;> because I’ve paid <drink>latte</drink> enough now <additions>shot</additions> </order>
  • 81. What Happened Behind the Scenes? •Starbucks can use the same resources! •Plus some private resources of their own –Master list of coffees to be prepared •Authenticate to provide security on some resources –E.g. only Starbuck’s are allowed to view payments
  • 82. Master Coffee List •/orders URI for all orders, only accepts GET – Anyone can use it, but it is only useful for Starbuck’s – It’s not identified in any of our public APIs anywhere, but the back-end systems know the URI Response Request 200 OK Content-Type: application/xml GET /orders HTTP 1.1 Content-Length: ... <?xml version=quot;1.0quot; ?> Host: starbucks.example.com <feed xmlns=quot;http://www.w3.org/2005/Atomquot;> <title>Coffees to make</title> <link rel=quot;alternatequot; href=quot;http://example.starbucks.com/order.atomquot;/> <updated>2007-07-10T09:18:43Z</updated> <author><name>Johnny Barrista</name></author> Atom feed! <id>urn:starkbucks:45ftis90</id> <entry> <link rel=quot;alternatequot; type=quot;application/xmlquot; href=quot;http://starbucks.example.com/order?1234quot;/> <id>urn:starbucks:a3tfpfz3</id> </entry> ... </feed>
  • 83. Payment • Only Starbucks systems can access the record of payments – Using the URI template: http://.../payment/order?{order_id} • We can use HTTP authorisation to enforce this Request Response 401 Unauthorized GET /payment/order?1234 HTTP 1.1 WWW-Authenticate: Digest Host: starbucks.example.com realm=quot;starbucks.example.comquot;, qop=quot;authquot;, nonce=quot;ab656...quot;, opaque=quot;b6a9...quot; Request Response GET /payment/order?1234 HTTP 1.1 200 OK Host: starbucks.example.com Authorization: Digest username=quot;jwquot; Content-Type: application/xml realm=quot;starbucks.example.com“ Content-Length: ... nonce=quot;...quot; uri=quot;payment/order?1234quot; <payment xmlns=quot;urn:starbucksquot;> qop=auth <cardNo>123456789</cardNo> nc=00000001 <expires>07/07</expires> cnonce=quot;...quot; <name>John Citizen</name> reponse=quot;...quot; <amount>4.00</amount> opaque=quot;...quot; </payment>
  • 84. Finally drink your coffee... Source: http://images.businessweek.com/ss/06/07/top_brands/image/starbucks.jpg
  • 85. What did we learn from Starbuck’s? •HTTP has a header/status combination for every occasion •APIs are expressed in terms of links, and links are great! –APP-esque APIs •APIs can also be constructed with URI templates and inference •XML is fine, but we could also use formats like APP, JSON or even default to XHTML as a sensible middle ground •State machines (defined by links) are important –Just as in Web Services…
  • 86. Summary •Both the Web and Web Services suffer from poor patterns and practices, awful tooling •Both platforms are about externalising state machines when done well –Conversation state machines for Web Services –Hypermedia state machines for Web •WS-* is bloated, but most of it can (should!) be safely ignored •The Web is now starting to feel the love from middleware vendors too – beware! •MEST and REST are both sensible approaches
  • 87. Questions? Developing Web-based Services Blog: (working title) http://jim.webber.name Jim Webber Savas Parastatidis Ian Robinson Coming 2008…