Wednesday, May 23, 2007

Stream Computing with AJAX (Part 1)

How many of you out there sit and read internet pages?

And how much work is your processor doing when you sit there reading the BBC News pages?

Virtually none.

Wouldn't it be great if all the computers around the world that were just sat there when people were reading websites could be used to help the Folding@Home or Seti@Home projects?

Enter Javascript's eval and XMLHttpRequest commands.

These two commands provide us with the technology to retrieve packets of data, process them, and return the result to the server - all without the website's user having to do anything (or indeed, any knowledge that this is even happening).

This stream processing system could be triggered by an ad banner included as a Javascript URL from the server (strictly, the banner doesn't even need to be visible).

"But who would want to slow their website down by including such a banner?"
I hear you cry.
"Those with an eye on their bank balance!"
I swiftly reply.

Many financial institutions are crying out for more processing power and would quite happily pay good money to have their packets of data processed. Webmasters could easily be coerced into including the stream processing AJAX program if they knew they were receiving some money for each packet computed by their readers.

And off course I'm waiting to skim a humble percentage off the top... :)

In the next post I'll discuss some of the finer points of how stream processing actually works, and some of the issues about doing this in Javascript, such as security and recovery.

No comments: