Re: streaming request body

2004-02-25 Thread Ortwin Glück
John Keyes wrote: My point here is that if I have X requests then there can be X * CONTENT_LENGTH_CHUNKED bytes in memory at one time. I see what you mean. But the above calculation does not make sense: CONTENT_LENGTH_CHUNKED is a (negative) integer that signals to HttpClient that you do not

Re: streaming request body

2004-02-25 Thread John Keyes
On 25 Feb 2004, at 14:43, Ortwin Glück wrote: John Keyes wrote: My point here is that if I have X requests then there can be X * CONTENT_LENGTH_CHUNKED bytes in memory at one time. I see what you mean. But the above calculation does not make sense: CONTENT_LENGTH_CHUNKED is a (negative)

RE: streaming request body

2004-02-25 Thread Kalnichevski, Oleg
to implement based on our new preference architecture. Oleg -Original Message- From: John Keyes [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 18:54 To: Commons HttpClient Project Subject: Re: streaming request body On 25 Feb 2004, at 14:43, Ortwin Glück wrote: John Keyes

Re: streaming request body

2004-02-24 Thread John Keyes
For (a), Oleg's response is correct. You might easily be confused, in the sense that HttpClient's API inverts the control. It is not that you write to an OutputStream to send your data, it is that you provide HttpClient with an InputStream, and it reads that stream and sends the data.

Re: streaming request body

2004-02-24 Thread Stefan Dingfelder
John Keyes schrieb: For (a), Oleg's response is correct. You might easily be confused, in the sense that HttpClient's API inverts the control. It is not that you write to an OutputStream to send your data, it is that you provide HttpClient with an InputStream, and it reads that stream and

Re: streaming request body

2004-02-24 Thread Ortwin Glück
John Keyes wrote: In both cases, it is possible to get the behavior that you desire. Not it is not. Again think of XXX,000 of requests. I am getting a little angry by now. C'mon man, we wrote this baby and we know very well what's possible with it. So please don't tell us it can not do

Re: streaming request body

2004-02-24 Thread Ortwin Glück
Stefan Dingfelder wrote: I am missing something here from both views. Maybe I am wrong but as I understand it, I can provide any InputStream. And that must not be a file on disk (which I dislike also - except for large files or live streams that cannot be put to memory in total) but can be any

RE: streaming request body

2004-02-24 Thread Kalnichevski, Oleg
Project Subject: Re: streaming request body For (a), Oleg's response is correct. You might easily be confused, in the sense that HttpClient's API inverts the control. It is not that you write to an OutputStream to send your data, it is that you provide HttpClient with an InputStream

Re: streaming request body

2004-02-24 Thread Eric Johnson
John Keyes wrote: For (a), Oleg's response is correct. You might easily be confused, in the sense that HttpClient's API inverts the control. It is not that you write to an OutputStream to send your data, it is that you provide HttpClient with an InputStream, and it reads that stream and sends

Re: streaming request body

2004-02-24 Thread John Keyes
On 24 Feb 2004, at 14:36, Stefan Dingfelder wrote: John Keyes schrieb: For (a), Oleg's response is correct. You might easily be confused, in the sense that HttpClient's API inverts the control. It is not that you write to an OutputStream to send your data, it is that you provide HttpClient

Re: streaming request body

2004-02-24 Thread John Keyes
On 24 Feb 2004, at 14:39, Ortwin Glück wrote: John Keyes wrote: In both cases, it is possible to get the behavior that you desire. Not it is not. Again think of XXX,000 of requests. I am getting a little angry by now. C'mon man, we wrote this baby and we know very well what's possible with it.

Re: streaming request body

2004-02-24 Thread John Keyes
lots_snipped/ Again, comments and feedback or a patch for bug 26070 would be welcome. Okay, I'll investigate it more and see what I come up with, -John K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: streaming request body

2004-02-24 Thread Stefan Dingfelder
Ortwin Glück schrieb: Stefan Dingfelder wrote: I am missing something here from both views. Maybe I am wrong but as I understand it, I can provide any InputStream. And that must not be a file on disk (which I dislike also - except for large files or live streams that cannot be put to memory

RE: streaming request body

2004-02-24 Thread Kalnichevski, Oleg
*concurrently*? What kind of application is it, if I may ask you? Oleg -Original Message- From: John Keyes [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 24, 2004 16:59 To: Commons HttpClient Project Subject: Re: streaming request body On 24 Feb 2004, at 14:36, Stefan Dingfelder wrote: John

Re: streaming request body

2004-02-24 Thread Stefan Dingfelder
John Keyes schrieb: On 24 Feb 2004, at 14:39, Ortwin Glück wrote: John Keyes wrote: In both cases, it is possible to get the behavior that you desire. Not it is not. Again think of XXX,000 of requests. I am getting a little angry by now. C'mon man, we wrote this baby and we know very well

Re: streaming request body

2004-02-24 Thread John Keyes
to process around 70,000 requests a minute. -John K Oleg -Original Message- From: John Keyes [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 24, 2004 16:59 To: Commons HttpClient Project Subject: Re: streaming request body On 24 Feb 2004, at 14:36, Stefan Dingfelder wrote: John Keyes

RE: streaming request body

2004-02-24 Thread Kalnichevski, Oleg
Subject: Re: streaming request body On 24 Feb 2004, at 16:22, Kalnichevski, Oleg wrote: But a *segment* will be held in memory prior to writing to the output stream though. For XXX,000 requests I think this is an unreasonable memory overhead. John, Just to make sure I understand you correctly

Re: streaming request body

2004-02-23 Thread Ortwin Glück
John Keyes wrote: method.setRequestBody( ... ); client.execute( method ); So my question is, is there a way to stream the request body rather than having to store the request in memory prior to writing it on the wire. setRequestBody accepts an InputStream. You could use a piped stream to

RE: streaming request body

2004-02-23 Thread Kalnichevski, Oleg
John, HttpClient's entity enclosing methods (POST, PUT) do support content streaming when (1) the content length does not need to be automatically calculated or (2) chunk-encoding is used Please refer to the following sample applications for details Unbuffered post:

Re: streaming request body

2004-02-23 Thread John Keyes
Thanks for the information guys. -John K On 23 Feb 2004, at 13:02, Kalnichevski, Oleg wrote: John, HttpClient's entity enclosing methods (POST, PUT) do support content streaming when (1) the content length does not need to be automatically calculated or (2) chunk-encoding is used Please

Re: streaming request body

2004-02-23 Thread John Keyes
Guys, A colleague pointed out to me that this does not in fact resolve the situation. The solutions pointed out allow me to read the attachment as a stream. The contents are still held in memory prior to writing it on the wire. To fully support this you would need access to the

RE: streaming request body

2004-02-23 Thread Rezaei, Mohammad A.
Have a look here: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26070 Thanks Moh -Original Message- From: John Keyes [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 3:49 PM To: Commons HttpClient Project Subject: Re: streaming request body Guys, A colleague pointed

Re: streaming request body

2004-02-23 Thread Eric Johnson
John, Two separate questions: a) sending a large post/put request, without buffering it in memory. b) reading a large response to a request. For (a), Oleg's response is correct. You might easily be confused, in the sense that HttpClient's API inverts the control. It is not that you write to an