News for hackers. Stuff that matters.
Re:Show HN: Simple PDF to PNG Server by FreeHugs on Friday November 15, 2019 @10:57AM (#21545838)
Nice. What is your tech stack to serve it?
Re:Show HN: Simple PDF to PNG Server by slowenough on Friday November 15, 2019 @11:00AM (#21545880)
Just a digital ocean droplet running FreeBSD, then PM2 running Node.JS and ImageMagick built with multicore support.
Re:Show HN: Simple PDF to PNG Server by kodablah on Friday November 15, 2019 @05:32PM (#21549444)
One wonders if you can WASM-ify ImageMagick and the use a JS FileReader and a canvas or other PNG output approach to do this all client side. Hrmm, I might tackle this myself if I get the time...
Re:Show HN: Simple PDF to PNG Server by johnsonjo on Saturday November 16, 2019 @02:19AM (#21551469)
Looks like someone has gotten pretty far WASM-ifying ImageMagick already [1]!

[1]: https://github.com/KnicKnic/WASM-ImageMagick

Re:Show HN: Simple PDF to PNG Server by z92 on Friday November 15, 2019 @11:19AM (#21546075)
ImageMagick with "multicore" support won't speed things up the moment number of concurrent requests touches the number of cores you have. And in digital ocean's case you have only one core.
Re:Show HN: Simple PDF to PNG Server by slowenough on Friday November 15, 2019 @11:23AM (#21546116)
Actually I created a Droplet with 6 cores
Re:Show HN: Simple PDF to PNG Server by Koshkin on Friday November 15, 2019 @12:25PM (#21546712)
But remember that multi-threading was shown to improve performance in the era of single-core computers.
Re:Show HN: Simple PDF to PNG Server by mlyle on Friday November 15, 2019 @02:21PM (#21547861)
Sure, but if your concurrent number of fully tendered requests at least sometimes dips below the number of cores, it is a big win.

(At the possible cost of top-end scale; improving response to normal workload significantly and hurting the top workload reachable somewhat).