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.

The "A" in Ajax refers, I believe, to the .async property on the XMLHttpRequest, not in how the server communicates with the client. "Ajax" processing happens in the browser background and doesn't lock up the browser.

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.

Mozilla has some support for keeping the server connection open and pushing messages to the client:

  http://www.xulplanet.com/tutorials/mozsdk/serverpush.php

Two asides:

1) Is this better for zope3-users?

2) Benji, I've been working with MochiKit and agree that it's a real joy. Can't wait for 1.4 to get spun up.

--Paul

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to