Infrequently Noted

Alex Russell on browsers, standards, and the process of progress.

Comments for Toward server-sent data w/o iframes

Well, if you're hijacking Flash's XMLSocket, you get persistent connections with XML document chunks and lax cross-domain restrictions (provided the endpoint has crossdomain.xml).

Making it talk to JavaScript is ugly, but possible (e.g. Flash JavaScript Integration Kit), and it works with all the popular browsers. On top of that, Flash 8 supposedly has a real API for talking to JavaScript.

It's a Good For Now solution, until browsers are similarly capable on their own.

I've personally salivated over XMLSocket for years, but it just feels even more brittle than either the iframe or xmlhttp hacks, and being able to send a message terminator on both major browsers seems to be a huge step in plugin-less data transport.

I would, however, like to see a small XMLSocket package from a Flash person that comes bundled w/ an exposed JS API.

by alex at
So I've been thinking about "" since it was posted. If I could connect to a Jabber server from JavaScript then things would be set, especially if I could connect anonymously so I don't give away my JID. A brief interogation of Justin Kirby about is OpenAether library and XPCOM bindings ( that it's callable from JavaScript in Firefox with some error messages.

I have to test, but mmm.

The problem with those long lived zombie connections is exactly what the Continuations feature in Jetty 6 is supposed to fix (

It's not that I'm so fond of Java but I know a lot of people who are.

by Alper at

I noted with some interest the continuation support announced in the new Jetty. Perhaps it will provide an answer for Java folks someday (or they could just use Rhino w/ continuations and avoid the throw/catch hackery), but things like Twisted Python and mod_pubsub are here today. No waiting, and no condescending programming language to deal with. Give them a look.


by alex at
To clarify I'm very much a Python person and have fooled around with Twisted a bit. Similarly Java people have had NIO for a while now but it is difficult and I believe incompatible with servlets.

I'm curious about this mod_pubsub thing (have been for a while now) but if I go to the URL you gave ( I get: "You don't have permission to access / on this server."

by Alper at
Can you elaborate on this a bit plz ?

-- or they could just use Rhino w/ -- continuations and avoid the -- throw/catch hackery

by Rajeev at
Lightstreamer is a stand-alone Java server based on NIO, optimized to sustain tens of thousands of concurrent connections for each CPU.

So the typical deployment architecture is based on two distinct clusters: the Pull cluster (a common web server cluster) and the Push cluster (a Lightstreamer server cluster). The browser first connects to the Pull cluster to download al the static resources of the page (html, js, css, images, etc.). Then it connects to the Push cluster to open the push/streaming connection and to subscribe to any item. The real-time updates are sent over the push/streaming connection. In this way the load caused by the real-time traffic is entirely absorbed by the Push cluster (that is specialized for this task), without affecting the traditional architecture of the Pull cluster.

To know more and see some online demos just go to

Ciao Alessandro

hi all, i am a java programmer i m using XMLSocket in my project. I could send data from flash to java using XMLSocket but please can u tell me how i would be able to recieve data from java. How to read from XMLSocket
by Mangesh at

I was wondering if somebody actually tried MSXML2.DOMDocument to implement Multi Part XHR. Because I did and failed miserably. Maybe I get something totally wrong but it seems that the ondataavailable is pretty worthless for that matter. MSXML2.DOMDocument calls the handler only every x elments where x is .. well some number (> 200 elems) Even if MSXML2.DOMDocument loads assync it doesn't seem to start parsing the document before the stream is closed (which alone makes it completely worthless) I don't think that anybody ever really considered using it - but since the idea is floating around and is referred to from a lot of blogs ...

By the way: there's almost zero information about this apart from the msdn page mentioned in the article.

Cheers, Daniel

by Daniel Doubleday at