Upload
aras-tarhan
View
148
Download
0
Embed Size (px)
Citation preview
EEDC Homework2 SOAP vs. REST Faik Aras Tarhan
General Idea 0 REST should be considered as the Cirst alternative while choosing between REST and SOAP.
0 If REST does not fulCill the requirements ( which is really rare), then we should come up with SOAP.
Why? 0 REST excels SOAP in terms of: 0 API Flexibility & Simplicity 0 Bandwidth Usage 0 Security 0 Performance & Scalability 0 Popularity 0 Variety of Data Formats
API Flexibility & Simplicity 0 Accessibility to a Web server via an URI
0 Service is called easily with an HTTP GET command
0 The resulting HTTP response might be simple as well
Bandwidth Usage 0 REST is lighter 0 SOAP requires an XML wrapper around every request and response
0 SOAP response could require more than 10 times as many bytes as would the same response in REST
Security 0 REST calls also go over HTTP or HTTPS like SOAP 0 With REST Cirewall can recognize the intent of each message by analyzing the HTTP command used in the request 0 For example, a GET request can always be considered safe because it can’t modify but query data
Performance & Scalability 0 Typical actions performed by REST based services include generic CRUD operations that do not require state and proxy servers can cache their response very easily. Thus, we reach: 0 Better response and loading time 0 Decreased load on the server 0 Better user experience
0 On the other hand, SOAP requests use POST and require a complex XML request to be created which makes response-‐caching difCicult
Variety of Data Formats 0 REST permits many different data formats where as SOAP only permits XML
0 SON usually is a better Cit for data and parses much faster
0 REST allows better support for browser clients due to it’s support for JSON
Popularity 0 All of the major web services on the Internet now use REST 0 All of Yahoo's web services use REST, including Flickr, del.icio.us
0 Google used to provide only SOAP for all their services, but in 2006 they deprecated in favor of REST source
0 Both eBay, and Amazon have web services for both REST and SOAP