Re: Proposal: WebDAV and transactions

Julian Reschke wrote:

> > From:
> > []On Behalf Of B. Shadgar
> > Sent: Wednesday, September 11, 2002 12:02 PM
> > To: Eric Sedlar;
> > Subject: Re: Proposal: WebDAV and transactions
> >
> > ...
> >
> > I think Batch method can help a lot in favor of transactions, But
> > I don't know
> > why still it has not been accepted as a standard method in WebDAV
> > protocol ?
> Well, make a proposal that works and let the discussion start.
> --
> <green/>bytes GmbH -- -- tel:+492512807760

A proposal for Batch method is following:

Batch Method

The Batch method is introduce to processes a bunch of methods as one
single transaction and to improve the overload of internet connection.

The request message body of a BATCH method MUST contain one-transaction
and  request-set XML elements. It is included by one or more request XML
elements. processing of request elements MUST occur in the order request
elements are received (i.e., from top to bottom). Request elements can
either all be executed or some executed which will be specified by value
of one-transaction element. If the  value is true, all of request
elements MUST be executed, thus if any error occurs during processing
all executed  requests MUST be undone and resopnse MUST return the
result of failed request. Otherwise, when the one-transaction element's
value is false, some of requests can be executed and a proper response
with 207 statuse code  MUST be prepared to shows which requested has
been done and why the others refused.

The request XML element is included by header, body and
expected-status-code elements. Header and body element contains the
header and body of given request and expected-status-code is
representing the result is expected. It can be expressed by one value or
a range of values e.g  200 <= X < 300 by xml elements.

I consider Pill's example in his proposal and try to make my mean clear:

>> Request

BATCH  /bar/  HTTP/1.1
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

<?xml version="1.0" encoding="utf-8" ?>
<D:request-set xmlns:D="DAV:">
      <D:header> The header of PUTmethod  </D:header>
      <D:body> the Body of PUT method </D:body>
      <D:expected-status-code> <or>
      <D:header> The header of PROPPATCH method  </D:header>
      <D:body> the Body of PROPPATCH method </D:body>
      <D:expected-status-code> 200 </D:expected-status-code>
      <D:header> The header of UNLOCK method  </D:header>
      <D:body> the Body of UNLOCK method </D:body>
      <D:header> The header of Delete method  </D:header>
      <D:body> the Body of Delete method </D:body>
      <D:expected-status-code> 204</D:expected-status-code>

>> Respons

HTTP/1.1  200 Ok


>> Response

HTTP/1.1 403 Forbidden
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

    <?xml version="1.0" encoding="utf-8" ?>
               <D:status>HTTP/1.1 204 No Content </D:status>
               <D:status>HTTP/1.1 200 Ok</D:status>
                 <D:status>HTTP/1.1 204 No Content </D:status>
                  <D:status>HTTP/1.1 403 Forbidden</D:status>

We can consider a bunch of delete methods when the one-transaction
element was false. In this case the format of the request and response
is the same, but the one-transaction element is set with false value,
and therefore failing some of Delete method dosn't cause to undone the
batch method. The response can inform the client which delete methods
are failed.

Does it make sence?


Received on Wednesday, 11 September 2002 08:40:47 UTC