Great project. The biggest question for me when I'm using phantomjs is why phantomjs is trying to replicate nodejs infrastructure. For example, phantomjs has an HTTP server feature for processing incoming requests. This doesn't make sense to me because a browser shouldn't be a server. If you need to get information out of the worker, you should POST it somewhere. The proclivity of phantomjs users to prefer stdout is astounding. It's definitely the #1 question or issue that I get fielded in #phantomjs on freenode.
For example, for POSTing and reading from redis/resque I wrote this (proof of concept, not what's in production):
> There are similar "glues" like phantomjs-node that integrate phantomjs by
> spawning a process, and processing the stdout stream, but it is limited by
> what can be done via the command line of phantomjs. If you really want direct
> api access to the browser, the best way is via direct integration.
This seems like a lot of overhead on top of a phantomjs (or even just a generic webkit) worker. Substack's approach was to just put a proxy in front of a browser that injects a <script> tag into the page to boss the browser around:
Supposedly the actual browser client shouldn't matter, as long as your fleet of workers are up and running. I bet chimera's approach will end up with more access to npm modules in the long run compared to phantomjs.
For example, for POSTing and reading from redis/resque I wrote this (proof of concept, not what's in production):
https://gist.github.com/000037f472b72d9490a6
A few thoughts..
This seems like a lot of overhead on top of a phantomjs (or even just a generic webkit) worker. Substack's approach was to just put a proxy in front of a browser that injects a <script> tag into the page to boss the browser around:https://github.com/substack/schoolbus
Supposedly the actual browser client shouldn't matter, as long as your fleet of workers are up and running. I bet chimera's approach will end up with more access to npm modules in the long run compared to phantomjs.
Also, the link wasn't in the article: https://github.com/deanmao/node-chimera
For the python equivalent of this project, there's https://github.com/kanzure/pyphantomjs