Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Christopher Stawarz
On May 7, 2008, at 10:59 PM, Christopher Stawarz wrote: However, the problem remains that, even though an asynchronous server can implement the write() callable and wsgi.input as required by the WSGI spec, they effectively can't be used by applications, since they involve potentially blocki

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Christopher Stawarz
On May 7, 2008, at 5:36 PM, Ionel Maries Cristian wrote: The way I see it asynchronous wsgi is just a matter of deciding how to handle the input asynchronously - a asynchronous input wsgi extension specification. Another crucial element is the ability to perform non-blocking I/O on other

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Ionel Maries Cristian
On Wed, May 7, 2008 at 10:00 PM, Christopher Stawarz < [EMAIL PROTECTED]> wrote: > On May 6, 2008, at 8:51 PM, Ionel Maries Cristian wrote: > > > - there is no support for chunked input - that would require having > > support for readline in the first place, > > > Why is readline a requirement fo

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Christopher Stawarz
On May 7, 2008, at 3:35 PM, Duncan McGreggor wrote: It's my understanding that greenlets are python, not C. Are you thinking of tasklets in stackless? The version for CPython is a C extension module. Have a look at the comments in http://svn.red-bean.com/bob/greenlet/trunk/greenlet.c

Re: [Web-SIG] WSGI and greenlets

2008-05-07 Thread Christopher Stawarz
On May 7, 2008, at 4:44 AM, Manlio Perillo wrote: Moreover I don't see any readons to have a revc method instead of read. I just wanted to emphasize that its behavior is socket-like, not file- like. It could be called read as long as its behavior is made clear to application developers.

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Duncan McGreggor
On Wed, 2008-05-07 at 14:00 -0400, Christopher Stawarz wrote: > On May 7, 2008, at 4:20 AM, Graham Dumpleton wrote: > > > 2008/5/7 Manlio Perillo <[EMAIL PROTECTED]>: > >> With your solution it seems that writing middlewares will not > >> became more > >> easy. > > > > Part of what I was trying

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Christopher Stawarz
On May 6, 2008, at 8:51 PM, Ionel Maries Cristian wrote: - there is no support for chunked input - that would require having support for readline in the first place, Why is readline a requirement for chunked input? Each chunk specifies its size, and the application receiving a chunk just k

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Manlio Perillo
Christopher Stawarz ha scritto: On May 7, 2008, at 4:20 AM, Graham Dumpleton wrote: 2008/5/7 Manlio Perillo <[EMAIL PROTECTED]>: With your solution it seems that writing middlewares will not became more easy. Part of what I was trying to say was that this needn't be exposed to middlewares,

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Christopher Stawarz
On May 7, 2008, at 4:20 AM, Graham Dumpleton wrote: 2008/5/7 Manlio Perillo <[EMAIL PROTECTED]>: With your solution it seems that writing middlewares will not became more easy. Part of what I was trying to say was that this needn't be exposed to middlewares, unless it has to be. It was effe

Re: [Web-SIG] WSGI and greenlets

2008-05-07 Thread Manlio Perillo
Manlio Perillo ha scritto: [...] The main problem I see with greenlet is that is is not yet stable (there are some problems with the garbage collector) and that is is not part of CPython. This means that it can be not acceptable to write a PEP for a WSGI like interface with coroutine support

[Web-SIG] WSGI and greenlets

2008-05-07 Thread Manlio Perillo
Christopher Stawarz ha scritto: On May 6, 2008, at 6:17 AM, Manlio Perillo wrote: I'm glad to know that there are some other people interested in asynchronous application, do you have seen my extensions to WSGI in my module for Nginx? Yes, I have, and I had your module in mind as a potential

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Graham Dumpleton
2008/5/7 Manlio Perillo <[EMAIL PROTECTED]>: > Graham Dumpleton ha scritto: > > > > > 2008/5/7 Christopher Stawarz <[EMAIL PROTECTED]>: > > > > > On May 5, 2008, at 10:08 PM, Graham Dumpleton wrote: > > > > > > > > > > > > > If write() isn't to be returned by start_response(), then do away with > >

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Manlio Perillo
Ionel Maries Cristian ha scritto: This is a very interesting initiative. However there are few problems: - there is no support for chunked input - that would require having support for readline in the first place, also, it should be the gateway's business decoding the chunked input. Unfortu

Re: [Web-SIG] Proposal for asynchronous WSGI variant

2008-05-07 Thread Manlio Perillo
Graham Dumpleton ha scritto: 2008/5/7 Christopher Stawarz <[EMAIL PROTECTED]>: On May 5, 2008, at 10:08 PM, Graham Dumpleton wrote: If write() isn't to be returned by start_response(), then do away with start_response() if possible as per discussions for WSGI 2.0. I think start_response() i