I look at whether I need a quick prototype or a long term solution. I find it is much quicker to hack a web based prototype in NodeJS as compared to Java. Also, what kind of UI do we need, most of the times it's a web/javascript based UI then the choice is NodeJS because of seamless data transfer using JSON, other times the backend doesn't necessarily have to talk a lot with UI like Batch jobs and I prefer Java. If I am going to need a lot of CPU intensive jobs where manually spawning multiple threads can be beneficial I would go for Java, NodeJS will not be very beneficial in that case. Other than that it comes to features each language provides, like rich and robust concurrent and collections library of Java. Similarly if a lot of data analysis is required python is a clear choice of many, again because of the rich data analysis libraries.