Potential of AI (Generative AI) in Business: Learnings and Insights
REST in ( a mobile ) peace @ WHYMCA 05-21-2011
1. REST
in (a mobile) peace
May, 21st 2011
Alessandro Nadalin
2. Agenda
Rest in a nutshell
REST antipattern
REST for the mobile world
How
HTTP cache
fault-tolerance, downtime-availability
ESI
Atom + Hypermedia controls
Why
performances
evolution cost
adaptability
3. Sorry for the ugly slide.
There will be others.
Really sorry.
15. REST in a nutshell:
When dealing with safe methods,
the response should be able to tell the client,
or whatever stands behind the request,
how to cache it.
18. Uniform interface
hierarchic resource identification
Verbs to perform operations
manipulation through representation
HATEOAS
19. Richardson maturity model
hierarchic resource identification
Verbs to perform operations
manipulation through representation
HATEOAS
Really well explained by Fowler: http://martinfowler.
com/articles/richardsonMaturityModel.html#level0
20. Richardson maturity model
mess
hierarchic resource identification
Verbs to perform operations
HATEOAS
21. Richardson maturity model
0. mess
hierarchic resource identification
Verbs to perform operations
HATEOAS
33. Uniform interface is interesting.
Everyone seem to have its own RESTful "service".
But no one seem to entirely implement a uniform interface.
34. Uniform interface is interesting.
Everyone seem to have its own RESTful "service".
But no one seem to entirely implement a uniform interface.
That means... ...?
54. RESTful clients should
be driven by service's
hypermedia controls
Roy Fielding : http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
126. GET / HTTP/1.1
Host: www.example.com
Last-Modified: Tue, 15 Jan 2011 12:00:00 GMT
127. GET / HTTP/1.1
Host: www.example.com
Last-Modified: Tue, 15 Jan 2011 12:00:00 GMT
tell the client about the latest change
128. Conditional requests
GET / HTTP/1.1
Host: www.example.com
If-Modified-Since: Tue, 15 Jan 2011 12:00:00 GMT
the client asks you if it has been modified since the last time
133. The web is not meant for invalidating data.
Server should not be able to keep clients' state, otherwise they
wont scale well.
That's why long-polling and endless connections haven't had
big success dealing with caching.
135. HTTP's cache fails when dealing with really dynamic pages,
because consumers will always have to hit the origin server,
although a part of the page would be cacheable ( header and
footer, for example )
139. Edge Side Includes
A de facto standard for bla bla bla...
Server side includes ( not SSI! ) usually handled by the
architecture's ESI processor.
http://www.w3.org/TR/esi-lang
http://www.w3.org/TR/edge-arch
176. Like it or not,
XML is a friend of the
non BC-breaking evolution
http://www.slideshare.net/Wombert/xml-versus-the-new-kids-on-the-block-phpbnl11-20110129
http://www.odino.org/320/long-live-xml-too-sorry-for-json-fanboyz
190. "REST is software design on the scale of decades: every detail is intended to promote
software longevity and independent evolution. Many of the constraints are directly
opposed to short-term efficiency. Unfortunately, people are fairly good at short-term
design, and usually awful at long-term design. "
Roy Fielding