Needs advice
on
NestJSNestJS
and
Spring BootSpring Boot
in

I am currently planning to build a project from scratch. I will be using Angular as front-end framework, but for the back-end I am not sure which framework to use between Spring Boot and NestJS. I have worked with Spring Boot before, but my new project contains a lot of I/O operations, in fact it will show a daily report. I thought about the new Spring Web Reactive Framework but given the idea that Node.js is the most popular on handling non blocking I/O I am planning to start learning NestJS since it is based on Angular philosophy and TypeScript which I am familiar with. Looking forward to hear from you dear Community.

READ LESS
7 upvotes·862.6K views
Replies (2)
Recommends
on
Kotlin

Node.js has only 1 real thread per process; Java JIT will mostly run faster than JS one; So if it happens to be not only I/O... Why do you need most popular, not simply popular? Does Node.js have tech advantages?

READ MORE
4 upvotes·2 comments·655.9K views
Slimane Deb
Slimane Deb
·
July 16th 2020 at 12:58AM

In fact, it will be mostly I/O operations, since I don't have a clear overview of what Spring 5 Reactive Framework, I think I would go for node. Did you happen to work with spring boot + mongodb ?

·
Reply
Sergei Kirjanov
Sergei Kirjanov
·
July 17th 2020 at 9:57PM

1) No, I have not used either spring boot or mongodb.

But I used JVM with dozens cpu cores busy cooperating tightly with each other, and Node will not give me such option.

Say me, if Node ecosystem can give anything, that JVM can not.

2) In MongoDB, a write operation is atomic on the level of a single document, so it's harder to deal with consistency without transactions.

So I'll need a very good reason to start using such system. What is Your reason?

·
Reply
Recommends
on
NestJS

NestJS is an excellent framework (they both are). I would say the fact that you're working with Angular makes NestJS a great match, unless you're splitting front and back end between developers. But even in that case I would still go with NestJS for a new project.

Regarding the single threading point, take a look at PM2 which helps to run Node in multiple processes (we use it with NestJS) https://pm2.keymetrics.io/docs/usage/cluster-mode/

Also regarding web server performance in general this is an interesting post showing how Node with outperform Java in a web situation (be careful though, best to check a few posts to make sure these aren't totally biased benchmarks!): https://www.tandemseven.com/blog/performance-java-vs-node/

READ MORE
8 upvotes·1 comment·655.7K views
Slimane Deb
Slimane Deb
·
July 16th 2020 at 12:59AM

Thank you for passing by. Those are some great resources. I will check them and setup my mind.

·
Reply
Avatar of Sergei Kirjanov