I have two GCP serverless functions as below
- Courser Http function
- Assessment Http Function
The course has one to many relationships with assessment. One course can have multiple assessments. However they both have separate database, the assessment db contains the Id of course.
Architecture
In the front end when calling the assessment API http://localhost:8080/assesment/1234
the front-end should get the details of the course, which means the assessment function is dependent on course service.
I don’t want to make an HTTP synchronous call to the course service to get the details. In the container micro-service world, I would have created GRPC to communicate synchronously. However, this is a serverless application.
I am not sure what will be the best approach to communicate the request/response for FE/API. I was thinking about Backend For A Frontend (BFF). For for the API doc how it will work.
What’s the best approach to communicate where FE wants details from all the GCP-functions