• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Is there any scenario when we should go for NodeJS REST API instead of Java REST API?

 
Ranch Hand
Posts: 1172
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can build REST api using Java and we can build using NodeJS too. Is there any scenario when we should go for NodeJS REST API instead of Java REST API?
Thanks
 
Saloon Keeper
Posts: 5765
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monica Shiralkar
Ranch Hand
Posts: 1172
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Tim Moores
Saloon Keeper
Posts: 5765
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monica Shiralkar
Ranch Hand
Posts: 1172
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. It will be like diverting from the question but does creating Node.js REST API come under serverless programming?
 
Tim Moores
Saloon Keeper
Posts: 5765
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Node.js is very much a server, just like any servlet container.
 
Monica Shiralkar
Ranch Hand
Posts: 1172
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You
 
Saloon Keeper
Posts: 2679
335
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Monica Shiralkar wrote:... does creating Node.js REST API come under serverless programming?


Do you mean serverless computing - where the application is executed in a (third-party) cloud environment?
 
Monica Shiralkar
Ranch Hand
Posts: 1172
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I meant serverless computing. I have seen that in cloud. But node.js definitely has server.
 
Ron McLeod
Saloon Keeper
Posts: 2679
335
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that context, the server refers to the computing platform, not the role in a client-server architecture.
 
Bras cause cancer. And tiny ads:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!