Hacker News new | ask | show | jobs
by gregjor 927 days ago
The programming profession defies parody. First isOdd and leftPad, now this.

Seriously, if you can't install redis or something just like it, or just store a map as JSON in a file and read that, you can't call yourself a programmer.

1 comments

Hi, as a solo developer, I often need to save data through serverless functions. I'm not looking to set up and pay for a database, nor do I want to install an SDK and use NoSQL cloud services, especially for straightforward use cases like for ex "cron" scripts. I was searching for a simple and direct API call.

The concept of 'storing a map as JSON' in a serverless context usually translates to saving or reading a file in a bucket, like S3 or GCS, but then again, this brings us back to waste time installing and managing an SDK.

Got your point, and for larger projects, a more structured approach definitely makes sense. However, I often find myself needing something like this, so I went ahead and built it.

To each their own, I guess. I don't see how "serverless" makes any sense when you can set up a cloud instance for a few dollars a month, or free on AWS/GCP/Aurora with their free tiers. If you have even a tiny Raspberry Pi-scale cloud server you can serve APIs or web pages and store JSON files or run SQLite or Redis. And you will pay the same $0 - $7/mo regardless of API requests, unlike the serverless model where cost scales directly with traffic (leading to unpredictable bills every month).

I get that not everyone wants to install packages and SDKs or look up the two or three lines of code needed to save a file to S3. But if you do need real data storage, or everything a real server can provide, I think it's good to know how to do that. I think starting with serverless is like starting with instant microwave meals -- you get stuck with low-quality and high-cost food and never learn how to cook.