screenshot-nodejs
screenshot-nodejs copied to clipboard
[long term] Use Chrome headless API directly, get rid of Puppetteer
This would allow us to get rid of the Node.js server wrapper. And we could write the whole service in Go only, effectively reimplement the Puppetteer.
Pros:
- HTTP throttling would be super easy
- Managing Headless processes would be much easier too, ie we could spin up a pool of Headless "workers" in the server, and throttle incoming requests to each available worker.
- Zero overhead
- HTTP/2 for free, potentially generate a GRPC client for many languages
- https://github.com/raff/godet
- https://github.com/knq/chromedp
I'll look into feasibility of this option.
@MarcelRusu crazy idea :)
But especially with GRPC, we could write a "Puppetteer" server with a client that works in any type of language :)
Yea sounds like a lot of work :) but keep me up to date on this, sounds interesting
docker run -it -p 9222:9222 --rm --name chrome-headless knqz/chrome-headless -window-size=1920,1080