Link to Video

Functional Requirements :

How to store images ?

Should we store images as file or Blob (Binary Large Object).

Some features that databases provide :

Static images so build a CDN (Content Discovery Network), fast retrieval. The file url will be stored in distributed file systems.

Architecture

Registration

User sends request to profile service for registration. But if you have other services, when user sends request to them, user needs to be authenticated again. This means that a lot of duplicated code for oauth. A way to avoid this is by using gateways.

Noone talks to client except the gateways. It just takes the request from client and asks profile service if it should serve the request. If yes , then it redirects the request to the correct service. This is decoupling the systems.

Images

Have a separate image service for storing images. This service will have a distributed file system, a database for storing image url and ID. Direct Messaging