18
SOAP vs REST Presentation by Mario Almeida

SOAP vs REST

Embed Size (px)

DESCRIPTION

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

Citation preview

Page 1: SOAP vs REST

SOAP vs RESTPresentation by Mario Almeida

Page 2: SOAP vs REST

● What is a webservice?● Services interoperability● What is SOAP?● What is REST?● Peek at competition● Characteristics

○ Popularity○ Simplicity○ Bandwidth○ Security○ Caching○ State

● Problems● Conclusion

Index

Page 3: SOAP vs REST

What is a Webservice?

"Software system designed to support interoperable machine-to-machine interaction over a network" - W3C

Page 4: SOAP vs REST

Systems interact with the web service using messages sent through HTTP generally with an XML serialization.

Services interoperability!

Page 5: SOAP vs REST

Simple Object Access Protocol

What is SOAP?

Page 6: SOAP vs REST

Representational State Transfer

What is REST?

Page 7: SOAP vs REST

● Yahoo and all its services such as Flickr and deli.ici.ous use REST

● Amazon and Ebay provide both though Amazon's internal usage is nearly all REST.

● Google used to provide SOAP for all their services, but in 2006 they deprecated in favor of REST.

Lets take a peek on the competition!

Page 8: SOAP vs REST

REST:● Is easy to build - no toolkits required!● Just figure how to create and modify the URI

to access different web resources! SOAP:● Requires a toolkit to form requests and

parse results!● Requires specific knowledge of a new XML

specification.

Characteristics: Simplicity

Page 9: SOAP vs REST

REST:● can be short! SOAP:● requires an XML wrapper around every

request and response● once namespaces and typing are declared

can take 10 times as many bytes as the same message in REST.

Characteristics: Bandwidth!

Page 10: SOAP vs REST

REST:● easy to analyze the intent of each message by checking

the HTTP command!● Certificates and LDAP can delegate authentication and

authorization to the network layer.● Secure data should never be sent as parameters in the

URI.SOAP:● Needs to look into SOAP envelope!● Authentication and authorization in the application layer.

Characteristics: Security!

Page 11: SOAP vs REST

Caching?● take advantage of all the caching infrastructure that is

built into the Web infrastructure.

Characteristics: Caching!

Page 12: SOAP vs REST

Session State is Evil! (SOAP)● Enormous impact on scalability and avalability.

Characteristics: State!

Page 13: SOAP vs REST

● 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?

Other problems?

Page 14: SOAP vs REST

Conclusion: What purpose?

How important are the ACID properties?What security measures?Scalability? Availability?

Page 15: SOAP vs REST

What is the Learning curve?How is the Testing?How is the Error Handling?

Conclusion: How fast?

Page 16: SOAP vs REST

Future?

● SOAP has been evolving in a way that it is more similar to REST by allowing other HTTP commands.

● Hypermedia as the engine of application state.

● Uniform interfaces● Stateless communications between servers

and clients.

Page 17: SOAP vs REST

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

Page 18: SOAP vs REST

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