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

Re: Identifying Data for Interchange [was: XML Components]

stock price xml
[Roger L. Costello]

Roger -

> Suppose that a client wishes to purchase 3 million shares of xyz stock.
> The client does a GET on the xyz stock resource and learns that the
> current share price is $3.156/share.  The client gets together the
> $3.156 million and then sends it to the xyz stock resource.  However, by
> the time that it does this, the stock price has jumped to $3.200/share.
> This is a big difference.  If instead, the xyz resource had just sent to
> the client the total cost ($3.156 million) then this problem would not
> have happened. (Sorry, this is a really poor example.  Can someone help
> create a more realistic example?)

I think this misses the mark because the cost could still have changed even
with the quote of $3.156 million.  But quantity could play a role because
the number of shares you want might not be offered at the one price, or
there might be a discount for quantity.  If you were interested in buying a
large block of shares instead of just getting the current price to plot on a
graph, it would make sense to ask for price and quantity together.

Turning it around to look at what a server "should" do,  if the server knows
that quantity in important, it should return that data -

GET (price of AXD)
<quote symbol='AXD' includesComission='yes'>
    <price qty='1000' currency='USD' validtime='...'>55</price>
    <price qty='1000000' currency='USD' validtime='...'>54</price>
    <!-- etc -->

Thus the server has to decide what information it wants to supply.  The
consumer has to figure out if that info is complete enough for its task.

> ...
> Perhaps the solution is to differentiate between "internal interchange
> data" and "external interchange data".  The internal interchange data is
> for a (hopefully small) circle of clients that require custom data.  The
> external interchange data is the decoupled, highly reusable data for the
> rest of the world.  Over time the clients in the internal circle should
> be pushed out to join the rest of the external clients.
> What are your thoughts on this?  /Roger

This is what I was getting at when I mentioned an "immediate consumer".  If
you know that some user - probably on your intranet - is intended to use the
data you would presumably tune it up for that use.  You might even publish
two forms, one for internal use (or the intended external user) and one for
general consumption.


Tom P


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.
First Name
Last Name
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.