Definitions
- Stateless - In the scope of the FOLIO back-end modules it means that neither session information nor business flow-related data is retained in the memory or other persistence mechanism managed by the module. Relevant data is sent to the module by the client in such a way that every HTTP request can be understood and handled in isolation without context information from previous or simultaneous requests. There is nothing that leads to the dependence of one HTTP request on another except the content of the database. This does not apply to any sort of soft data (caches) that can be easily read from the persistent storage.
- Horizontal scaling - it means that adding more instances of a particular module to (or removing redundant instances from) the deployed FOLIO platform does not affect, break, or disrupt existing business flows or user sessions in any way.
Requirements for the FOLIO back-end modules
All back-end modules must follow the stateless requirement as it is described in the “Definitions” section. It will guarantee that horizontal scaling, as it is described in the “Definitions” sections, can be supported without issues.
Special cases
- If a business flow requires file uploading functionality or any other interactions with files or any other kinds of persistent objects the acceptable solution for that must be worked out and discussed further and results must be reflected on this page.
- If a business flow requires preserving some intermediate state between HTTP requests or any other "session like" features the database must be used as the storage. Developers must take care of freeing up resources when they are no longer needed (deleting obsolete rows from tables).
- A good alternative here could be introducing a distributed in-memory storage to the FOLIO platform to support and speed up such cases.