3 ms·
As ever, looking at some extreme examples can be instructive. Imagine you have no infrastructure at all, and there's only a single function you need to run. In
by aidos 9y ago
As ever, looking at some extreme examples can be instructive.
Imagine you have no infrastructure at all, and there's only a single function you need to run. In my case, I have a function that takes a file and produces a file and can take 5 minutes to an hour to run. The warm up time doesn't matter then. If I could just write one big old python function to do all the work and then push it to someone else so I can run as many instances of that function as required then that's a very different mental model from dealing with all the setup required to host that function myself.
There are other tasks too, where you just have some one off admin function (maybe some monitoring thing) where it's a pain to build all the infrastructure around it just to run it.
You're right though, it really doesn't matter what you use - you have to understand what's going on.
For reference, I don't use any serverless stuff in my stack — though I can see where the uses lie and could definitely imagine building for what they offer in some cases. It's a useful tool to have available, but not the only one you should reach for.
One of the best environments I ever used was PiCloud. We used to farm out our long running functions to them. Within your code you could say something like, run_fn_on_picloud(fn, args) and they would ship your code into their environment and execute it. It was absolutely wonderful and you could just fan out as much as required.