Why RESTafarians live shorter Lyntale Javazone 8. september 2010 André Wiik Seniorkonsulent Webstep AS
RESTafarian o Religious/fanatic believer in RESTful services o Web services = REST o SOA = REST / WOA Intro
REST principles o Identify resources (addressable via URIs) o Uniform Interface (GET, PUT, POST, DELETE) o Self-descriptive messages (MIME, XML Schema) o Hypermedia (links) to related resources (HATEOAS) REST constraints o Client / server o Stateless interaction (interaction state entirely on client) o Expressed cacheability o Layered system Intro
No consistent way to design RESTful applications o Parameters, collections, search Navigation and state in RESTful services can kill performance Asynchronous messaging Publish/subscribe No guaranteed delivery and/or single delivery of message High-volume and low-latency distributed messaging Distributed peer systems that might at times be disconnected RESTafarian death traps
Distributed transaction boundaries Shared resources + reservations (think mobile apps) Orchestration and service aggregation into services Restricted reusability because of HATEOAS RESTafarian death traps
RESTify DayTrader Look at the comments and discussions Amazon S3 REST API No simpler than SOAP I think: Examples / links
Use REST on simple solutions Good for CRUD – limited for business services Consider RESTful services as client-aware proxies for SOA services Consider REST-style endpoints as candidates for SOA endpoints Don't be religous/fanatic, use the tools and architectures suited for the job! "The trade-off, though, is that a uniform interface degrades efficiency, since information is transferred in a standardized form rather than one which is specific to an application's needs." - Roy Fielding in his dissertation about REST Conclusion
Questions? Slides at: webstep.no/javazone Questions