Re: Re: REST is Kafkarchitecture
Stan Dyck <[email protected]>
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <[email protected]> |
On 04/23/2013 09:30 AM, Will Hartung wrote: > On Mon, Apr 22, 2013 at 7:06 PM, Erik Wilde <[email protected] <mailto:dret%40berkeley.edu>> wrote: > > > thanks for bringing up that example. i have decided for a while now that > > traditional (pre-electronic) forms-based business processes are *the* > > perfect example to explain everything there is to explain about REST. > > Oh, I agree about the analogy, though I haven't put enough thought in > to a REST idiom that doesn't fit. > > However, I have another example to share. > I love this line of thinking. I confess I spend a lot of time thinking up these kind of examples. This is about the only place where I don't feel weird admitting that. Can I submit my favorite example? Pretty much every (perhaps every?) interaction you have at the airport can be considered to be part of a huge RESTful system. Furthermore, it implements a lot of things people have trouble with wrt REST. Authentication, authorization and transaction ordering for example. Some interactions are idempotent (e.g. getting a boarding pass), some are not (e.g. boarding a plane). The back end processes (i.e. airport/airline/security people) may use stateful systems for various reasons, but you (the client) don't generally need any knowledge of them. Baggage checking is kind of fun to think about. You make a POST-like request to a particular address (the airline counter) submitting your luggage and receive in return a ticket that is a kind of resource representation of your bags. At the other end of your flight you use that ticket to do a GET-like request to a different address (baggage carousel) to retrieve those bags. If the carousel doesn't return your baggage, you get redirected to a desk where you submit the same ticket to someone who will (hopefully) locate the resource. There are lots more examples you can come up with the next time you're looking for something to do while sitting in an airport. StanD.