Some time ago we had contact with Grails 1, and found it great to create web apps quickly. So time has passed, started a new application using Grails 2. Two years later and after recently migrating from grails 2 to 3, we're feeling the app can't handle itself anymore with its more than 600k lines of code, a memory footprint of ~1.7GB and a horrendous startup time (1~2m on server, even worse at my dev desktop).
Some of our secondary applications are written in JavaScript, like reports, telemetry and internal monitoring. And we are surprised with NodeJS memory footprint (around 100~120MB) and startup speed.
So, given the age of NodeJS (not a recent tech), the IDEs who support the language (Netbeans, IntelliJ...), number of libraries it has and general trends, can it be a viable solution to migrate the main application to NodeJS?
p.s.: Our starting plan is migrating in parts, using microservices, for example. the frontend would be the last one to be decommissioned.
p.s.2: We tried to minimize those simptoms, like remove some dependencies and optimize code, but we reached a point where it's too much effort for little gain.
Feel free to ask if something important is missing here
NodeJS is production ready, but also have a look at Elixir (Phoenix), golang, and Crystal if a small memory footprint is really important for specific microservices. How sure are you of your strategy to convert 600k lines of code to NodeJS without bringing the 1.7GB memory footprint with it? Fair warning about rewrites, they can take unpredictably long durations of time. Is each microservice reducing the size of the grails monolith (things that must be compiled, loaded, intellisensed, etc.)? Can you build the services without making local dev a nightmare to setup? Can you convert the Grails to API only and have a NodeJS render the HTML templates via nextjs or nuxtjs? Best of luck!
I think NodeJS would be a great choice; it has a great community, continued development, and is used by a lot of big companies.
Atul Sharma
Full Stack Developer | Cloud Native Applications
No doubt node js is production grade but most of the supporting tools are not. ( Tools for logging , monitoring, microservices discovery, routing etc.. although penalty of tools are available from different third parties but, not tested for stability or production grade setups.
You need to hit n try certain tools for same purpose before finalizing any.
Many companies are using Nodejs in production and successfully managing their application. Like LinkedIn , HashNode, some part of PayPal etc.. )
If you are rewriting your entire code base and want to follow microservices approach. I recommend you to have a look at spring boot and spring cloud ( Java) . They are using Netflix OSS components and provide integration and solution for everything needed to develop cloud native applications.