The choice between Python and Java when it comes to web development is both intriguing and interesting. Former is a dynamic, interpreted and a more "English like" programming language which feels like a breeze while coding and latter is a statically typed, compiled and a bit more "discipline oriented" language which boasts of more bare metal performance (at least in theory).
In an ideal world where hardware costs are negligible and developer productivity is the only (or major) criteria for choosing a language, Python should always win. But that's already happening now, isn't it!
If you look at the TIOBE popularity stats for May, 2021, it seems as though there is a cut-throat competition between Python and Java with Python at 11.87 and Java at 11.74 rating. If these stats are to be believed, both Java and Python are equally preferred out in the wild.
But I don't think that's really happening, at least not in the open source web development world. Python frameworks like Django and Flask are not only ubiquitous among startups and mid sized businesses, you also stumble upon their proponents and problem solvers every now and then in places like Stack Overflow, Reddit and even Dev.TO. It never takes a long time to find an expert helping hand if you come across a problem in any of the popular open source python libraries.
And while the Java enthusiasts keep talking about how mind blowing their spring-boot framework is, I'm not seeing a lot of takers for it at least in the FOSS spectrum. None of the popular online social media platforms like Reddit, Quora, Tildes, etc. use Java, they are all based on a Python or PHP framework.
Now it might well be the case that a good number of humble and creative Java engineers are running lots of cool stuff like Spring-boot behind the closed walls of those corporate enterprises but how are we supposed to know about that, right!
Indeed, if the performance advantage of Java is taken into consideration for a moment, there ought to be lots of stuff running in the open source spectrum as Java is open source too. Granted that its a bit verbose and the number of classes and interfaces you write may increase drastically with the app size but that's no big deal in the long run if your AWS bills also come down due to better performance, isn't it?
Are there any known benchmarks or studies done on any AWS or Linode instances regarding which language performs better at the same level of scaling (like # of web requests per second for example)? If there are, it will be interesting to see their results!