W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > September to December 1995

Re: PUT

From: <jg@w3.org>
Date: Tue, 26 Sep 95 12:05:04 -0400
Message-Id: <9509261605.AA17782@zorch.w3.org>
To: rg@server.net
Cc: http-wg%cuckoo.hpl.hp.com@hplb.hpl.hp.com
Your option 2 is the way to go.

I'm afraid that you should face up to hairier code; clients
should be written to be cooperative to the server, or you
can/will deadlock between client and server.  It is not unique to the WWW,
but comes up anytime you have limited buffering, with any protocol.  
Using non-blocking I/O isn't particularly hard, so the amount of 
hair to implement this is minimal.  Believing a server should have to
deal with arbitrarily stupid clients that won't listen to them for arbitrary
amounts of time seems like silly systems design to me.

Whenever writing data from a client to a server, a client should check for 
WOULD_BLOCK, and read any data from the server that has arrived.  This really
isn't so hard, and comes up commonly in any system such as this.

This same sort of deadlock situation came up in the X Window System
protocol, and the library was modified to preserve this cooperative behavior.  
It wasn't all that hard; when I ran into this problem in the X library,
it took me all of an afternoon to implement a fix, as I remember.  
I can't believe it should be all that hard for you to implement, 
either on a client or a server. 
				- Jim Gettys
Received on Tuesday, 26 September 1995 09:09:23 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:31:32 EDT