Comments for What else is burried down in the depth's of Google's amazing JavaScript?
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/ifaces/document2/document2.asp
Regards
Of course it's a hack. Welcome to the web. This is how real work gets done out here in the world of universal deployment.
As for Flash and components, I invite you to check out the widgets we're building in Dojo. They make building richer interfaces easier, to the extent that declaring rich components can be as little as a couple of tags. These components aren't Flash, but that's both a benefit and a liability.
Regards
It's unique in several ways. It builds on the programmaticaly "moving" an iframe to a different URL, but with the cooperation of the server streams events down the wire without closing the connection. Furthermore, unlike hosting the iframe directly under the spawning document, this technique avoids the background "click" noise and prevents the throbber from spinning. It's a usability enhancement to a well-known technique (at least in the small community of people that care about low-latency data to the browser).
Regards
It's amazing how irritating that iframe click is on the sites that use that method.
Tim: as I've said here before, you can develop richer interactions in whatever environment you like, but please don't make any mistake that if it's not HTML, CSS and JavaScript, it's not the web.
Filip: You're not sending "the complete html", you're sending small datagrams encoded in a script tag envelope. The data on the wire is usually some sort of JSON data structure.
function loadCustomer(McustId) { document.all.general1.src="getCust.php?"+McustId }
... The php returns executable javascript, which obviously works like regular javascript. Instead of using XML, I format it so that it renders the data in the form needed for each specific case.
The issue of PUSH is interesting to me. There are many times that I would like my local application to know about events. I use polling currently. I have thought about using Flash, which has notification capabilities. Really, all that is needed is to say "Hey, its time to check the server."
I am unclear about the server aspect of this particular approach (Tiwsted)
They were just too far ahead of their time. Web weren't mature enough to use it. Here is a link on how you can implement "Serverside-Push" web application. Combine with iframe and XMLHTTPRequest Object (AKA Ajax) you can build a realtime application. Althougth according to how most server side scripting language (PHP, Perl, Python and Ruby)are integrated into the web server (each process doesn't know about other process), they are not suitable for such task.
Multipart is not what we're looking for. We need something portable, and multipart isn't it. While I would personally prefer it if Opera, Safari, and IE would agree on a multipart boundary and encoding syntax, it hasn't happened. Until then, the iframe hack is the lowest latency option.
Regards
I came to Oracle when it acquired PeopleSoft, which acquired a startup I was the architect for called istante software.
We use this technology in Oracle BAM to keep our business activity monitoring dashboard up to date in real time. In fact we guarantee that the time elapsed between our backend server getting a transaction committed and the time it shows up in all of the dashboard that are affected is not more than 2-5 behinds real time.
We use 1 connecion for all of the dashboard a use has on his desktop, and we "multiplex" the ActiveData through that connection (which is one of our pending patents).
We send down XML documents that only have the change each view needs to get, and not complete HTML like someone was suggesting here...
Using Oracle BAM users can build real time dashboards and alerts on any data model they define, and doing all of that happens also in 100% thin and rich web based applications (which are also using Ajax when it makes sense).
The first version n our product with all of what I mentioned shipped in 2003.
I never claimed that the technique of streaming data down the wire was new. When I re-wrote the client for the Open Source'd version of mod_pubsub several years ago, the technique was old then. We even re-implemented the hack that allowed multiple browser windows to use the same connection (think IPC over cookies).
What I did claim is that Google's improvement on it with respect to IE is novel and that it removes a significant usability barrier. If Oracle implemented this particular browser-specific workaround, that would be good to know so credit can be given where it's due.
As for patents and timing, I suggest you contact KnowNow whose business started around this technique (I believe) prior to the date you mention. There is likely not only prior art, there is prior art for the multiplexing portion and all of the client techniques.
I recommend that you do your homework on this one before claiming that your company has been wronged, that anyone is in breach of patent, or that I have stated something inaccurate. Well-informed corrections are welcome, however.
Regards
This approach actually seems to be quite a viable alternative to XmlHttpRequest in some cases, so I'm definitely going to check it out and learn more about it. Thanks for mentioning it :)
Pushlets: Send events from servlets to DHTML client browsers http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet.html
Discover how pushlets, a servlet-based notification mechanism, enables server-side Java objects to call back JavaScript code within a client browser.
It has gone by many names over the years. Pushlets was just one. IIRC, however, it scaled like a lead brick. Newer event-driven server environments that eschew Servelets and Threads in favor of CPS (Twisted and POE) or a single "keepalive dispatcher" (Apache Event MPM) allow the technique to finally scale well. Kernel level improvements like epoll and kqueue (wrapped in libevent) have accelerated this.
As for how it looks on the wire and what the client strategy is, there are many ways to skin this cat. I'm only covering a single improvement by Google to one of the better-performing approaches.
Regards
If not, has anyone come up with a clever workaround for the 2 connections limit, other than changing the registry for IE and prefs.js for Firefox (which can have other undesirable side effects)?
I never claimed that our company has been wronged, or that anyone is in breach of patent.
We have checked prior art (including KnowNow) before we submitted the patent applications.
I agree think that Google's use of this technology is awesome, and I think that what we do with it in Oracle BAM is not less cool :)
Tal.
Tal.
dont know if this is all obvious to you guys, but it took me some time to figure out: in order to access a function "outside" the htmlfile ActiveX Object you'll have to set a reference under the "parentWindow" property of the ActiveX Object. e.g. #
function foo() {...} transferDoc = new ActiveXObject("htmlfile"); transferDoc.parentWindow.foo = foo; #
// inside the iframe parent.foo(); #
gmail does it the same way, so i guess there is no better solution ;) in order to avoid the "browser keeps loading" syndrom on Mozilla gmail uses the XMLHttpRequest which supports, at least under Mozilla, the readyState "INTERACTIVE". It allows access to the responseText while its still loading. Unfortunatelly there is no way to clear the responseText, so everytime the readyState occurs you'll have to substr out the stream data that you received before in order to get the newly received data. So it might be a good idea to reestablish the stream connection at some stage so the browser may free that memory. Certainly, this also applies to the iframe technique. (again, gmail does that aswell)
greets from germany,
martin
thanx!
greets, martin
Imagine resume, upload in blocks, etc. Besides being useful in a P2P-like situation, would be great where clients have to upload LARGE files to the server.
I know, I'm a dreamer ;)
"On FF (1.5), the communication iframe only makes the statusbar say âTransfering data from example.comâ¦â? while the throbber stops when a subsequent HTTP request has finished."
I've been having a very hard time reproducing that result, and I wonder if you could clarify a bit. Is it any old HTTP request on the page (i.e. an image or something), or does something fancy need to be done to make the spinner stop for Firefox?
Thanks very much!
Would/could it work with Microsoft IIS ?
Thanks
My best guess is that as soon as anyone logs into Gmail, a persistent connection is established and is constantly left open, even when no one is chatting. Do you know if this is the case?
However, using this ActiveXObject("htmlfile") solved my woes! No more clicks or annoying visual queues in IE! I need to stick with the "single-request" method rather than going for a persistent connection b/c it's fundamental to the way I'm able to skirt same origin (except for Opera which is known to be overly sensitive with iframe security).
Since this appears to be a well versed community, out of curiosity does anyone else here have asynchronous communcations working outside of the same origin? Would be nice to know if my architecture is as unique as I think it is, or if I simply reinvented the wheel ;)
Thanks, -Craig
I am very interested in using DOJO for a new website. We require realtime push, just like the google dynamic iframe solution provides. Do you have any idea when this would be implemented in DOJO?
Thanks Scott
I remembered having seen this technique at work, but could not recall it was Pushlets :)
Alex, Would it be correct to say that the client side is exactly same as Pushlets while the server side is implemented differently...or I am missing something here ? As you said, I am also curious about what other names it has gone by !
Warm regards, Abhinav
But all these "hacks" against the browser shouldn't go unnoticed. These new Applications, are changing the way we browse the web.
Soon I hope browsers should come up with the "Back" button for the "Last Ajax based event". I don't know how are devs @ Mozilla working towards it, probably Firefox 3.
i tried the code on ie5.5 on win98 and end up with: function rpc_iframe()
{
var currentDomain = âlocalhost/â?;
var dataStreamUrl = currentDomain+â?rpc-test/server.phpâ?;
var transferDoc = new ActiveXObject(â?htmlfileâ?); // neue Seite
transferDoc.open();
transferDoc.write(â?");
transferDoc.write(â?document.domain=ââ?+currentDomain+â?â;â?);
transferDoc.write(â?");
transferDoc.close();
var ifrDiv = transferDoc.createElement(â?divâ?);
transferDoc.appendChild(ifrDiv);
ifrDiv.innerHTML = ââ?;
}
Everything went fine⦠except the window wont close.
Any ideas to manage it? Thanks in advance
M.
I see no logic with this at all:
transferDoc.parentWindow.foo = foo;
var transferDoc = new ActiveXObject("htmlfile"); // !?!
for Firefox?
It seems that lots of them can't try something new (to them). I've been tracking some of the Dojo Toolkit. It's really amazing and interisting, but currently I understand that dojo uses Ajax to interact with the server. Do you, the Dojo's development team, plan to adopt, port or migrate to "Comet" model? I know Dojo has the Cometd project, but is this a separated project? or will be integrated into dojo's javascript libraries? If so, which version will include it?
Regards, Ivan Garavito
For IE, has anyone confirmed that you can call code in the parent of the "htmlfile" frame?
Alex, you have comments in the cometd.js code to the effect of "TODO: improve with Gmail fix". Any luck?
The IE iframe issue being solved, how does gmail get around the 2-connections limit? What are the possible approaches for that as it's a common problem in FF and IE?
The obvious is to change the browser behavior. Good luck with that! We need solutions that work now. (http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-November/007599.html
Be kinda cool to see if they make web pages in the future be run off of ajax or something similiar so browsers never have to refresh.
Regards.