Skip to content

Techniques for building hypermedia servers

Glenn Block edited this page Aug 7, 2014 · 20 revisions

Convener

Glenn Block

Attendees (Please add your name)

  • Darrell Miller
  • Mark Foster
  • Jorn Wildt

Notes

Mapping from the domain models to a media type.

When building a hypermedia system, you want to cleanly separate the business domain from what goes across the wire. This is important as it makes the code easier to maintain / extend and to test. To do this, you need a way to transition from the domain to an HTTP representation.

Here is a a pattern which is outlined in the [Designing Evolvable Web APIs] (http://chimera.labs.oreilly.com/books/1234000001708/ch07.html#_models_and_services) book.

Handling long running transactions

Dealing with async creation of resources

  • The response of an asynchronous request could return an url where consult the progress state
  • Push/Pull economy. Maybe using a bus architecture, and a pub/sub model

Implementing Caching

  • Middleware to manage ETAGs / returning cached representations
  • Expiration handled upstream per resource.
  • Cacheable portions. Not everything must be invalidated at same time. Some portions can be updated.
  • Cache based in multiple keys. Example: First key: Collection of books, Second key: Books published on July
Clone this wiki locally