ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
Re: [xml-dev] What Does SOAP/WS Do that A REST System Can't?
by Leigh Dodds other posts by this author
Apr 6 2005 2:50AM messages near this date
Re: [xml-dev] What Does SOAP/WS Do that A REST System Can't? | [xml-dev] Re: What Does SOAP/WS Do that A REST System Can't?
& XSLT Rich Salz wrote:

> >>You've doubled the reliability, security, and server-state load,
> >>but it is RESTian.  For many applications that won't be enough.
> >
> >Where do you get the factor of two from?
>  
>  Twice the number of HTTP messages, nothing more simple then that.

Fair enough, although not in all cases.

For the example we were discussing (searching) an application is likely
to immediately GET the url to view the results.

In *other* applications of the same message pattern, there's requirement
for the client-side application to immediately follow the Location 
header and perform a GET:

* If a new resource is being created, then a client may be sufficiently
happy that its received a redirect(*) rather than an HTTP status code.
A GET on the new URI may be redundant as it'll echo back the data I
just sent the server. So one message and a cheap response

* In other scenarios a client may choose to perform the GET in a few
minutes time, or next week. So the pattern supports asynchronous usage
which is handy. (The server may not actually carry out the original
request until the GET is issued, so this pattern can be properly 
asynchronous)

* The client may actually issue a conditional GET which results in
smaller server responses, so again it can be efficent.

So I accept that yes there are 2 messages, but there's a lot of 
variables to consider and options available. I'm not sure I see those
same options with a "POST to controller; return response" approach.

>  As for server-state, the server now has to maintain state behind
>  the GET'able URL, make sure that it's the same client coming back
>  or otherwise deal with authorization decisions, etc.

Whether its inconvenient for the server to maintain state depends on
whether the results of the POST are the creation of domain objects --
these will have their own lifetime and are likely to be maintained
anyway. So there's no real difference between the approaches there.

For the search example, keeping track of what searches a user has
performed may or may not be a significant factor for the application.

But recall that we were talking about a healthcare application. If the 
result is a single hit, i.e. I've found the relevant patient, then
the returned URL is just that of the patient (i.e. the domain objects)
so no additional state management required.

Re: authorization decisions. It's no harder to protect, say /* with
an authentication filter than /controller, so I don't see any 
difficulties there.

So the answer, as usual, is "it depends". But I thought it worth
responding as I wanted to challenge the assertion that REST message
patterns are automatically less efficient, harder to protect, etc. As
ever application design trade-offs come into play, but as I've noted
above I see more options with a REST style approach.

(*) in this thread I've kept writing 302, when in some cases I ought to 
have suggested use of 303 See Other. Apologies.

Cheers,

L.

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org> 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://www.oasis-open.org/mlmanage/index.php> 
Thread:
Claude L Bullard
Marc de Graauw
Joe Gregorio
Bill de hÓra
Michael Champion
Uche Ogbuji
Jan Algermissen
Uche Ogbuji
Rich Salz
Jan Algermissen
Rich Salz
Michael Champion
Bill de hÓra
Michael Champion
Uche Ogbuji
Bill de hÓra
Robert Koberg
Peter Hunsberger
Michael Champion
Leigh Dodds
Jan Algermissen
Leigh Dodds
Bill de hÓra
Michael Champion
Leigh Dodds
Michael Champion
Rick Marshall
Bill de hÓra
Robert Koberg
Rich Salz
Leigh Dodds
Rich Salz
Leigh Dodds
Rich Salz
Leigh Dodds
Andrzej Jan Taramina
Rich Salz
Bob Foster
Jan Algermissen
Mark Baker
Michael Champion
Michael Champion
Mark Baker
Mark Baker
Michael Champion
Bill de hÓra
Rich Salz
David Lyon
Rich Salz
Joe Gregorio
Rich Salz
Joe Gregorio
Saptagirisa N
Arvind Singh
Rich Salz
Joe Gregorio
Rich Salz
Joe Gregorio
Rich Salz
Dave Pawson
Mark Baker
Joe Gregorio
Mark Baker
Rich Salz
Michael Champion
Elliotte Rusty Harold
Joe Gregorio
Michael Champion
Jan Algermissen
Bill de hÓra
Joe Gregorio
Charles Woerner
Rich Salz

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved