InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

HATEOAS as an engine for domain specific protocol-description

Posted by Dilip Krishnan on Jun 04, 2009

Sections
Architecture & Design,
Enterprise Architecture
Topics
WOA ,
REST ,
SOA
Tags
WS-BPEL ,
WADL ,
HATEOAS

Explaining HATEOAS is notoriously tricky, In an effort to make it easier, Nick Gall explores the idea of describing it as an engine for domain specific protocol-description. Traditionally According to him HATEOAS is described by

... highlighting that HATEOAS requires that each server response must contain not only the requested data — but also control information (in the forms of specially tagged URLs) describing the next set of permitted interactions with the server. It is this additional control information (at a bare minimum just some links to more data) that turns mere media into hypermedia.

Nick explained how he views web interfaces (and consequently RESTful interfaces) in terms of Identifiers (Uri), Formats (HTML), and Protocols (HTTP) (IF and P). According to him, though its true that RESTful applications using HATEOAS can be thought of as the sum of the three components (IF and P). Thinking of hypermedia as a domain specific protocol description might be more appropriate when it comes to understanding it. He points to Jim Webber’s “Restbucks” example/presentation in which he describes using hypermedia for protocol description.

At first this might seem counterintuitive, since I said that HTTP is the Protocol and HTML is the Format in the WWW. But URLs, HTML, and HTTP are just generic description languages for describing domain-specific identifiers, formats, and protocols. Thus, think of a web of specific HTML pages as a domain-specific protocol.

The comparison this idea of “Hypermedia describes Protocols” to the WS-BPEL 1.1 spec or WADL is inevitable. He says 

The fundamental difference is that WS-BPEL is based on the concept of providing an entire static protocol description up front once and for all — and providing it out of band. But HATEOAS is based on the notion of progressive description I guess another good term might be JIT Protocol Description (Just In Time). […] I can say "each server response progressively self-describes the current protocol."

The just-in-time protocol description has its advantages and disadvantages over upfront descriptions and they lie in the tooling support and discoverability of these interfaces. Is “Hypermedia describes Protocols” the new way to think about the notion of HATEOAS, and does it make it easier to understand?

  • This article is part of a featured topic series on SOA
A Better Description? by Ryan Riley Posted
HATEOAS is architectural style concept by Lee Wayne Posted
Horrible acronymn by Steve Macdonald Posted
  1. Back to top

    A Better Description?

    by Ryan Riley

    I'm not sure that "Hypermedia describes Protocols" is a much better term. Now you just introduce potential confusion on the definiton of protocols instead of state. "Hypermedia Just-in-time Workflows" or "Hypermedia State Machines" would probably be a better description.

  2. Back to top

    HATEOAS is architectural style concept

    by Lee Wayne

    Note that HATEOAS belongs to architectural style domain as REST. To me, domain specific architecture will definitely require some out-of-band info / prior knowledge / domain know-how to work, where HATEOAS/REST may fit in or not.

    BTW: slides I wrote myself to explain Why HATEOAS

  3. Back to top

    Horrible acronymn

    by Steve Macdonald

    HATEOAS remains one of the most awkward and ugly acronyms in any technical field. No wonder the concept behind it has trouble getting traction.

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.