Backend service worker reorganisation
Opened this issue · 0 comments
Lastuser is currently organised into Flask Blueprints. These are however insufficient for separation of concerns. The blueprints constitute a single app with unrestricted access to resources.
Lastuser should instead be divided into service workers. The core database models should be available via a GraphQL API. Features such as the notifications API (#114) should be service workers that offer their own HTTP interfaces (hosted under the same parent domain via Nginx, with distinct uwsgi workers). (However, this makes the single threaded debug server infeasible as it requires parts of the app to communicate with each other via the HTTP server, which will be blocked servicing an ongoing request.)
Service workers should have unrestricted database access without client tokens (#212) and should offer both HTTP and queue-based access (#173), allowing other workers and apps to submit jobs without waiting for an immediate response.