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

Re: A question about REST and transaction isolation

  • To: XML Developers List <xml-dev@l...>
  • Subject: Re: A question about REST and transaction isolation
  • From: David Megginson <dmeggin@a...>
  • Date: Sun, 08 Feb 2004 20:42:56 -0500
  • In-reply-to: <861xp5f4ov.fsf@f...>
  • References: <861xp5f4ov.fsf@f...>
  • User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1

xml isolation
K. Ari Krupnikov wrote:

> Suppose I want to build a RESTful interface to an ACID system. I want
> to allow the user to incrementally change the state of the system, but
> only "commit" the changes when he is satisfied with their sum. I
> imagine a user GETting a resource, POSTing some changes to it which
> may have side effects on other resources, GETting other resources to
> observe the side effects, and eventually committing to the changes or
> rejecting them.

If the scope of the potential side effects is small and well-defined, you 
might be able to reduce everything to a single exchange: get all of the 
potentially-affected state to the client in a single XML document (or 
collection of XML documents), allow the client to make changes locally until 
satisfied, then post the modified state back to the server.  Since 
modifications live on the client side until committed, there is no need to 
come up with any separate URL scheme.

This approach would work for, say, a movie database, where the user might 
check out a full movie description to change the director's name, then check 
the entire description in again.  It might not work so well for, say, a 
geographical database, where a modification to a shoreline may also require 
corrections to landuse data, roads and railroads, and so on, in no 
easily-predictable way.

It is entirely possibly that your project is one in the second category, but 
I wouldn't give up on the simpler approach until it were proven inadequate. 
  Stupid-and-easy usually wins: moving 50K of XML each way once can be much 
more efficient than many 100 byte transactions.


All the best,


David

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.