Hacker News new | ask | show | jobs
by murz 4416 days ago
> Also, for those who are using Java, where do you host your application/service?

Heroku, EC2 (or Elastic Beanstalk) and Google AppEngine are all pretty good choices if you ask me. For side projects I usually just throw them up on Heroku, but I'll use EC2 for more sophisticated deployments.

> Django/RoR or Flask/Sinatra have their niches - what are good reasons for a solo developer or small team to look outside Python, Ruby or PHP?

I'm struggling to come up with an answer to this topic. To be honest, I think you'll be fine with whatever tool you choose and I think you should just use whatever is most comfortable for you. That said, some scenarios where it might make sense to use Java (or another JVM language) over Django/RoR include:

(1) This doesn't matter for most applications (and isn't necessarily true for all applications), but if you are expecting a lot of load you will likely get more throughput out of the JVM (see how the Java platforms compare to Ruby and Python ones in this benchmark: http://www.techempower.com/benchmarks/) and you will probably be able to handle more traffic with fewer machines (Twitter reportedly needs about ten times fewer machines to run its site after rewriting a bunch of Ruby services in Scala).

(2) You may need to use a particular JVM library (there's a lot of really good ones).

(3) Some spaces of the open-source ecosystem are largely written with JVM languages (especially in the data space: Hadoop, Mahout, Spark, etc). If your team is heavily dependent on one of those spaces you may choose the JVM for your web applications simply to focus your teams knowledge and tooling on one platform.

2 comments

> (2) You may need to use a particular JVM library (there's a lot of really good ones).

I would love to hear some examples? It always appears to me that you could use JVM on the backend and have robust services that communicate with the front end layer (flask/tornado/whatever). However, I would be open to hearing something new.

> (3) Some spaces of the open-source ecosystem are largely written with JVM languages (especially in the data space: Hadoop, Mahout, Spark, etc). If your team is heavily dependent on one of those spaces you may choose the JVM for your applications simply to focus your teams knowledge on one platform.

From the data perspective, in all the places I have been, the data has been sliced up, processed, put through models and is available either as services or SQL databases. After that, there has never been a strong enough rationale not to use something else for the web server. I mean, from my understanding, you will end up having to write JS for the browser side of things. So you are no longer tooling on one platform any more, are you?

> (1) if you are expecting a lot of load you will likely get more throughput out of the JVM

This is true but not really a reason to move away from Ruby. We've found a really good medium between doing Rails on MRI and writing Rack services with JRuby and Torqubox when we need a lot of throughput.

>(2) You may need to use a particular JVM library (there's a lot of really good ones).

Honestly, this is more of a reason to stay on the Ruby/Rails side instead of the JVM side. In Rails there are libraries that can help you with anything dealing with web applications. I've been in the Java ecosystems: Play Framework, Spring, and Java EE(JSF), and I have never seen anything like the Rails ecosystem. It allows you to iterate much faster on a project. The JVM never really attracted me(on the web side) with it's libraries. We do however use JFreeChart which we use as a fallback to javascript charts, because it outputs an image really fast. For that Rack and JRuby are enough though.