Hi nadeem,
As Ci-Ci wrote there is no perfect way.
In general a microservice is responsible for a business capability or concept. E.g. customers, orders, products, etc. It makes sense to use the database per service pattern. This allows the service to keep full control over its data and prevents the possible temptation of not only reading, but also writing data maintained via other services.
Other services can still access the data, but instead of directly accessing the database a direct protocol (e.g. api via http, grpc, etc.) could also support the possibility to access data from other microservices.
Of course this would still mean the services depend on each other. To handle this you could also choose to keep local abstractions of data maintained by other services. E.g. the order service keeps copies of product descriptions and prices maintained by the product service. Subscribing to events from the product service the local data can be kept up-to-date.
HTH. Cheers,
Peter
Op woensdag 26 februari 2020 07:10:00 UTC+1 schreef nadeem qasmi: