3 ms·
> It depends on what the code is actually doing Indeed, things like video encoding, machine learning, graph traversal, etc, can be pretty expensive. But then
by BiteCode_dev 5y ago
> It depends on what the code is actually doing
Indeed, things like video encoding, machine learning, graph traversal, etc, can be pretty expensive.
But then again, our tooling are so powerful these days you can get away with a lot. Timeseries ? Clickhouse is your friends. Need geo calculations ? PostGis is here. Need to extract frames from a video ? ffmpeg will do that in a few cpu cycles. Data analysis ? Say hello to pandas. Validation, caching, expiration, encryption, workflow, pub/sub, logging, reporting... We have amazing solutions for everything that will let you scale up to the millions of users for few hundred dollars.
In your example with the screenshots, one can imagine putting them in a queue (5 minutes setup with python-rq + redis) or even more low tech, a cron, and suddenly your VPS can take one screenshot every 2 seconds, which is 43200 in a day. That's a lot of screenshots.
Your client need the screenshot immediately ? The browser can take a screenshot from JS with html2canvas.
Sometimes it feels we are using $TECH because there is a whole class of devs that can't find solutions to problems:
- don't want to think about your data structure ? Put everything in no sql.
- don't want to think about your deployment ? Put everything in a container.
- don't want to think about your algo ? Put everything in the cloud.
Of course, in the end, you still have to think about all that no matter the tool you use. You just moved the cost somewhere else, usually paying much, much more later.
In fact, even most of the stuff I get paid to do using Django could be done cheaper with wordpress. I'm already overkilling it.