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"
REST WINS! FLAWLESS VICTORY!
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.
One more crippling bombshell hit the already beleaguered *BSD community when IDC confirmed that *BSD market share has dropped yet again, now down to less than a fraction of 1 percent of all servers. Coming on the heels of a recent Netcraft survey which plainly states that *BSD has lost more market share, this news serves to reinforce what we've known all along. *BSD is collapsing in complete disarray, as fittingly exemplified by failing dead last in the recent Sys Admin comprehensive networking test.
You don't need to be a Kreskin to predict *BSD's future. The hand writing is on the wall: *BSD faces a bleak future. In fact there won't be any future at all for *BSD because *BSD is dying. Things are looking very bad for *BSD. As many of us are already aware, *BSD continues to lose market share. Red ink flows like a river of blood.
FreeBSD is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time FreeBSD developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: FreeBSD is dying.
Let's keep to the facts and look at the numbers.
OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of NetBSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.
Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI who sell another troubled OS. Now BSDI is also dead, its corpse turned over to yet another charnel house.
All major surveys show that *BSD has steadily declined in market share. *BSD is very sick and its long term survival prospects are very dim. If *BSD is to survive at all it will be among OS dilettante dabblers. *BSD continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, *BSD is dead.
Fact: *BSD is dying
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)
Kathleen could almost smell the sharpness of ozone as the sudden
cacophony woke her from a glowing dreamscape. In the disturbed dream
she had been approaching a girl in diaphanous white, slowly walking
towards a raised marble dais. She'd been whispering unknown syllables,
the sounds falling rhythmically between her parted lips, passing
through heady incense, and mingling with the gentle singing voices
surrounding her. The quiet rhythms of the haunting dream melody had
shattered into a million shards, like a mirror broken from the sudden
force of a hammered fist.
She was conscious of the next strike before she had fully awakened,
its luminosity lighting her retinas through the blinds and her closed
eyelids. The subsequent crashing was immediate and close, shaking her
lungs and rattling the bed in which she lay.
She curled up, drawing the covers under her chin and softly whimpered.
She opened her eyes again, dreading the next strike, hoping that the
thunder would move away and leave her alone. She wasn't alone. His
face on the pillow beside her, softly illuminated by the dim light
from the window, was strong and relaxed in sleep. She looked at him
with envy, wondering how he could sleep through the storm and wishing
she could rejoin him in dreamscape. She reached out tentatively and
traced his cheek with one slender finger. He murmured and rolled over
at the touch, not waking.
Another strike, not as close, rumbled through the darkness. She jumped
at the flash and then again with the thunder moments later. Kathleen
swallowed, suddenly thirsty. Her heart reverberated a dull rhythm in
her ears.
Lifting the sheets damp with her perspiration, she swung her bare legs
from the bed and sat up. Another flash illuminated the room like an
eerie strobe. She cried out as the thunder washed over her, but her
small sounds were no match for the power of the storm. Her tiny cries
were the squeak of a mouse fighting the mighty roar of a wolf.
As she rose to her bare feet, the rain began to tumble to the earth,
released in a torrent of tears from the heavens above. Even through
the insulation of the attic, she could hear the staccato beat of the
rain against the shingles. She looked at the stippled ceiling above
her and silently thanked a higher power that she had a roof over her
head, and that she was warm and dry. Despite her protection from the
elements, she shivered. She hugged herself as she walked carefully out
of the room, leaving the prone man sleeping, blissfully unaware of the
storm or her distress. Her bare feet whispered across the hardwood and
down the flight of steps to the main level of the house.
She poured a tall glass of milk in the dim glow of the refrigerator
lamp. Sitting at the kitchen table in the dark, she could hear the
rain whipping into the glass of the windows. She cringed as something
heavy began to hit the house, the new beat low and dangerous.
She tightened, lowering her head to the table, her heart racing, her
stomach in knots. Tears threatened and spilled as another bolt of
light streaked across the sky, its roar carried and simultaneously
shattered by the wind.
She wanted to call for her father. Her father would protect her, stop
the storm, stop her fright, stroke her hair ever so gently until it
ended, infinitely patient with her. Her sisters had always made fun of
her, taunting her. Their voices echoed through her memory.
"Baby. Baby. Afraid of the thunder. Grow up little baby." She could
still hear their singsong voices tormenting her through the
intervening years.
Her father, long gone now, chastised the imps who couldn't possibly
understand, but it had only stopped them while in his presence.
Engulfing her small hand in his own, her father lead her to the
window, parting the curtains, showing her the storm, forcing her to
confront it, forcing her to confront herself, gently
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.