2. (New) New Services - sebas0163/My_RESTaurante GitHub Wiki

Updated Architecture

MyRESTaurant comprises five services intricately interconnected through direct HTTP Requests, and with an external interface of HTTPS to be connected with the frontend.

The frontend service resides within a container, communicating with the BackendCore via HTTPS requests, while the remaining services are hosted within a kubernetes environment using minikube. Utilizing HTTP, the BackendCore acts an API Gateway with the other components. It interfaces with every other microservice via internal HTTP requests.

Captura de pantalla 2024-06-09 a la(s) 10 20 15

Service Language Description
Frontend Javascript It exposes an HTTP server to handle requests on the website, allowing functionalities for all users to view the apps functionalities. It enables reservation functionality for logged-in users and user and reservation management for administrators.
BackendCore (Updated) Javascript It's the API responsible for receiving HTTPS requests from the frontend and calling other services, via internal HTTP, to obtain the desired response.
FoodCore (Repurposed) Javascript Retrieves the restaurant menu, gives food recommendations depending on the user order
TimeCore (Repurposed) Javascript Retrieves available time to make a reservation in the restaurant
ReservationCore (Repurposed) Javascript Allows logged users to make reservations to the restaurant and admins are allowed to delete or change them
UserCore (Repurposed) Javascript Handles all user management. Allow users to create an account, log in, change password, delete account and admins to delete users

The image below illustrates the components associated with each service. The core functionality of FoodCore, UserCore, TimeCore, and ReservationCore services revolves around a central file, serving as the PubSub entry point. These files employ a database controller to fetch required information from Firebase database and subsequently generate the necessary responses. In contrast, the backend service features a routing component responsible for managing frontend requests, along with individual controllers for each service. These controllers dispatch messages to their respective URIs, triggering the corresponding functions. In order to transform these previously SOA services into microservices we removed the message bus and directly connected every microservice to the API gateway (BackendCore), this also involved making each microservice individually deployable by adding a routing component similar to, but simpler than, the main one present in BackendCore. Diagramas Proyecto2 SOA Microarchitecture