Magnus Rinnan Gaarder
2 min readOct 30, 2018

--

That’s really interesting Slobodan, I had not looked into the Serverless application repository before. Thanks for the pointer.

The more I dig into this, the more I see that it is really just about cost. Databases (like CosmosDB) are not serverless per se, unless you mean that they are serverless in their cost structure by virtue of being pay-per-use. Typically we can use a serverless offering like Lambda or Functions to communicate with the database, but the database itself is not serverless to my understanding.

We have always been able to communicate with APIs from our apps though, that’s just a question of the API provider offering the right interface. It does not matter if we communicate via our Express.js driven backend or from a Serverless backend. In fact, serverless.js (the framework), recommend using Functions or lambda with one route to a handler js file which still runs express with all the typical routes and code you would otherwise use. Thus, moving from a typical serverful node.js backend run on express to a serverless platform, simply means paying for serverless (Lambda, Functions, or similar), seize to pay for PaaS (App Service, Beanstalk or similar) and having Lambda use express as the handler. It implies minimal changes to the actual code.

In other words, it seems to me that the only real difference between PaaS and serverless is cost. Both are fully managed (more or less), both operate the same way after receiving messages / triggers (i.e. the same actions can be run equally from both systems, like communicating with databases or other APIs).

All the best,

M

--

--

Magnus Rinnan Gaarder

Venture Capitalist, Political Enthusiast, Hobby Psychologist, Nature Lover and Lifelong Learner