M
M
Michael2017-08-07 09:19:26
OOP
Michael, 2017-08-07 09:19:26

How to share application code in microservices?

There is a project that implements the logic of working with the database (repository).
There is a desire to divide the project into microservices (let's say 20 separate services).
How should feng shui work, only one project with a database or everyone can work in a database?
If everyone can, then chain the entire repository to each microservice? Or should each microservice have its own mini repository? If everyone has their own, and there are repeated requests, should they be repeated, or is this also taken out somehow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Volintsev, 2017-08-07
@copist

In short, the microservices architectural style is an approach in which a single application is built as a set of small services, each of which runs in its own process and communicates with the others using lightweight mechanisms, usually HTTP. These services are built around business needs and are deployed independently using a fully automated environment. There is an absolute minimum of centralized management of these services. By themselves, these services can be written in different languages ​​and use different data storage technologies.

https://habrahabr.ru/post/249183/
In general, they have different databases. Because there is non-contiguous data. If data needs to be stored in one place because of relationships, combine microservices. If data is needed for complex queries - make an intermediate aggregation service (data aggregation), data warehouse (data warehouse) or a consolidated reporting service (reporting service) - in general, a place where info from microbases merges and connects ( https://www.quora .com/How-is-reporting-implemented...
It is also possible to implement with one application (one repository) with 20 entry points and 20 applications (20 repositories).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question