V
V
Vitaly Pasyuta2015-03-22 18:15:17
Node.js
Vitaly Pasyuta, 2015-03-22 18:15:17

Microservice architecture in nodejs?

Greetings. I decided to rewrite the old monolithic application on the node for an application using microservice architecture. But unfortunately I have no experience in building such. The Internet is full of information about microsevrises (Martin Fowler's article), but, alas, there is nothing applicable to the node. At the last meeting of nodejs programmers in Kyiv, this issue was raised, but in a nutshell. Can someone share their experience, maybe useful links / articles and I will be very grateful for examples. Thanks

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
Timur Shemsedinov, 2015-03-23
@pasutavitaliy

I would not contrast monolithic applications and microservices. In fact, the better the application is divided into parts, the better it is centralized. First, I will give an everyday example, if each employee autonomously performs the work assigned to him well and efficiently, then the interaction between employees is reduced, the time spent on monitoring and redoing work is reduced, while the solidity of hierarchical structures is strengthened the more autonomous each employee in the organization. What to oppose, what is bad? It’s bad to mix abstraction levels, it’s common in a node to mix everything together, I gave an example here: habrahabr.ru/post/247543 I quote:
Monolith is not bad. It is bad when layers of abstraction are mixed, if this is not understood, then microservices will not give anything. This results in highly coupled code, with each piece dependent on many others. Inside each microservice, you can make a complete mess of abstractions. It is better to plan the architecture in layers, below - system layers, above - applied ones. Sometimes you need 2, sometimes 3, sometimes more. In each module, of course, you will have at least: an external interface (containing external calls and specifications of data formats for exchange), internal logic and internal data structures. The task of the architect is to make sure that the module interface shields the internal data structures and internal logic from dependencies. At the same time, it is not necessary to divide the application into hundreds of processes,

S
Sergey, 2015-03-22
Protko @Fesor

well.... write a bunch of services - an authorization server, some other stuff... divide everything into functional modules, connect everything together with a data bus on zeromq, for example, and profit.

Y
Yuri Shikanov, 2015-03-22
@dizballanze

As for me, the microservice architecture is the most correct approach for serious development on Node.js. Maintaining a monolithic application on Node.js is hell, otherwise it's easier to find errors, it's easier to scale the application, to support it.
In terms of implementation, everything is quite simple here, you divide your application into structural parts and implement it as separate microservices (surprise !!) that communicate through something like Rabbitmq.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question