JAOO, REST and a Fine Cup of Coffee

October 3rd, 2008  |  Published in Events, REST by Ian Robinson  |  9 Comments

JAOO Aarhus 2008

I’ve just come back from JAOO Aarhus 2008, where I was presenting on “RESTful Enterprise Development” in Stefan Tilkov’s REST track. An anodyne title, I know, but in reality a straightforward case study illustrating how Atom and AtomPub are being used to implement an event-driven, business-service-oriented solution for a large entertainment and communications company. You can catch the talk again at the London Enterprise Web Conference in October and at QCon in San Francisco in November.

The other two speakers in the track, Stefan Tilkov and Arjen Poutsma, nicely advanced the conversation beyond the usual REST 101: Stefan with a concise, highly illustrative set of REST patterns and anti-patterns; Arjen with a preview of the forthcoming REST features in Spring 3.0, including first-class support for ETag filters and an API for the much-neglected REST client. Elsewhere the conversation touched on using the links embedded in representations to advance an application protocol: again, a welcome step forward from the naive misrepresentation of REST as a chatty, CRUDish interface on top of a data store.

That said, I don’t think any of us really nailed the “hypermedia and application state” subject; which is a shame, given that the day before, Gregor Hohpe had reintroduced his “Your Coffee Shop Doesn’t Use Two-Phase Commit” article to illustrate how simple business protocols – retry, compensate, throw away – are used in real-world business activities to advance the participants towards a successful outcome. A nicely self-contained, quirky example of application state: ripe, you might think, for casting in a RESTful light.

Which is exactly what Jim Webber, Savas Parastatidis and I have done…

How to GET a Cup of Coffee

Available now on InfoQ, “How to GET a Cup of Coffee” takes Gregor’s Starbucks example and runs it through a Web-friendly (that is, RESTish) state machine. Along the way, we take a potted look at using response codes for coordination, ETags for consistency, and caching for scalability and resiliency.

I’m really proud of the article: I don’t think there’s anything else out there that really deals with the topic in this way. Take a look and let us know what you think.

9 Comments  |  Atom   RSS 2.0   Email

Responses

  1. Colin Jack says:

    October 30th, 2008 at 12:00 pm (#)

    “I was presenting on “RESTful Enterprise Development” in Stefan Tilkov’s REST track. An anodyne title, I know, but in reality a straightforward case study illustrating how Atom and AtomPub are being used to implement an event-driven, business-service-oriented solution for a large entertainment and communications company.”

    Sounds like a really interesting presentation, my main problem with REST is not with the ideas but with the lack of detail about using the ideas to solve the sorts of problems you regularly meet in enteprise development.

    Anyway I was wondering if any of the sessions are going to be recorded?

  2. iansrobinson says:

    October 30th, 2008 at 12:13 pm (#)

    Hi Colin

    The session was recorded by the JAOO folks – hopefully it’ll pop up on InfoQ sometime in the near future. There was plenty of material I didn’t get the chance to cover, and I’m rejigging the QCon talk to focus on some more real-world implementation issues.

    The InfoQ article is a teaser for a forthcoming book – tentatively titled ‘GET /Connected’ – that addresses enterprise development issues from a RESTish point of view. The working example may be a little cute and unrealistic – who’d really automate Starbucks? – but it serves as a platform to tackle a lot of the issues that Jim, Savas and I have encountered in our careers.

  3. Colin Jack says:

    October 30th, 2008 at 1:28 pm (#)

    Excellent on all counts and thanks for replying.

  4. Colin Jack says:

    November 4th, 2008 at 12:38 pm (#)

    Really enjoyed the example, added a few comments but wanted to ask when the book is to be published?

    Definitely seems like its something I’ll be adding to my reading list.

  5. iansrobinson says:

    November 5th, 2008 at 10:34 am (#)

    There’s no definitive date as yet – hopefully Q1 2009. The three of us have been all over the place the last year or so, and busy with clients and other projects, making coordinating the writing quite difficult. The same things affect thousands of authors, but they still manage to get books out, so it’s not a great excuse…

    The responses to the article have been very encouraging – and challenging – and have prompted us to write again in earnest. We’re picking up on a lot of the commentary and criticism and putting it to good use. We’re hoping to have the bulk of a first draft by the end of the year. Dates nearer the time.

    Thanks for the comments here and at InfoQ – very much appreciated.

    ian

  6. Colin Jack says:

    November 6th, 2008 at 1:26 pm (#)

    Q1, superb. Yeah I have trouble finding time to read all the books I’m interested in so writing one whilst carrying on a normal life must be a nightmare.

    Also on my comments, they were being a bit picky. I can definitely see why you used PUT to update the Order state but I’m just coming at it from a DDD background, and more recently have been trying to combine that style of thinking with SOA/messaging/REST.

    In particular what I like about SOA/messaging is that when done well they can end up being business focussed, enhancing and building upon the ubiquitous language that DDD introduces. I’ve yet to read about whether REST should be used in the same way, I can’t think why not but most examples I’ve seen have focussed purely on using REST to solve object distribution problems.

    So whilst I can see why using PUT to update an orders state is sensible I do wonder if it robs you of the chance to create an important resource (perhaps OrderUpdateRequest) that might become part of your shared language (perhaps even part of the UL inside the enterprise).

    Man that was a long comment, should just wait for the book 🙂

  7. iansrobinson says:

    November 6th, 2008 at 2:17 pm (#)

    There’s certainly a case to be made for saying that implementation options can obscure or misdirect business goals and domain representations.

    Understanding the tradeoffs we’re making is always going to be important – both in terms of an upfront decision to pursue a particular style, and the ongoing critical evaluation of an approach.

    As a point in favour of aligning REST and DDD, I’ve found that resource-oriented thinking can often help in surfacing business-meaningful things that might otherwise be neglected or go unnamed. A search result, for example, is a resource as much as it’s the result of an operation: and to a company like Google it’s an important resource – it’s a vehicle for putting revenue-generating ads in front of the user.

    As Jim’s pointed out, our approach is more Web-ish than REST-ish: putting good, Web-friendly techniques to work in service of useful business outcomes. What doesn’t necessarily come across in the article is that in our real-world work with clients we’re first and foremost domain- and capability-focused: we’ll quite clearly distinguish between what we’re trying to achieve, and the several ways of providing an appropriate solution (the how). And to that extent we’re very sensitive to the ways in which premature implementation options can obscure or confuse the domain.

    And that’s 20 minutes that could have gone into the book 🙂

    Kind regards

    ian

  8. Colin Jack says:

    November 10th, 2008 at 11:15 am (#)

    Thanks for taking the time to respond to all of my questions, been very useful and I’m glad that your book is going to tie in (as you say align) REST with other approaches that people use.

    I also agree that REST could lead to surfacing business meaningful resources, I’ve just seen no coherent discussion on that front and I hate thinking for myself! 🙂

  9. How to GET a Cup of Coffee - Jay G.'s weblog says:

    November 12th, 2008 at 3:59 pm (#)

    […] October, Jim, Savas, and Ian published a great article, “How to GET a Cup of Coffee“. In that article, the authors […]