This PR provides a first implementation of splitting the backend into several components, which can be enabled together on a single service, leading to a monolith-like deployment; or enabled separately into several deployments, leading to a microservices-like deployment.
The following groups of API endpoints have been defined:
Recommendations
/api/pizza
Copy
/api/names
/api/quotes
/api/adjectives
Catalog
/api/ingredients/*
/api/doughs
/api/tools
/api/internal/recommendations (GET and POST)
/api/login (WIP, may not end here)
Websockets
/ws
Frontend
/ (Static Svelte files)
Additionaly, a homemade gateway has been developed. This gateway is automatically enabled together with the Frontend service if the application is deployed using microservices, and allows users to reach services other than the frontend from the browser.
Each of this groups can be deployed as a separate service, or arbitrarily together.
API groups (or services) communicate with each other using HTTP calls, e.g. the Recommendations service queries Catalog for the ingredients list and Copy for names and adjectives. It also POSTs recommendations to the catalog once served. These HTTP requests will take place even if the application is deployed as a single service, meaning the service will query itself. This allows keeping the code simple.
This PR provides a first implementation of splitting the backend into several components, which can be enabled together on a single service, leading to a monolith-like deployment; or enabled separately into several deployments, leading to a microservices-like deployment.
The following groups of API endpoints have been defined:
/api/pizza
/api/names
/api/quotes
/api/adjectives
/api/ingredients/*
/api/doughs
/api/tools
/api/internal/recommendations
(GET and POST)/api/login
(WIP, may not end here)/ws
/
(Static Svelte files)Additionaly, a homemade gateway has been developed. This gateway is automatically enabled together with the Frontend service if the application is deployed using microservices, and allows users to reach services other than the frontend from the browser.
Each of this groups can be deployed as a separate service, or arbitrarily together.
API groups (or services) communicate with each other using HTTP calls, e.g. the Recommendations service queries Catalog for the ingredients list and Copy for names and adjectives. It also POSTs recommendations to the catalog once served. These HTTP requests will take place even if the application is deployed as a single service, meaning the service will query itself. This allows keeping the code simple.
Remaining work:
Distributed tracing, yay!