2 ms·
Serverless apps should be stateless but should work in conjunction with stateful apps. Unlike Heroku, Cloud Foundry, OpenShift, and other traditional PaaSes foc
by osipov 10y ago
Serverless apps should be stateless but should work in conjunction with stateful apps. Unlike Heroku, Cloud Foundry, OpenShift, and other traditional PaaSes focused on supporting long running applications and services, serverless frameworks offer a new kind of a platform for running short lived processes and functions, also called microflows.
The distinction between the long running processes and microflows is subtle but important. When started, long running processes wait for an input, execute some code when an input is received, and then continue waiting. In contrast, microflows are started once an input is received, and are terminated by the platform after the code in the microflow finishes executing. One way to describe microflows is to say that they are reactive, in the sense that they react to the incoming data.
- icebraining 10y agoBut how is this different from coding in, say, Django? In Django you write a "view", which is just a Python function that is started when an HTTP request is received, and terminates by returning an HTTP response object. Then there are models, but these are just a translation layer between the Database and the view function, they don't keep state either. I don't see how a Django view isn't a "microflow". It seems to me that the architecture is exactly the same, it's just that you don't get to choose the web framework.