Live data from Hacker News

Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js

queenjs.com

1–10 of 21 posts

Re: Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js

#3
post #2

that's pretty cool. amazon could resell your free browser cycles.

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.

Re: Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js

#4
post #2

that's pretty cool. amazon could resell your free browser cycles.

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.

Re: Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js

#6

The possibilities are interesting, what will you use it for?

testing! That was my first thought and at the bottom of a page is a link to http://thrilljs.com which utilizes queen. Super cool, will definitely be looking into queen/thrill further.

Re: Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js

#7
post #3
post #2

that's pretty cool. amazon could resell your free browser cycles.

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 t…

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.

Re: Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js

#9
Very similar conceptually to a tool (Attester) that our team has released a couple of months ago. https://github.com/ariatemplates/attester/

We use it as a distributed way to perform tests in our main project (Aria Templates: https://github.com/ariatemplates/ariatemplates). The tool is able to use PhantomJS (configurable number of instances) and "normal" browsers which can connect in the same manner (by opening a URL). We use PhantomJS on Travis for continuous integration builds before merging pull requests, and real browsers before each release (every 3 weeks).

We support only our own tests so far (eating the own food), but we may add support for other types as well.

Behind the scenes, the tool first gathers a set of classpaths of the tests to run (recursively); then it dispatches them to active browsers (e.g. when you have a couple of people connected via IE8, each of them will receive a subset of tests to run and effectively the test suite finishes earlier).

You can also run the test suite entirely in the command line (PhantomJS), and if you have multicore processor, you may increase the number of PhantomJS instances to parallelize the suite.

Looking forward for comments and forks!

Re: Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js

#10
post #2

that's pretty cool. amazon could resell your free browser cycles.

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.
Post reply on HN