Communicate with a standard set of methods • Communicate with Media Types • Link your resources together • Avoid session state • Support caching * This is a very simplified version of the real REST constraints, for the real stuff read Roy Fieldings dissertation
5 – http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm Roy Fieldings blog – http://roy.gbiv.com/untangled/ Mark Hadleys blog – http://weblogs.java.net/blog/mhadley/ Mark Nottinghams blog – http://www.mnot.net Stefan Tilkovs blog – http://www.innoq.com/blog/st/
– Any server in a cluster can handle any request – The resources can safely be cached • More reliable – A client can safely re-send a request • Better resource reuse – The resources can safely be linked to
Specify max-age – Use max-age cache control header Split data according to freshness requirement Support conditional GET – Get if modified since – E-tags