by chrismmay · 6y ago · 0 comments
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?
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.
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!
I've written some greasemonkey scripts for automating work-related tasks, and done some very basic editing for helping others with visual stuff. I've fixed some folks node code, but that was just reading docs and applying the few lines of change.
There are a lot of positions that never really touch js. My most recent project was working a lot with Chef, which is just ruby all the time.
It's hard to outweigh the advantage of using the same language in both the client and the server, and right now, JavaScript is the only universally practical choice on the client side, so it rules both sides now, in spite of all of node's and npm's problems. WebAssembly will loosen JavaScript's monopoly as it gradually matures, but right now all other languages but JavaScript are second-class citizens on the client side, and it will be that way for a while.
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)
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.
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.
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.