Re: 'PUT' transaction reconsidered (was Re: two-phase send concerns )

> We want to find the costs of these schemes, in addition to the basic
> cost of the HTTP interaction (which might be less than 1 round-trip
> time [RTT], if persistent connections are used, or several RTTs in
> other cases).
> 
> The additional cost of a two-phase interaction is one RTT, since the
> client must pause for at least one RTT before it sees the "Continue"
> status.
> 
> The cost of a *failed* one-phase interaction (i.e., client tries
> a PUT, server says "no way" and closes the TCP connection) is a
> little harder to measure.  The entire first (aborted) connection
> is wasted, so there are at least two or possibly three RTTs involved
> in that.  I'll assume 3 RTTs, to be concrete and conservative.
> Then there is one more RTT to go through the two-phase interaction,
> which is guaranteed to result in a rejection (but the client doesn't
> yet know that)

This is interesting analysis, but doesn't apply to what I said.
RTTs are not sufficiently important for the two-phase methods for them
to be the measure of what is "best".  What is important is:

   1) reliability (which boils down to both sides eventually knowing
      what happened)

   2) not sending unwanted data over the wire (if possible).

I agree that an optimistic approach is capable of handling (1).
However, it is not capable of handling (2).

In most cases, this difference is trivial.  However, some security-related
systems consider the ability to refuse a vulnerable operation before it
occurs to be a showstopper.  Also, some networks will require the user
to pay by the amount of data sent, regardless of whether that data was
initially rejected by the server.

Given these cases exist, a pessimistic approach is "best".  This does not
mean that the 5 second delay is the best solution -- it is just a way of
forcing a real solution to be created.


 ...Roy T. Fielding
    Department of Information & Computer Science    (fielding@ics.uci.edu)
    University of California, Irvine, CA 92717-3425    fax:+1(714)824-4056
    http://www.ics.uci.edu/~fielding/

Received on Wednesday, 27 December 1995 22:38:02 UTC