Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-20 Thread Paul Winkler
On Tue, Dec 20, 2005 at 10:48:24AM -0200, Sidnei da Silva wrote: > On Tue, Dec 20, 2005 at 07:33:13AM -0500, Jim Fulton wrote: > | I'd really like us to think about how we *want* this to work in Zope (2 and > | 3). > | > | I'm uncomfortable with the subtle cues that seem to change the behavior of

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-20 Thread Sidnei da Silva
On Tue, Dec 20, 2005 at 09:52:09AM -0500, Jim Fulton wrote: | >One thing that I had in mind for long-running streaming output is that | >99% of the time it just needs a constant, read-only view of the | >database at the time the streaming started so instead of using a | >connection from the zodb co

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-20 Thread Jim Fulton
Sidnei da Silva wrote: On Tue, Dec 20, 2005 at 07:33:13AM -0500, Jim Fulton wrote: | >There are a couple conditions that must be met for 'chunked' to work | >with Zope 2. | > | >1. A Content-Length header must not be set. | >2. The request must be HTTP 1.1 | >3. You must be streaming | >4. No 'Co

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-20 Thread Sidnei da Silva
On Tue, Dec 20, 2005 at 07:33:13AM -0500, Jim Fulton wrote: | >There are a couple conditions that must be met for 'chunked' to work | >with Zope 2. | > | >1. A Content-Length header must not be set. | >2. The request must be HTTP 1.1 | >3. You must be streaming | >4. No 'Connection: close' header h

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-20 Thread Jim Fulton
Sidnei da Silva wrote: On Mon, Dec 05, 2005 at 01:24:54PM -0500, Paul Winkler wrote: | On Mon, Dec 05, 2005 at 11:13:31AM -0500, Jim Fulton wrote: | > BTW, your implementation also doesn't work because it doesn't | > set the content length. | | Speaking of which, I'd love to see a way to make th

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Paul Winkler
On Tue, Dec 06, 2005 at 12:01:37PM -0200, Sidnei da Silva wrote: > On Tue, Dec 06, 2005 at 08:55:56AM -0500, Jim Fulton wrote: > | Interesting. I wasn't aware of this in Z2. Zope 3 definately > | doesn't have this. Sindnei, have you verified that this actially > | works in Z2? I didn't think th

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Christian Theune
Hi, Am Dienstag, den 06.12.2005, 09:30 -0500 schrieb Jim Fulton: > > I'd > > be good to do it via a temporary file and pass that back either via > > adaption or wrapping it into an IResult-thingy. > > Yes. > > > Now I wonder whether I _do_ have to provide the headers which are set > > automatic

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Christian Theune
Am Dienstag, den 06.12.2005, 12:01 -0200 schrieb Sidnei da Silva: > On Tue, Dec 06, 2005 at 08:55:56AM -0500, Jim Fulton wrote: > | Interesting. I wasn't aware of this in Z2. Zope 3 definately > | doesn't have this. Sindnei, have you verified that this actially > | works in Z2? I didn't think t

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Jim Fulton
Christian Theune wrote: Hi, Am Montag, den 05.12.2005, 11:13 -0500 schrieb Jim Fulton: For A, you want to compute that data and then leave application code. You don't want to stay in the application, holding application resources, like database connections, while the data is being consumed.

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Jim Fulton
Philipp von Weitershausen wrote: Jim Fulton wrote: There are a number of reasons we needed IResult: - We want to be able to adapt existing output, especially string output and we needed an interface to adapt to. I see. I presume this is for the reason you state below, namely to be able to

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Sidnei da Silva
On Tue, Dec 06, 2005 at 08:55:56AM -0500, Jim Fulton wrote: | Interesting. I wasn't aware of this in Z2. Zope 3 definately | doesn't have this. Sindnei, have you verified that this actially | works in Z2? I didn't think the Zope 2 publisher actually started | propducing output until the request

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Jim Fulton
Interesting. I wasn't aware of this in Z2. Zope 3 definately doesn't have this. Sindnei, have you verified that this actially works in Z2? I didn't think the Zope 2 publisher actually started propducing output until the request was finished. Jim Paul Winkler wrote: On Mon, Dec 05, 2005 at 0

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-06 Thread Christian Theune
Hi, Am Montag, den 05.12.2005, 11:13 -0500 schrieb Jim Fulton: > For A, you want to compute that data and then leave > application code. You don't want to stay in the > application, holding application resources, like database > connections, while the data is being consumed. In this case, > you

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Philipp von Weitershausen
Jim Fulton wrote: > There are a number of reasons we needed IResult: > > - We want to be able to adapt existing output, especially >string output and we needed an interface to adapt to. I see. I presume this is for the reason you state below, namely to be able to customize the setting of the

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Sidnei da Silva
On Mon, Dec 05, 2005 at 01:58:21PM -0500, Paul Winkler wrote: | On Mon, Dec 05, 2005 at 04:31:03PM -0200, Sidnei da Silva wrote: | > There are a couple conditions that must be met for 'chunked' to work | > with Zope 2. | | Cool. Does Z3 behave the same way? Dunno. | > 1. A Content-Length header

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Paul Winkler
On Mon, Dec 05, 2005 at 04:31:03PM -0200, Sidnei da Silva wrote: > There are a couple conditions that must be met for 'chunked' to work > with Zope 2. Cool. Does Z3 behave the same way? > 1. A Content-Length header must not be set. > 2. The request must be HTTP 1.1 > 3. You must be streaming > 4

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Sidnei da Silva
On Mon, Dec 05, 2005 at 01:24:54PM -0500, Paul Winkler wrote: | On Mon, Dec 05, 2005 at 11:13:31AM -0500, Jim Fulton wrote: | > BTW, your implementation also doesn't work because it doesn't | > set the content length. | | Speaking of which, I'd love to see a way to make this work for | situations

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Paul Winkler
On Mon, Dec 05, 2005 at 11:13:31AM -0500, Jim Fulton wrote: > BTW, your implementation also doesn't work because it doesn't > set the content length. Speaking of which, I'd love to see a way to make this work for situations where you can't precompute a correct content length because e.g. you're bu

Re: [Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Jim Fulton
Philipp von Weitershausen wrote: Hi there, while pondering on http://www.zope.org/Collectors/Zope3-dev/480, I came across an overcomplication of the Zope 3 publishing API: Status quo -- In order to stream large data over an HTTP connection, a view method may, instead of simply returni

[Zope3-dev] RFC: Make HTTP streaming of large data simpler

2005-12-05 Thread Philipp von Weitershausen
Hi there, while pondering on http://www.zope.org/Collectors/Zope3-dev/480, I came across an overcomplication of the Zope 3 publishing API: Status quo -- In order to stream large data over an HTTP connection, a view method may, instead of simply returning data, set an IResult object on t