dimanche 2 décembre 2018

How to link the related data in the separate RDBMS databases of the micro-services in a typical micro-services architecture?

Let us say that I am designing an e learning portal where in a user can choose the courses he wishes to take and then do the payment online and then he/ she can use the courses.So I have modules like 1) Courses 2) Payments 3) User management. I choose to design 3 separate microservices i.e. a) Courses b) Payments and c) User management based on the domain. Now if this system was a monolith then we could have used a foreign key and would have linked the user , courses and payments tables for relating the data. Now since these 3 are different micro-services and will have its own databases, then how is the data linked together? i.e. If I want to relate that a particular user 'X' has enrolled to 'A','B','C' courses?

Aucun commentaire:

Enregistrer un commentaire