I'm pretty new to Micro services architecture and trying to learn my way through them and we have a big monolithic application and as a company we want to move towards Micro Services Architecture for easier maintenance and deployments. In the process of that, we are doing a POC for the same. I have a couple of queries on Data replication and design of endpoints.
Lets say we have 3 Micro services for Movies-
- movie-catalog-service - This maintains the movie catalog with movie_id as primary key. Movie Name, description and availability as other attributes.
- movie-rating-service - This maintains the movie rating with movie_id as primary key. Movie Name and rating as other attributes.
- movie-service - This is the service which calls the above two services to build an movie model which is a combination of movie catalog and movie rating.
In the above approach, I have a couple of queries.
- Do the first two services endpoints be exposes to the UI for CURD operations on movie-catalog and movie-rating. Or Only the Endpoints for 3rd service be exposed for CRUD, which in turn calls the first 2 services to perform the necessary operations.
- Does the 3rd service need its own data base which acts as an Entity with combination of entities from first two services. Doesn't it cause data duplication.
- Or the Approach should be the 3rd service is not at all required and UI combines or splits the data to call the first 2 services independently for CRUD operations.