M
M
Mikhail Ivanov2017-07-25 23:40:52
Software design
Mikhail Ivanov, 2017-07-25 23:40:52

Question about microservices?

I recently read a couple of articles on microservices. If I understand correctly, a microservice is a small library responsible for some feature in an application.
Let's say we have an application that stores information about cars. We can make the following services: one for working with information about cars, the second for working with information about the parts from which cars are assembled. Each service can store its data in different databases.
The question arises: what if in the main application we need to find cars containing some kind of detail?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lubezniy, 2017-07-26
@lubezniy

A microservice is, rather, not a library, but an autonomous (keyword!) small module that performs some functions. And it is done in such a way that it can be freely transferred not only to another database, but even to other equipment, changing only the connection settings with other parts of the application for this. Or scale if you use several servers at the same time - each with its own microservice instance. When designing a microservice architecture, it is necessary to describe in detail the connections between modules (including microservices) and the transmitted information - up to the complete exchange protocol.
According to your description, the use of microservice architecture can hardly be considered reasonable. The SQL server will deal with the selection of data from related tables in any way better than a self-made architecture. And it is quite possible to scale with high attendance with a regular cluster with a load balancer, data (they are relatively rarely updated?) At the same time, transfer through replication or simply scripted deployment of changes to the database across all servers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question