Forum OpenACS Development: Re: streaming ajax based chat

Collapse
Posted by gustaf neumann on
The "streaming" mode described above does not work with IE. MSIE flags correctly readystate ==3 when partial data arrives, but it does not allow to access the response text (like e.g. in firefox).

so i have defined yet another delivery interface for streaming data via ajax that seems to be quite robust: instead of sending JSON encoded java script objects, it uses now a hidden iframe that recieves a text/html file in streaming mode, which includes SCRIPT-tags containing the javascript calls. i called this mode "scripted-streaming". scripted-streaming works with Firefox, Safrari and IE.

The biggest disadvantage of scripted-streaming over streaming is that while the iframe loads (always) the activity indicator spins, which makes me nervous. so, when libthread is available, firefox uses "streaming" mode, the other browsers use "scripted-streaming" mode. When no libthread is available, "polling" mode is used for all browsers. One can certainly force the mode by specifying it as shown above.

xowiki chat is at least a study how to use AJAX with oacs in three different ways.

Collapse
Posted by gustaf neumann on
To make things clearer: The streaming modes require the background delivery thread (sending large files asynchronously in the background without blocking connection threads), which requires libthread and a small patch for the aolserver (extending ns_conn) http://media.wu-wien.ac.at/download/aolserver-nsd-conn.patch

This is described in http://media.wu-wien.ac.at/download/xowiki-doc/xotcl-apm.html where the version numbers are outdated. get the actual code from cvs, not the apm packages. The file contains as well the description for installing libthread...

guess, i should move this info to oacs.org/xowiki