7 ms·
For a long time it was fashionable to write server side java using POJOs and Spring running in Tomcat or Jetty, and you could get very far just being very good
by chrismmay 7y ago
For a long time it was fashionable to write server side java using POJOs and Spring running in Tomcat or Jetty, and you could get very far just being very good at Java and Spring. You still can.
With the advent and surging popularity of multiple server-side alternatives to Java such as Javascript via Node.js, Python, Go, and others, Java is now viewed as "slow to startup" in comparison and therefore less suitable for cloud-scale deployments that must spin-up instances very quickly to handle the massive bursts of traffic that cloud-scale platforms have been designed to service.
I'm curious what people think is the best alternative to Java for cloud-scale deployments. Javascript - ala Node.js? Python? Go? Something else entirely?
- true_religion 7y agoJava isn’t that slow. I have multi gigabyte installs that take 5 seconds to load up. 5 seconds isn’t make or break territory when it comes to scaling a deployment.
- chrismmay 7y agoI agree with you, but 5 seconds is a noticeable lag that I would like to avoid if possible, since I have the option to choose the language I use. I've been writing java for more than 20 years so I would love to continue to use Java, and I think it's actually likely that upcoming versions of Java will fix this, but I want to make the best decision here, not the most comfortable one.
- Scarbutt 7y agoYou must be fun at parties.
- chrismmay 7y agoThank you for your informative reply. I will try to be more entertaining in the future if it pleases your highness.
- dang 7y agoPlease don't respond to a bad comment with another, even when provoked. That only makes the thread worse. Instead, the site guidelines ask you to flag it, or email hn@ycombinator.com in egregious cases. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- dang 7y agoWe've asked you repeatedly not to do personal attacks on HN. If you keep doing it, we're going to ban you. I don't want to ban you, so would you please review https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and fix this?
- twic 7y agoI have Java apps that are up and running in well under a second. It's reflection-heavy frameworks that drag out the startup - avoid those, and Java can be pretty quick. Maybe never quick enough to use in a CGI style environment, or for command-line tools you want to call from a loop in a script (at least, without AOT). But plenty quick enough for any normal server-side use.
- chucky_z 7y agoI believe Go is eating Java currently. If you look at companies they're all quite different though. Apple uses a lot of languages. Google uses a lot of C++. Facebook is a combination of things, but AFAIK their main platform is still written in Hack. Netflix is probably still mostly Java. Uber is Python + Go. I honestly think Java is going to come back in fashion at some point after all the recent updates, along with all the newer JVM languages ala Scala, Clojure, and Kotlin. If you're asking this for "what language should I learn?" I think knowing anything typed + Python is an extremely strong combo.
- chrismmay 7y agoThanks for your reply. I think I agree somewhat with the article regarding the Novice Trap. I can learn them all, but I probably can't master them all, and it's probably a waste of time to try to. I think we are in the midst of a paradigm shift and it's not clear who the real winner is yet in terms of programming languages. I currently have the fairly unique opportunity of choosing pretty much everything about how I build the systems I'm working on, and so I'm looking for input as to which way to go. I'd like my choice to be the one that will be viewed as "the winner" 5 years from now.
- holoduke 7y agoIn my opinion the minimum toolset needed to practically overcomes most usecases and give you a gigantic pool of career oppertunities are: c(++), java, python, Javascript and bash. With those there is nothing you cannot do. From web to direct hardware programming.
- prox 7y agoI’ve been working with ‘unfashionable’ php for quite a while, and I love it. I can create most things clients ask for. Thing is it is mostly a web/server language: talk to client, talk to db etc. Recently I’ve been installing Python and I really like it, as it less server oriented and more computing oriented, and it has been a lot of fun. I think enjoying the journey learning a new language is also important!
- DonHopkins 7y agoThese days I don't think you can get away with not knowing JavaScript, unless your thing is pretending to be a luddite, in which case you shouldn't actually be using computers if you're actually a luddite.
- itronitron 7y agoThere was a discussion last week comparing Go to Java for short lived processes... https://news.ycombinator.com/item?id=21871645 https://news.ycombinator.com/item?id=21871645 I have had a lot of success using Node.js as the middle layer to route requests to a running JVM for all the computational work.
- chrismmay 7y agoThanks for this, it's inspired me to simply do some benchmarking to reach my own conclusion.
- bernawil 7y agoIt's the concurrency model. The industry has decided threads just don't scale and it's doing away with the two most popular languages that rely on multithreading (Java and C#) and favoring NodeJs (event loop), Go (goroutines) and I guess Elixir (I'm not sure what really is the concurrency model, I guess the actor model somehow).
- chrismmay 7y agoThanks for clarifying. This really is a paradigm shift that is happening "under our noses" so-to-speak. I don't want to be the guy who designed his new system using a technology stack that's been shunned.
- ak39 7y agoThreads may not scale, but thread pools can. And that concept has been in Java and C# for a long time. I agree with your point about the industry now favouring the event loop model of concurrent programming. I know C# has introduced recently async/await syntax to match the idiomatics of JS (probably to appeal to JS-comfortable devs) ... but the concept of built in event queues is still not supported. (I may be mistaken as I only read a bit about this feature of C# in late 2017)
- bernawil 7y agoI think these languages are thriving in the cloud because they not only have a favored concurrency model, they have it mandatorily and so they spun a cohesive ecosystem. Take Java for example. You can make an event loop and use it on a web server (Play framework is just that). It doesn't mean you can retrofit all dependencies to do the same. It also doesn't mean business logic inside this server will necessarily use one instead of spinning up os threads nor that it can even plug into the same event loop. And it also means you just introduced opposing views into your ecosystem.
- cutler 7y ago"The industry has decided ..."? Which industry is that? Judging by the vacancies on Indeed.co.uk there are an order of magnitude more opportunities for Java/C# developers than those using Node.js or Go. As for Elixir I think it's fair to say that the industry has largely ignored it.
- magicbuzz 7y agoI don’t think the term POJOs is used anywhere outside the Java community.
- chrismmay 7y agoYou're absolutely right there. "Plain Old Java Objects" - POJOs as opposed to "Enterprise Java Beans" EJBs.
- DonHopkins 7y agoThere's POCOs, of course. https://en.wikipedia.org/wiki/Plain_old_CLR_object https://en.wikipedia.org/wiki/Plain_old_CLR_object