Needs advice
on
Spring Boot
and
NestJS
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 upvotes226.8K views
Replies (2)
Recommends
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
3 upvotes2 comments145.7K 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
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 upvotes1 comment145.5K 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