4 ms·
Ehm, what's the point in running serverless on a (single) server? How is that different from writing an API with something like express or flask?
by glutamate 6y ago
Ehm, what's the point in running serverless on a (single) server? How is that different from writing an API with something like express or flask?
- ForHackernews 6y agoYou don't have to keep it running in memory all the time. If you have a small device with limited resources, maybe you'd rather have it be ready to potentially do many different things for you infrequently, as opposed to doing fewer things continuously all the time.
- glutamate 6y agoOk, that's a fair point. So maybe some serverless tech can be more specialised and thus better than the Linux kernel at managing, effectively, virtual memory. If everything is written in-house I still think any API would be simpler but I guess this way some functions can be supplied by vendors/open-source which currently cannot be composed into an e.g. flask API. So it would be nice to have a way of composing APIs from simple functions supplied in packages for this use. I guess that is what serverless is.
- BiteCode_dev 6y agoIsn't that the OS job? It was my understanding that the kernel would put idle process to sleep, and even put the memory it uses from ram to disk and wake it up if there is some input to it.
- m463 6y agoI was taught in school "The job of an operating system is to share resources" so yes.
- ForHackernews 6y agoHow would the OS know that web server process is "idle" vs "ready to accept requests"?
- BiteCode_dev 6y agoNot sure, socket binding ?
- alexellisuk 6y agoRead the introduction and conclusion for usecases. Self-hosted FaaS gives a "serverless" hands-off experience, whilst making packaging and operating flask, Go, Node, Express, CSharp, etc, etc trivial. Try it, see what you think.