Hacker News new | ask | show | jobs
by retube 4898 days ago
that's pretty cool. amazon could resell your free browser cycles.
5 comments

In theory yes. But... most browsers throttle javascript timers of tabs that are not in the foreground. For example, here's a commit for Chromium that limits the firing of timers for background tabs: https://codereview.chromium.org/6577021.

I can't find the particular commit/issue for Webkit, but the authors expressed that they were using the timer limitation to prevent non-foreground tabs from sucking up CPU time. Others came along with workarounds (scheduling 1000 timers at 1ms intervals that will each fire once per second) and the authors said if they saw something like that being put to practice, they'd have to re-evaluate their method for limiting javascript usage by background threads.

This issue is actually very visible in the example I have on the quuen home page. If you don't have the tab in the foreground, the script will execute more slowly than if its in the foreground. This isn't an issue if you're spawning browsers with the purpose of using them as computation nodes (so their tabs are in the foreground), or for applications that aren't very chatty with the back end.
This isn't a new idea, although we have yet to see someone execute it well. Plura Processing tried it back in 2008. Here's their Show HN:

http://news.ycombinator.com/item?id=347359

Plura ran into trouble because they built a pay-for-grid computing platform where the nodes were unsuspecting users:

http://pluraprocessing.wordpress.com/2009/08/24/our-response...

Personally I'd like to see a SETI@Home or Folding@Home in the browser first.

I've been saying for a while that I'm surprised no-one has written a BitCoin miner in JS and started pushing it out to connecting browsers. Given how much time a pop-under advert can sit no someone's machine before they notice it could be relatively lucrative. You'd not get a lot of processing per client per block of time even with the best current JS JIT compilers (especially as GPU mining is where it is at now), but if you have enough machines with your pop-under sat hiding from the user it might make enough to be worth the hassle of porting the code in the first place.
I seem to recall that somebody HAS written a BitCoin miner in JS. It was even posted at HN. Can't find it now though.
I had a "business plan" doing this once. Letting people connect their browsers to some page and get paid for it, with other people paying for the cycles. I figured the demand wasn't there, and that you'd have to make it so servers could participate without a browser / remove the reliance on JS to make it viable. If you could somehow let gamers offset the price of their GPUs by putting GPU-cycles up for sale through the browser one might have something though.
Ah, yes. Distributed DES bruteforcing with a Flash applet - those who haven't thought of it at some point in the past, raise your hand.
You could use Sauce Labs to automatically spawn browsers for Queen. It wouldn't be as abstract as purchasing cycles, but more of instances.