본문 바로가기
Node js/Nest js

About "nest js" based on past experience

by Bill Lab 2024. 8. 21.
728x90

"One of great framework that has been used by many node developers in South Korea since around 2020"

I am currently mentoring junior developers to give inforamtion how to utilize nest js into their service. It will be finished soon, but I would like to talk about the good point for now from nest js and the improvement point to be developed from nest js.

As one of the feature of nest js microserivce, it provides example code for Kafka. However, the consumer group id setting code is located in module setting. So, it is difficult to control the kafka consumer group ID with method annotations and to split the consumer group into more details.

In addition, there is no function to obtain a distribution lock based on redis pub sub like Redisson and I wonder what it would have been like if development had been done in the nest or npm.

In the MSA support area, I found that the development complexity increased relatively because the event processing using AMQP was handlled between main server and micro server rather than application gateway with AMQP for data communication among micro services.

I want to develop the npm myself, but right now, I'm focusing on developing service in current company with RAG and LLM opensource, so it's relatively difficult to make time. (Maybe excuse, but I'd like to try it if I get the chance in the future.)

Of course, there are many great parts that are very helpful. When developing the backend server, I made all layers referenced through DI, and by gathering several npms together, I was able to develop most rest APIs, graphql, socket servers, etc. with just nest settings. Support for CQRS, event processing, saga based on rxjs allows developers who are not familiar with rxjs to easily configure EDA architecture and I think there are great advantages that the overall structure is similar to spring and angular, making it easy for previous developers to learn.

I feel a little sorry for posting this without any contribution and donation, but nest js is one of the means to access node js faster and more conveniently.

728x90