views:

396

answers:

4

Why aren't there any Javascript distributed computing frameworks / projects? The idea seems absolutely awesome to me because:

  • The Client is the Browser
  • Iteration can be done with AJAX
  • Webmasters could help projects by linking the respective Javascript
  • Millions or even billions of users would help DC projects without even noticing

Please share your views on this subject.

EDIT: Also, what kind of problems do you think would be suitable for JSDC?

GIMPS for instance would be impossible to implement.

+1  A: 

First that comes to my mind is security. Almost all distributed protocols that I know have encryption, thats why they prevent security risks. Although this subject is not so innovative..

http://www.igvita.com/2009/03/03/collaborative-map-reduce-in-the-browser/

Also Wuala is a distributed system, that is implemented using java applet.

Sorantis
+1  A: 

I think the no.1 problem is javascript inefficiency at computing. It wouldn't be just worth it, because an application in pure c/c++ would be 100 times faster.

Thinker
Only 100? Probably far more. Which means getting 10,000 people to install a c++ based distributed computing client would yield *at least* the same amount of work as getting a *million* people to participate in the JS-based one.
Rex M
C++ is good for its speed, and JS is good because it can be used while browsing the web without the user noticing... So therefore the perfect solution is to use Javascript for a drive-by download of a C++ application!
Nick Lewis
But the thing is everyone would probably participate in one website or another, depending on the website the number of JS clients could easily reach *billions*, not millions.
Alix Axel
+2  A: 

There is something to be said for 'user rights' here. It sounds like you're describing a situation where the webmaster for Foo.com includes the script for, say, Folding@Home on their site. As a result, all visitors to Foo.com have some fraction of their CPU "donated" to Folding@Home, until they navigate away from Foo.com. Without some sort of disclaimer or opt-in, I would consider that a form of malware and avoid vising any site that did that.

That's not to say you couldn't build a system that asked for confirmation or permission, but there is definite potential for abuse.

Annabelle
+2  A: 

I think that Web Workers will soon be used to create distributed computing frameworks, there are some early attempts at this concept. Non-blocking code execution could have been done before using setTimeout, but it made a little sense as most browser vendors focused on optimizing their JS engines just recently. Now we have faster code execution and new features, so running some tasks unconsciously in background as we browse the web is probably just a matter of months ;)

pawel