Project Design Discussion

Project  Design Discussion

Is this a good requirement that we are taking?

2 Types of requirements

  1. Functional - Major features of application

  2. Non-Functional - Tells what is the expectation of overall infrastructure Every service is going to be a different server altogether. We are going to have diff express application for every service

Inside API gateway, we have reverse proxies. This API gateway is responsible for taking request from frontend through load balancer & it will resolve the request.

Usecases of API Gateway

  • Frontend request are going to be accumulated here & then API gateway is internally going to forward request to the service

  • You don't have to hard-code the IP address or socket address of every service on the front-end. So front-end just knows about 1 server & that server internally routes all the request.

  • It can act as an authentication service also. In API gateway you can add your authentication logic & if a request is expected to be authenticated first, you can authenticate it directly.

  • Apart from that there can be a case that mobile frontend sends you a request that "I want to cancel this booking". For that you need to go to booking service & fetch details of user booking . Once booking service gives you details of user booking, then you need to check in search service if it is modifiable.

We are doing authentication on API gateway. It's going to act as reverse proxy. It can also contain rate limiter.

Booking service is going to publish a bunch of messages in message queues. These message queues are going to collect the request from a particular service & keep it with themselves. Reminder service is going to subscribe to these messages from message queues.

CRON jobs are simple jobs you can configure in your OS. You can setup some scripts

What we will do next?

How exactly services work?
How to make them communicate within each other?
How REST API's are made to communicate? How you efficiently optimize using RPCs?
Pub Sub Architectures?
CRONs?
Caches?