You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Scott Nichol <sn...@computer.org> on 2001/04/12 18:54:58 UTC

[PATCH] Allow output buffer size to be set for HTTP stream

The attached file contains changes (diff -u format) to HTTPUtils.java and
SOAPHTTPConnection.java to allow the output buffer size to be set for the HTTP stream.
The current code does not explicitly set the buffer size.  For all JDKs I have, this
means the output buffer will be 512 bytes.  When large requests are posted, the buffer
is flushed many times, creating less than optimal network I/O.  By allowing the buffer
size to be specified at the transport level, its size can be optimized on a per-call
basis if necessary.

Scott Nichol


Re: [PATCH] Allow output buffer size to be set for HTTP stream

Posted by Wouter Cloetens <wo...@mind.be>.
Oops, skimmed over the patch too quickly. :-) You're absolutely right.

bfn, Wouter

On Thu, Apr 12, 2001 at 06:52:35PM -0400, Scott Nichol wrote:
> I'm not sure I understand your comments.  The change I forwarded *does* have this
> parameter in SOAPHTTPConnection.  The static in HTTPUtils is just a default.  There is a
> setter method on SOAPHTTPConnection to allow one to set the buffer size for each
> connection.  I've used this modified code to set the buffer size for each particular
> call to a value I've determined to be optimal for each call.

Re: [PATCH] Allow output buffer size to be set for HTTP stream

Posted by Scott Nichol <sn...@computer.org>.
Wouter,

I'm not sure I understand your comments.  The change I forwarded *does* have this
parameter in SOAPHTTPConnection.  The static in HTTPUtils is just a default.  There is a
setter method on SOAPHTTPConnection to allow one to set the buffer size for each
connection.  I've used this modified code to set the buffer size for each particular
call to a value I've determined to be optimal for each call.

Anyway, I look forward to using your redesigned transport layer.  And thanks for all the
work you've done to make this wonderful SOAP implementation available to the development
community.

Scott

----- Original Message -----
From: "Wouter Cloetens" <wo...@mind.be>
To: <so...@xml.apache.org>
Sent: Thursday, April 12, 2001 5:55 PM
Subject: Re: [PATCH] Allow output buffer size to be set for HTTP stream


> Thanks Scott, that looks like a useful performance optimisation. I believe, though,
> that the correct place for this parameter is the SOAPHTTPConnection object, and
> not a static (ergo system-wide; you might want to set a large buffer size for
> sporadic large requests vs. a small buffer size for possibly simultaneous small
> requests) variable in an internal utility class.
>
> I'm currently working on a redesign of part of the transport layer. Default vs.
> instance-specific properties for transport objects might be the cleanest way
> to solve this...
>
> bfn, Wouter
>
> On Thu, Apr 12, 2001 at 12:54:58PM -0400, Scott Nichol wrote:
> > The attached file contains changes (diff -u format) to HTTPUtils.java and
> > SOAPHTTPConnection.java to allow the output buffer size to be set for the HTTP
stream.
> > The current code does not explicitly set the buffer size.  For all JDKs I have, this
> > means the output buffer will be 512 bytes.  When large requests are posted, the
buffer
> > is flushed many times, creating less than optimal network I/O.  By allowing the
buffer
> > size to be specified at the transport level, its size can be optimized on a per-call
> > basis if necessary.
>


Re: [PATCH] Allow output buffer size to be set for HTTP stream

Posted by Wouter Cloetens <wo...@mind.be>.
Thanks Scott, that looks like a useful performance optimisation. I believe, though,
that the correct place for this parameter is the SOAPHTTPConnection object, and
not a static (ergo system-wide; you might want to set a large buffer size for
sporadic large requests vs. a small buffer size for possibly simultaneous small
requests) variable in an internal utility class.

I'm currently working on a redesign of part of the transport layer. Default vs.
instance-specific properties for transport objects might be the cleanest way
to solve this...

bfn, Wouter

On Thu, Apr 12, 2001 at 12:54:58PM -0400, Scott Nichol wrote:
> The attached file contains changes (diff -u format) to HTTPUtils.java and
> SOAPHTTPConnection.java to allow the output buffer size to be set for the HTTP stream.
> The current code does not explicitly set the buffer size.  For all JDKs I have, this
> means the output buffer will be 512 bytes.  When large requests are posted, the buffer
> is flushed many times, creating less than optimal network I/O.  By allowing the buffer
> size to be specified at the transport level, its size can be optimized on a per-call
> basis if necessary.