Answer the question
In order to leave comments, you need to log in
How to synchronize the DB model between microservices?
So, there is a modela.py file where the table models are stored in the database. There are several microservices that use these models. The question is how, when the model was changed, synchronization between mikooseovis occurred. Despite the fact that they are on different servers, and the code base is in different repositories.
Answer the question
In order to leave comments, you need to log in
Combine the data access logic into a separate module and move it to another repository.
I don’t know what is in python, but php has private composer packages, and nodejs has private npm packages. I bet it should be the same
With microservices, as far as I can see it: 1bd for all tables, for each table you have 1 repository, 1 table, 1 model in the application describing this table, 1 resource. Of course, all repositories are private.
Before all this zoo from a heap of services, put api gateway.
How you will link data between these tables - no idea. You can do this manually, instead of a database, you can move all models to 1 repository, and install it in the necessary services.
I thought that it was necessary to live up to microservices, then there would be no such questions, or that someone in the team had experience in setting up this zoo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question