[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Web Services Best Practice, summary 2


web service best practice
On Thu, Jan 10, 2002 at 11:43:02AM -0500, Roger L. Costello wrote:
>Here's a summary based upon the responses.  Thanks Mike and Len for your
>inputs.
>
>1. Stay away from using XML messaging to do fine-grained RPC.  For
>example, stay away from a service which returns the square root of a
>number.  Stay away from a service that returns a stock quote (this is
>the classic-cited example of a Web service).
>
>2. Conversely, use course-grained RPC.  XML web services usually have to
>be defined at a coarser granularity than ordinary software objects. 
>That is, use Web services that "do a lot of work, and return a lot of
>information".

Hmm.

I'm not entirely sure that I agree with these best practices, although
they are likely to be good rules of thumb.

Consider this scenario:

Online bookstore A supplies a web service that does very little: it
returns matching books, with identifying information (including unique
ID: ISBN) and price (a value local to bookstore A).

Online bookstore B provides a similar service, but requires ISBN,
returning price, availability, and shipping cost to specified
destination.

Online bookstores C, D, and E also provide services, which also vary
slightly.  The unifying point is that price and availability are
supplied in response to an ISBN query.

Online recreation area R supplies reviews of books, with links to other
related books and other interesting sorts of information.  One set of
reviews may be retrieved by several different ISBNs (same content,
different editions/formats).

Recreation area R also provides consumer reviews of various bookstores,
including A, B, D, and E.

Online portal P makes use of all these relatively fine-grained calls to
supply, via aggregation, a more extensive and interesting service: book
recommendations, with prices and reliability indications.

Note, please, that the coarser (and more useful) service is predicated
on the existence of the less-useful, finer-grained services.  Portal P
might reasonably try to set up the sorts of services supplied by
recreation area R, but it is unreasonable to expect it to be able to
obtain inventory information from six or more bookstores on its own. 
The more interesting services begin to grow out of primitive services.

(This example selected because there are interesting book finding
services already around, which don't have quite as easy a life as
simple aggregation of existing small services)

Note also that the larger service potentially feeds utility into the
smaller services--it may be that few people ever think of using
bookstore E's service (poor advertising/mindshare), but as part of the
larger recommendation service, it has better visibility (i.e., pays for
itself).

So: sometimes it makes sense to have silly-little-services that aren't
terribly exciting by themselves ... because one can foresee that they
will get aggregated.

Amy!
-- 
Amelia A. Lewis          alicorn@m...          amyzing@t...
The less I seek my source for some definitive, the closer I am to fine.
		-- Indigo Girls

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.