Re: [Zope3-dev] Re: Zope 3 lacks Ajax capability?
Benji York wrote: > Balazs Ree wrote: > >> However there is nothing that would keep away a server to be "aware" of >> currently open pages and be able to send notifications to them. This >> would >> also require server support for registering open connections. This >> pattern >> might even turn out to be so useful, that we will see it generally >> supported in five years from now. >> >> On the other hand the same functionality can also be accomplished by >> "traditional" AJAX polling. So at the moment, when talking about >> AJAX, one >> usually speaks of the currently implementable "server pull" >> approach. > > > Something I'd like to play with would be an integration of Zope 3 > events and MochiKit's signals. Perhaps queuing events on the server > and the client could periodically retrieve them. The client could > also queue events or send them immediately to the server. In the same area, I wanted to keep a track of request status on the server when i upload a file, that the client can query asynchronously. I think it's the same pattern: 1/ the page provocates a server call, that generates events in your case, uploads in mine (this could be events as well) 2/ the client JS calls the server to get feedback on some kind of APIs, to know what's happening (uploading status, event queue, etc..) 3/ the client JS can refresh the page upon these infos The only issue I can think of is security. Maybe we could make sure that the client that calls for the infos is the same one that has provocated the server event. Anyway, we could probably set up a dedicated space on the server memory to keep track of this infos, and provide APIs to access it. This space would keep track of: - live requests status - a dedicated queue for a certain class of events that could be a dedicated package maybe, but it has to add hooks into the publisher to keep track on request data uploadings Tarek ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: Zope 3 lacks Ajax capability?
Balazs Ree wrote: However there is nothing that would keep away a server to be "aware" of currently open pages and be able to send notifications to them. This would also require server support for registering open connections. This pattern might even turn out to be so useful, that we will see it generally supported in five years from now. On the other hand the same functionality can also be accomplished by "traditional" AJAX polling. So at the moment, when talking about AJAX, one usually speaks of the currently implementable "server pull" approach. Something I'd like to play with would be an integration of Zope 3 events and MochiKit's signals. Perhaps queuing events on the server and the client could periodically retrieve them. The client could also queue events or send them immediately to the server. -- 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] Re: Zope 3 lacks Ajax capability?
Jeff Rush wrote: > >Provide a chat window at the bottom of a page, in which a student >interacts >with a teaching app and members of his team. In the upper portion of the >page, the teaching app alternately presents proficency questionaires and >lessons. This seems to be very similar to our "live comments" demo app: http://svn.zope.org/*checkout*/zope3org/trunk/src/zorg/live/demo/comment/README.txt Unfortunately the documentation is far from complete, but I can work on it if there is a concrete need. -Uwe Dr. Uwe Oestermeier Institut für Wissensmedien Knowledge Media Research Center Konrad-Adenauer-Str. 40 D-72072 Tuebingen Germany [EMAIL PROTECTED] Tel. +49 7071 979-208 Fax +49 7071 979-100 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: Zope 3 lacks Ajax capability?
Hi Roger, hi Jeff, Roger wrote: > >See this for more information, but don't ask me if it's working. > >http://svn.zope.org/zope3org/trunk/src/zorg/live/README.txt?rev=66712&view=markup > It works at least for our purposes. We are using an experimental LivePage application here at our institute. "Experimental" means that 4 subjects of a psychological study share a message board via browser live pages. Jeff Rush wrote: > >(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. I struggled with both problems in the zorg.live package. (1) In this package I implemented a specialization of the twisted server which handles LivePage requests outside Zope's threads. Otherwise the number of connected clients would have been limited to the number of Zope threads which come with their own object caches and database connections, in my view an unnecessary overhead for most LivePage requests. (2) Each client is registered on the server side in a thread safe global utility. This utility handles the clients ids which are send as parameters of each LivePage request. Feel free to contact me if this looks interesting to you. Regards, Uwe Dr. Uwe Oestermeier Institut für Wissensmedien Knowledge Media Research Center Konrad-Adenauer-Str. 40 D-72072 Tuebingen Germany [EMAIL PROTECTED] Tel. +49 7071 979-208 Fax +49 7071 979-100 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
RE: [Zope3-dev] Re: Zope 3 lacks Ajax capability?
Hi all, There is such a thing in z3! Or at least in the "new" zope3.org implemnetation ;-) I remember that Uwe Oestermeier was developing something like a livepage which can receive and send streams of HTML on a open request. See this for more information, but don't ask me if it's working. http://svn.zope.org/zope3org/trunk/src/zorg/live/README.txt?rev=66712&view=m arkup Please contact Uwe Oestermeier if you have questions. I guess you can find his address somewhere at the sprint announcment list. He was organizing the Isar Sprint. Hope that's usefull. Regards Roger Ineichen _ END OF MESSAGE > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Zachery Bir > Sent: Monday, May 15, 2006 7:53 PM > To: Jeff Rush > Cc: zope3-dev@zope.org > Subject: Re: [Zope3-dev] Re: Zope 3 lacks Ajax capability? > > On May 15, 2006, at 1:49 PM, Jeff Rush wrote: > > > Benji York wrote: > >> 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?). > > > > Well the connection itself is synchronous but that data > flowing over > > it is async in that the server can send something to the > > client at any time w/o regard to the usual REQUEST/RESPONSE > cycle. > > I guess I didn't think of it as streaming because I wasn't > sending a > > large quantity of data over the connection, just many small chunks > > representing Javascript fragments to be invoked within the client. > > > >>> 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.) > > > > I looked at MochiKit and studied the Async package, but perhaps I > > didn't understand it. I only saw ways for the client to sneak HTTP > > REQUESTSs to the server behind the user's back, but nothing for the > > server to reach out and shove something into the client > whenever the > > server, not the client, decided it was time. I'd rather > not have the > > client polling the server for said data with HTTP REQUESTs. > > Depends entirely on your application, I guess. Comet (the live > connection) doesn't scale particularly well. It suits some > applications quite nicely (e.g. small number of users). For > other purposes, it's wholly unsuited. But that's not an > indictment of Zope 3's ability to deploy AJAX applications. > Perhaps Comet apps, but not AJAX. > > Zac > > ___ > Zope3-dev mailing list > Zope3-dev@zope.org > Unsub: > http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch > > ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: Zope 3 lacks Ajax capability?
On May 15, 2006, at 1:49 PM, Jeff Rush wrote: Benji York wrote: 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?). Well the connection itself is synchronous but that data flowing over it is async in that the server can send something to the client at any time w/o regard to the usual REQUEST/RESPONSE cycle. I guess I didn't think of it as streaming because I wasn't sending a large quantity of data over the connection, just many small chunks representing Javascript fragments to be invoked within the client. 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.) I looked at MochiKit and studied the Async package, but perhaps I didn't understand it. I only saw ways for the client to sneak HTTP REQUESTSs to the server behind the user's back, but nothing for the server to reach out and shove something into the client whenever the server, not the client, decided it was time. I'd rather not have the client polling the server for said data with HTTP REQUESTs. Depends entirely on your application, I guess. Comet (the live connection) doesn't scale particularly well. It suits some applications quite nicely (e.g. small number of users). For other purposes, it's wholly unsuited. But that's not an indictment of Zope 3's ability to deploy AJAX applications. Perhaps Comet apps, but not AJAX. Zac ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com