REST vs. SOAP In Amazon Web Services
Amazon's web services have attracted a thriving community, people are making real money building alternate interfaces to Amazon and collecting Associates commissions on the resulting sales, and there are even tool developers who have come up with the creative business model of agreeing with their users to have some percentage of the transactions use the tool developer's Associates id rather than the site owner's. Cool.
Amazon is holding a free all day web services workshop on April 22 at the O'Reilly Emerging Technologies Conference. The event is open to people not registered at the conference (though space is limited to 50 people).
P.S. Slashdot really ought to have web services as a topic area! Despite being over-hyped, this is a really important area, and there's a lot cooking. Amazon's web services"
It is understandable that Amazon sees most people using REST. They're mostly hobbyists and amateur programmers, and REST is easier and sufficient for the very simple things that you can do via the Amazon web services api, but if one were trying to submit more information -- say a long purchase order -- the limitations of REST would be more apparent. The RPC style of SOAP is often better with REST, but for the document-exchange style, REST is inadequate.
Amazon patents the use of REST and SOAP...
134340: I am not a number. I am a free planet!
It's not cool when you want to buy an item Amazon no longer stocks and you get hundreds of hits from this community, instead of real hits. To me it's just a way of tricking Google to send more people to Amazon. How many Amazon clones do we need?
Read about the rest in Tim's weblog post.
I developed www.bitworm.com (Computer Books) using the XML over http service. I have never used SOAP, and have never seen a reason to. With their server side XSL translations, I retieve custom responses designed to conserve bandwidth/response when combined with my caching backend. I don't think I can do that with SOAP.
SOAP is just too much work in the Amazon case with little ROI. XML is just as simple when used with JDom, or another simple parser.
(Smart) people will use the right tool for the job. In this case, XMLoverHTTP is a better solution than SOAP. I am glad to see I am not the only person who thinks SOAP just isn't worth the trouble.
-Pete
Soccer Goal Plans
Having worked with Amazon for one of Amazons largest online stores I can say SOAP is very much here to stay. Although many may use RIST, the big online partners use SOAP. Or rather Amazons implimentation of SOAP. With does some funky stuff with MIME attachments.
Still, once you get it worked out the process is actually pretty smooth. All my complaints are about how they use their data, not how it's transported.
Over the weekend, I rewrote parts of my site that use Amazon data to use SOAP, with the help of nuSoap for php. It's much cleaner code now, and it just seems to work better. I originally went with REST because it's what they first offered, and I was just too lazy to update the code until now.
A quiet alternative is MIME-RPC
MIME-RPC is a protocol for applications written in different languages and on different platforms to communicate with each other using a public standards:
Notes on SOAP vs MIME-RPC:
cpeterso
The question is, does Amazon's REST take into account the Evil Bit? Remember, if you're evil we need to wash your mouth out with SOAP!
http://www.virtualvillagesquare.com/ Online Communities: The Next Generation
Geeks prefer to rest than to use soap.
I have a system that uses XML/RPC but it could have just as easily been SOAP or REST and it wouldn't make a difference. I have a data structure in Java that gets put through some helper classes, then on the server side, I have a response that feeds into a module, and I get out a data structure. So, I never actually see any XML/RPC, but I still have the advantages of the interoperability of the standard. Moral: if you're doing much with any of these protocols your code could use some more abstraction.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Whatta coincidence. My boss just complained that I rest too much and smell like I don't use soap.
I don't think the usage below can be classified as either Web Service, XML-RPC, SOAP, or REST. However, this usage comprises the majority of XML-based Ecommerce transactions I see in mainstream business these days (I work for a large office supplies company).
"The Usage"
-----------------
A business procedure (say, "place a purchase order") is executed by a simple transfer of an XML document. This XML document conforms to the standard it follows -- i.e. it is valid XML according to the standard's DTD/schema for that particular transaction.
For example, to send an XML purchase order via HTTP POST, the buyer would do the following sort of POST (HTTP protocol approximated below):Note: the content type is "text-xml". There are no CGI params -- the XML document itself comprises the body of the HTTP POST. The seller sends back a synchronous response document (same TCP connection as the POST, but reverse direction). This 'sync response' must carry an HTTP 200 response header, but can also carry an XML document (this depends on the standard).The submitter party processes this response.
Note, there are no standardised 'sections' of XML in the document (like there are with SOAP or Web-Services (unsure?) ). Also, unlike REST, there is no usage of other HTTP methods - DELETE, GET, etc -- only POST. The XML document itself specifies the procedure being carried out (a richer, and hence better, approach).
For example, to do an order cancellantion, another XML document is POST-ed.So, does this sort of usage have a name (besides the name of the business standard)? What advantages do other approaches like Web Services bring to the table?
SOAP
;-)
REST
XML-RPC
MIME-RPC
The great thing about standards is that there are so many to choose from
Seriously, though, these are all just instances of two programs exchanging text. The text is just formatted differently in each case.
People have been writing these text-transfer protocols for decades. The "benefit" of the current situation is that everybody gets to define their own standard and put a nifty name on it, then hype it around the industry to sell books.