SOAP vs REST

  • View
    5.861

  • Download
    0

Embed Size (px)

DESCRIPTION

(Check my blog @ http://www.marioalmeida.eu/ ) Comparison between SOAP and REST.

Text of SOAP vs REST

  • 1. SOAP vs RESTPresentation by Mario Almeida

2. Index What is a webservice? Services interoperability What is SOAP? What is REST? Peek at competition Characteristics Popularity Simplicity Bandwidth Security Caching State Problems Conclusion 3. What is a Webservice?"Software system designed to supportinteroperable machine-to-machine interactionover a network" - W3C 4. Services interoperability!Systems interact with the web service usingmessages sent through HTTP generally with anXML serialization. 5. What is SOAP?Simple Object Access Protocol 6. What is REST?Representational State Transfer 7. Lets take a peek on the competition! Yahoo and all its services such as Flickr anddeli.ici.ous use REST Amazon and Ebay provide both thoughAmazons internal usage is nearly all REST. Google used to provide SOAP for all theirservices, but in 2006 they deprecated infavor of REST. 8. Characteristics: SimplicityREST: Is easy to build - no toolkits required! Just figure how to create and modify the URIto access different web resources!SOAP: Requires a toolkit to form requests andparse results! Requires specific knowledge of a new XMLspecification. 9. Characteristics: Bandwidth!REST: can be short!SOAP: requires an XML wrapper around everyrequest and response once namespaces and typing are declaredcan take 10 times as many bytes as thesame message in REST. 10. Characteristics: Security!REST: easy to analyze the intent of each message by checkingthe HTTP command! Certificates and LDAP can delegate authentication andauthorization to the network layer. Secure data should never be sent as parameters in theURI.SOAP: Needs to look into SOAP envelope! Authentication and authorization in the application layer. 11. Characteristics: Caching!Caching? take advantage of all the caching infrastructure that isbuilt into the Web infrastructure. 12. Characteristics: State!Session State is Evil! (SOAP) Enormous impact on scalability and avalability. 13. Other problems? Banking transactions? ACID properties! Reliable messaging! Enterprise security features! Language support? (SOAP) Good: .NET, Java (Axis) Ok: C++ (gSOAP), PERL (SOAP::Lite) Poor: Phyton (SOAPpy, ZSI, PHP File transfers? 14. Conclusion: What purpose?How important are the ACID properties?What security measures?Scalability? Availability? 15. Conclusion: How fast?What is the Learning curve?How is the Testing?How is the Error Handling? 16. Future? SOAP has been evolving in a way that it ismore similar to REST by allowing otherHTTP commands. Hypermedia as the engine of applicationstate. Uniform interfaces Stateless communications between serversand clients. 17. References http://geeknizer.com/rest-vs-soap-using-http-choosing-the-right-webservice-protocol/ http://davidvancouvering.blogspot.com/2007/09/session-state-is-evil.html http://www.javaworld.com/javaworld/jw-03-2002/jw-0308-soap.html -caching SOAP services on client side http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven http://tomayko.com/writings/rest-to-my-wife http://www.25hoursaday.com/weblog/2005/03/17/ETech2005TripReportBuildingANewWebServiceAtGoogle.aspx 18. ImagesAll of the following images have creative common rights: http://www.flickr.com/photos/ahmadnawawi/3808452611 - stock market www.flickr.com/photos/soldiersmediacenter/4723608143 - handshake http://www.flickr.com/photos/oceanflynn/6638184545 - networks http://www.flickr.com/photos/mybloodyself/5659661793 - clock http://www.flickr.com/photos/tim_norris/2789759648 - snail http://www.flickr.com/photos/garrette/53235940/ - pc http://www.flickr.com/photos/legofenris/5410534167 - darth vader