Vercel/fun: ƒun – Local serverless function λ development runtime
github.com
github.com
Now, of course not all lambdas must be pure... but as a whole, for the entire concept to be called "lambdas" and have the entire link just be it runs a single function seems weak. Like what about the `main` function? It's just co-opting the term lambda to sell PaaS.
What they are is an attempt at making a more basic environment to program around. They are essentially operating systems, no?
Anyway, sorry for the early morning rant on this.
It doesn't allow you to simulate a lambda function directly, but makes the assumption (that held so far) that all the different API's and runtimes usually come down to the same core principles (HTTP / Websocket / timed jobs).
The core idea is exactly around testing which approach works best for lambdas / functionless.
Disclaimer: The core maintainer and I haven't yet published the serverless adaptors. Also need to update the landing page, as the serverless/server switch is only one of the core principles.
EDIT: No, https://github.com/vercel/fun?tab=readme-ov-file#runtimes
That said, you can also just spin up a VPS and use systemd to manage a service at small scale. There are also other PaaS solutions in addition to "serverless/lambda".
I've heard some horror stories about "lambda" pricing as well, so I'd make sure to read into that before becoming too dependent.
I find that the tight integration with providers like Azure, AWS, or CloudFront can make switching between them a very costly upfront decision.
Another disadvantage of serverless is that it’s quite challenging to produce an on-premises or enterprise-ready codebase if the need suddenly arises.
So for example, uploading an image to s3 could trigger a job, or having them run in parallel on a job queue since they theoretically scale way better then spinning up lots of 'job processors' to deal with influx.
One of the most fringe but interesting usecases I'm aware of is it being suggested as part of co2 (and cost) reduction. The main idea is that since lambdas only run the exact amount of time needed, we don't continue running/reserving costly machine time. This is still something where research is being done and does mostly pass the responsibility to the infrastructure / PaaS solution though
The fundamental difference between functions-as-a-service and just deploying to a damn server is that you get the ability to scale very quickly.
Our app has a feature which is very demanding but used infrequently. We can split the workload and spin up dozens of lambdas instantly to provide acceptable response times. Wouldn't want to have a server over-provisioned to handle that amount of scale at all times.
All the other purported benefits (e.g. you can plug Lambda into S3 events) are just ways to do vendor lockin to yourself. And the ops-less-ness is cool but also you could deploy to a container platform for that.