Re:Show HN: Scaling PhantomJS With Ghost Town
by gcb0 on Thursday May 29, 2014 @02:22AM
(#7815010)
you are all doing it wrong... we use phantomjs on its own. and run the test code in it. so its analogous to loading the target page, and then running your code/test in a browser dev console. you take care of concurrency and retries in your preferred shell. this also allows things like integration with Makefiles, etc.
Re:Show HN: Scaling PhantomJS With Ghost Town
by tkazec on Thursday May 29, 2014 @12:52AM
(#7814809)
PhantomJS: Extremely popular (10k+ stars!) with a comparative trickle of commits. The major flaws might be excusable, but the number of small issues and unmerged pull requests is not.
phantomjs-node: Popular but badly structured and documented. Many small ignored issues.
Re:Show HN: Scaling PhantomJS With Ghost Town
by mootothemax on Thursday May 29, 2014 @04:10AM
(#7815246)
Has anyone had any luck with PhantomJS and web fonts?
I'd love to use PhantomJS for taking screenshots of designs supplied by third-parties to us, and changing the CSS involved by hand is not a realistic option.
The issue itself appears to be nearly 2 years old:
Re:Show HN: Scaling PhantomJS With Ghost Town
by damian2000 on Thursday May 29, 2014 @03:10AM
(#7815111)
Interested to know if Selenium web driver integration was looked into? You can use Selenium Grid for example to run distributed jobs with a Phantom JS backend... https://github.com/detro/ghostdriver
Re:Show HN: Scaling PhantomJS With Ghost Town
by dsl on Thursday May 29, 2014 @03:01AM
(#7815094)
> a system to reliably render images at scale
I'm curious what exactly "render" means in your context? Phantom.js is headless, so it would be futile to be simply rendering GIFs and JPGs within the browser I assume?
Re:Show HN: Scaling PhantomJS With Ghost Town
by martin-adams on Thursday May 29, 2014 @03:44AM
(#7815187)
Imagine it like a web page to PNG converter. This doesn't need a desktop/display attached to do that. That's what "render" means in a headless context.
Re:Show HN: Scaling PhantomJS With Ghost Town
by dsl on Thursday May 29, 2014 @04:19AM
(#7815277)
Ah. I get it. Brain did not parse "render" as the output side, but rather the input, so I was trying to figure out why they used phantom.js as an elaborate image format converter.
It was used for prerender [1] for some time, before being changed so that clustering happened at the HTTP worker level.
Scaling PhantomJS is no walk in the park. There's a lot of duct tape to get it to communicate with node.js, and it's easy for a memory leak to occur.
[1] https://github.com/prerender/prerender
using it inside node is just masochism.
phantomjs: https://github.com/ariya/phantomjs/commits/master
phantomjs-node: https://github.com/sgentle/phantomjs-node/commits/master
phantomjs-node: Popular but badly structured and documented. Many small ignored issues.
Also the development update Twitter stream @PhantomJS is not very active.
I'd love to use PhantomJS for taking screenshots of designs supplied by third-parties to us, and changing the CSS involved by hand is not a realistic option.
The issue itself appears to be nearly 2 years old:
https://github.com/ariya/phantomjs/issues/10592
And PhantomJS's core developers appear to be putting off the fix until version 2 is released, whenever that may be:
https://github.com/ariya/phantomjs/pull/12108
Any ideas? I'm currently investigating using SlimerJS, which uses the Gecko engine, but that involves its own different set of challenges.
I'm curious what exactly "render" means in your context? Phantom.js is headless, so it would be futile to be simply rendering GIFs and JPGs within the browser I assume?