[Zope3-dev] Zope 3 lacks Ajax capability?
Just checking if I'm missing something -- with the removal of HTTP streaming/chunking in 3.2, this means that the async bi-directional persistent socket communications associated with Ajax is NOT possible at this time? That a request/response must quickly run to completion on a thread and cannot hang on to that thread to asynchronously communicate with the client? I've been doing this in Twisted (actually Nevow's live page API) and had hoped to migrate some code over to Zope3. Since Zope3 incorporates Twisted, I'm wondering if I can beat on it enough to be able to run my Twisted code underneath the existing Zope3/Publisher arrangement. If anyone is currently doing Ajax in Zope3, I'd be interested in talking with them. I saw a brief flurry of emails some months ago about adopting one of the existing Javascript frameworks and then adjusting Zope3's API to generically work with any such framework but no further discussion since. -Jeff ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Zope 3 lacks Ajax capability?
Jeff Rush wrote: Just checking if I'm missing something -- with the removal of HTTP streaming/chunking in 3.2, this means that the async bi-directional persistent socket communications associated with Ajax is NOT possible at this time? That a request/response must quickly run to completion on a thread and cannot hang on to that thread to asynchronously communicate with the client? I've been doing this in Twisted (actually Nevow's live page API) and had hoped to migrate some code over to Zope3. Since Zope3 incorporates Twisted, I'm wondering if I can beat on it enough to be able to run my Twisted code underneath the existing Zope3/Publisher arrangement. If anyone is currently doing Ajax in Zope3, I'd be interested in talking with them. I saw a brief flurry of emails some months ago about adopting one of the existing Javascript frameworks and then adjusting Zope3's API to generically work with any such framework but no further discussion since. -Jeff I've managed to work on this field a while ago, to provide at least a way to get async feedback on running requests (uploading data/running), a branch was made to work on it but that's all. what does your code actually do ? Tarek ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/tziade%40nuxeo.com ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Zope 3 lacks Ajax capability?
Jeff Rush wrote: Just checking if I'm missing something -- with the removal of HTTP streaming/chunking in 3.2, this means that the async bi-directional persistent socket communications associated with Ajax is NOT possible at this time? Don't know if it is or isn't, but that's a novel definition of the A in AJAX that I haven't seen before. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Zope 3 lacks Ajax capability?
On May 15, 2006, at 1:23 PM, Jeff Rush wrote: Benji York wrote: Jeff Rush wrote: Just checking if I'm missing something -- with the removal of HTTP streaming/chunking in 3.2, this means that the async bi- directional persistent socket communications associated with Ajax is NOT possible at this time? Don't know if it is or isn't, but that's a novel definition of the A in AJAX that I haven't seen before. I got the definition from Wikipedia: http://en.wikipedia.org/wiki/AJAX Ajax, shorthand for Asynchronous JavaScript+CSS+DOM +XMLHttpRequest, is a Web development technique for creating interactive web applications. From the page of the guy that coined the name: http://www.adaptivepath.com/publications/essays/archives/000385.php The name is shorthand for Asynchronous JavaScript + XML. The key points re Zope3 are: (1) a piece of Javascript downloaded with a page request turns around and issues an HTTP GET back to Zope3 such that that connection is kept open indefinitely, and the thread within Zope3 that is servicing that request hangs around and periodically shoves bits of data (XML, JSON, whatever) down that pipe that get acted upon by Javascript within the client's page. This provides server = client communications via a brief REQUEST and a neverending RESPONSE chunked up into pieces representing operations run on the client. (2) another piece of Javascript downloaded with a page request similarly turns around and issues an HTTP GET/PUT back to Zope3 with a header to keep the connection open. Over this pipe the client can issue conventional multiple REQUEST/RESPONSE cycles to invoke functions within the server, providing client = server communications. However the trick re Zope3 is that the URL/view to which that request connects must be one that can rendevous with the thread or a piece of state associated with (1) above, so that the server and client have a meaningful basis on which to talk. So far as I can see, Zope3 doesn't provide any way to (1) hang onto a thread that can send further response data at any time or (2) manage a rendevous with a thread/context of another HTTP request from the same browser. I think I can implement (2) but (1) is harder until streaming is added back in. #1 could also be implemented as some piece of context that is handed to an arbitrary request-servicing thread each time data becomes available to send to the client but that approach still needs some element that does computation within the server and then signals it has data ready to send to the client. I think Benji's commenting on the fact that you're creating a synchronous connection when you hold it open like that. FWIW, I've been using MochiKit's Async package for writing Zope 3 apps with AJAX. Zac ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Zope 3 lacks Ajax capability?
Jeff Rush wrote: Just checking if I'm missing something -- with the removal of HTTP streaming/chunking in 3.2, this means that the async bi-directional persistent socket communications associated with Ajax is NOT possible at this time? That a request/response must quickly run to completion on a thread and cannot hang on to that thread to asynchronously communicate with the client? I've been doing this in Twisted (actually Nevow's live page API) and had hoped to migrate some code over to Zope3. Since Zope3 incorporates Twisted, I'm wondering if I can beat on it enough to be able to run my Twisted code underneath the existing Zope3/Publisher arrangement. If anyone is currently doing Ajax in Zope3, I'd be interested in talking with them. I saw a brief flurry of emails some months ago about adopting one of the existing Javascript frameworks and then adjusting Zope3's API to generically work with any such framework but no further discussion since. -Jeff do you mean HTTP streaming? http://ajaxpatterns.org/HTTP_Streaming I recently noticed something that makes it tricky to use zope3 in conjunction with Ajax: the request ID computed from the browser via a standard HTTP request/response pattern is different from the id obtain with XMLHttpRequest calls - which makes it rather tricky to use zope3 session id with Ajax (the same browser is seen as 2 different browsers). maybe setting up a page on the z3 wiki that lists current issues with Ajax could be a good start? /JM ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Zope 3 lacks Ajax capability?
Zachery Bir wrote: I think Benji's commenting on the fact that you're creating a synchronous connection when you hold it open like that. Exactly. As Jean-Marc noted, Jeff's talking more about streaming than asynchronicity (is that a word?). FWIW, I've been using MochiKit's Async package for writing Zope 3 apps with AJAX. MochiKit is one of life's little joys. (And I'm not being sarcastic, ask hard to believe as that is.) -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Zope 3 lacks Ajax capability?
Jeff Rush wrote: Benji York wrote: Jeff Rush wrote: Just checking if I'm missing something -- with the removal of HTTP streaming/chunking in 3.2, this means that the async bi-directional persistent socket communications associated with Ajax is NOT possible at this time? Don't know if it is or isn't, but that's a novel definition of the A in AJAX that I haven't seen before. I got the definition from Wikipedia: http://en.wikipedia.org/wiki/AJAX Ajax, shorthand for Asynchronous JavaScript+CSS+DOM+XMLHttpRequest, is a Web development technique for creating interactive web applications. From the page of the guy that coined the name: http://www.adaptivepath.com/publications/essays/archives/000385.php The name is shorthand for Asynchronous JavaScript + XML. The key points re Zope3 are: (1) a piece of Javascript downloaded with a page request turns around and issues an HTTP GET back to Zope3 such that that connection is kept open indefinitely, and the thread within Zope3 that is servicing that request hangs around and periodically shoves bits of data (XML, JSON, whatever) down that pipe that get acted upon by Javascript within the client's page. This provides server = client communications via a brief REQUEST and a neverending RESPONSE chunked up into pieces representing operations run on the client. (2) another piece of Javascript downloaded with a page request similarly turns around and issues an HTTP GET/PUT back to Zope3 with a header to keep the connection open. Over this pipe the client can issue conventional multiple REQUEST/RESPONSE cycles to invoke functions within the server, providing client = server communications. However the trick re Zope3 is that the URL/view to which that request connects must be one that can rendevous with the thread or a piece of state associated with (1) above, so that the server and client have a meaningful basis on which to talk. So far as I can see, Zope3 doesn't provide any way to (1) hang onto a thread that can send further response data at any time or (2) manage a rendevous with a thread/context of another HTTP request from the same browser. I think I can implement (2) but (1) is harder until streaming is added back in. #1 could also be implemented as some piece of context that is handed to an arbitrary request-servicing thread each time data becomes available to send to the client but that approach still needs some element that does computation within the server and then signals it has data ready to send to the client. In my recent experiments with wsgi middleware, the twisted publisher in Zope 3 will do chunked transfer-coding when the published object is an iterator that is specifically not a list or tuple. hth, -Jim Washington ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Zope 3 lacks Ajax capability?
On 5/15/06, Jeff Rush [EMAIL PROTECTED] wrote: I got the definition from Wikipedia: http://en.wikipedia.org/wiki/AJAX Ajax, shorthand for Asynchronous JavaScript+CSS+DOM+XMLHttpRequest, is a Web development technique for creating interactive web applications. From the page of the guy that coined the name: http://www.adaptivepath.com/publications/essays/archives/000385.php The name is shorthand for Asynchronous JavaScript + XML. Yes; we agree on this definition of AJAX, I think. :-) The key points re Zope3 are: (1) a piece of Javascript downloaded with a page request turns around and issues an HTTP GET back to Zope3 such that that connection is kept open indefinitely, and the thread within Zope3 that is servicing that request hangs around and periodically shoves bits of data (XML, JSON, whatever) down that This is where we get a disconnect. I've certainly never heard that AJAX specifically requires a server thread to remain dedicated to a particular client. This is fundamentally unscalable, and architecturally fragile at best. The JavaScript in the browser can try to keep an existing connection open using standard HTTP connection controls, certainly, but those never come with a guarantee. Several of us at Zope Corp. have created AJAXian interfaces with Zope on the server side, so I think it's safe to say Zope can do this just fine. The TCP connection itself, however, isn't so precious as you indicate; the ordinary HTTP request/response model is the foundation for AJAX services, and works just fine with Zope. -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Education is hanging around until you've caught on. -- Robert Frost ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com