On Sun, 18 Dec 2005 00:23:18 -0500, Drake Smith <[EMAIL PROTECTED]> wrote:
At 04:03 PM 12/17/2005 +0200, you wrote:
* Drake Smith <[EMAIL PROTECTED]> [2005-12-17 08:08:40 -0500]:

> I use Twisted Web on an embedded Linux device to provide browser-based
> configuration & control. The browser displays a bar graph of a parameter
> that is quickly changing on the embedded device (peak audio level). In
> order to provide a reasonable feedback to the user, the browser connects to
> the Twisted Web CGI server once a second via XMLHTTPRequest to obtain an
> updated bar graph level, then Twisted Web dutifully closes the connection.
> Is there a way to achieve the same thing without opening & closing a
> connection each time?

Yes. The easiest way would be to use something like nevow.athena, which
takes care of the XHR connection for you, allowing you to concentrate on
the higher-level communication between browser and server.
--
mithrandi, i Ainil en-Balandor, a faer Ambar

Tristan, thank you for pointing out nevow.athena -- I did not know of it. I did know of livepage but I was hoping for something less involved. On the other hand, the ability to freely communicate back and forth between browser and server without the need for a plug-in is so important that I'm willing to take the plunge into nevow.

Kindly let me know if there is any documentation on athena other than the
athena.py and .js modules that reside in the nevow 0.6.0 release, otherwise I will
find my way through the source and Twisted-web archives.

There is a handful of examples in current [EMAIL PROTECTED], in 
examples/athenademo/.  Note that the API in 0.6 is not quite the same as the 
API in current trunk.  If you're going to use Athena, I recommend tracking 
development, rather than sticking to the latest release (at least until the 
next release, after which things should settle down quite a bit).

Also note that Athena opens and closes a lot of sockets.  I am not sure why 
this might matter, but you seemed to indicate it was a problem in your initial 
post, so I wanted to point it out before you got too deep into anything.

Jean-Paul

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to