That's an implementation decision that is not affected (and does not affect) by the overall design. If you already have Java REST code (and developers familiar with that), it may make sense to keep using that. Similarly with Node.js.
posted 1 month ago
Thanks. In case, it is not the case of existing REST APIs and the team has equally good skills for both Java and NodeJS then how should it be decided in such a case?
There are other factors you might want to consider. For example, node.js is its own separate server, whereas JAX-RS runs inside a servlet container. If you already have servlet containers running anyway, you may be able to use those to host the REST services as well. Or at the least you can leverage your knowledge of hosting servlet containers, if it has been decided that the REST services need their own server.
posted 1 month ago
Thanks. It will be like diverting from the question but does creating Node.js REST API come under serverless programming?
Tim Holloway wrote:I use NodeJS when I need a quick-and-dirty app where performance under load and security are not issues. For industrial apps, I use Java. Both have their places.
That quick and dirty may imply some background, that systems built with Node.js indeed are that. I recently started my MSc course, and having a module called Component Based Software Development, basically we use Node.js mainly there, and I didn't get an impression that we go dirty route, altough I see an ability to go down that way what you are saying.
So perhaps would be more correct to say, that quite a few misuse this technology?
Note: worth noting, that my knowledge of Node.js is fairly limited as of now.
For me, quick-and-dirty is a bit redundant, since computers pretty much conspire to ensure that anything that can be done in a hurry is littered with caltrops. But I still prefer the phrase, since it contains an explicit reminder that everything has its price.
One of the most commonly-used micro-services on my own LAN is a NodeJS program. I have a neat little device I built hanging on my kitchen wall near the door. It has an e-ink display and builtin WiFi node. Once a minute, it sends out a ReST request to an in-house server to get the time of day in minutes (e-ink is best when the display doesn't change too often). That server also runs a cron task at 4am each morning to the local National Weather Service node. Well, actually, it's national, but for my own locality. That task reads weather predictions and squashes them down to a 1-word verdict for the workday, which is then saved and repeated as needed. Also, the same micro-server contacts my home automation server to get the current outside temperature and the message-of-the-day.
Being persecuted doesn't in any way prove your righteousness or your beliefs. Many people get persecuted because they are repugnant or annoying. Or just because they can be.
It means our mission is in jeapordy! Quick, read this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop