Hacker News new | past | comments | ask | show | jobs | submit login
Clojure on Heroku (heroku.com)
243 points by joshuacc on July 5, 2011 | hide | past | web | favorite | 27 comments



Remarkable. Congratulations, clojure folk, for a fairly mainstream Lisp coup.

[Edit: Also, props to the Heroku folk for doing something a bit off the beaten path. I'm sure clojure is lovely, but it wasn't the "obvious" next thing to work on.]


This also means that technically there is no reason why Heroku Cedar couldn't support other JVM languages, such as Scala. It would be fun to watch Scala and Clojure fight it out on an even playing field.


Agreed - assuming they do plan to "officially" support other JVM languages in the future, that would be a pretty big deal:

* If JRuby got all the nice operational support that Heroku currently gives CRuby, it would be an awesome way to add power to an existing Ruby codebase (run the same code in JRuby, give or take a few gems, start taking advantage of Java libraries or using threads for better throughput).

* Heroku supporting Scala and Clojure could really boost their popularity - AFAIK there's no service for those languages that makes deploying a production-ready, public-facing web app as easy as Heroku does for Ruby.

Update - I guess this quote from the article is relevant, and could indicate a reluctance to support other JVM languages:

Though growing quickly, the Clojure community is small enough to be approachable and accepting of new ideas. This is crucial for a platform like Heroku, which offers a deployment workflow that is a radical departure from that used for server-based deployments. Language communities with heavy investment in traditional deployment methods will be harder to adapt to the Heroku way.


We support running Scala apps at CloudBees today without locking down the JVM, so you can take advantage of the full set of language features (like actors). By combining the Java PaaS with our GIT and Jenkins services, we can enable pushing those "harder" Java/Scala apps to the cloud using a Heroku-like GIT workflow.


DotCloud has full Java support, it's just a matter of building a war file and deploying it.


Scala and Clojure can both be deployed to Google AppEngine.


See https://github.com/gcv/appengine-magic to help get Clojure working on App Engine. It's quite nice and the docs are pretty complete.


What makes heroku work with rails is rails' use of gemfiles/bundler, so that you don't have to upload every gem that your rails app uses. I don't know how it works with node, but from heroku's getting started articles, it looks like leiningen (a clojure build tool) is what that allows them to offer clojure support.

I don't know the scala ecosystem at all. Does scala have a similar tool that allows you to specify what java/scala libraries you want without actually having to upload said libraries?


maven is the main package-distribution mechanism in use in the Java world, and it is what is used in the Scala world, as well. The specific tool used varies (sometimes maven, sometimes simple-build-tool, sometimes buildr), but the de facto standard is there.


Leiningen is (mostly) a Clojure wrapper around Maven and Ant.



There's sbt, which is less... mavenny, although I think it's actually just a wrapper around maven.


As far as dependency management goes SBT can consume Maven dependencies, Apache Ivy dependencies or just manually added JARs to a 'lib' directory.


>I don't know how it works with node

FYI (for the curious) you just declare dependencies with npm using package.json. It's easy! http://devcenter.heroku.com/articles/node-js#declare_depende...


I'm not sure in what way you mean "fight it out", but I'm glad that Heroku opted to start with Clojure...

As a guy trying to get on the JVM, the experience of getting up and running with Clojure has been significantly easier and less "fiddly" than trying to get a decent Scala environment set up.


Can you explain further what was difficult about getting a Scala environment set up? For me it was "sudo port install scala", "sudu port install sbt", cd to/my/project/path, "sbt".


Getting Scala & SBT installed hasn't been the tough part, it's getting it working with any IDE that has been complicated.

A big part of the problem is that documentation seems to equally point to information for Scala 2.7 and 2.8, and less so for 2.9; but the directions are different for each version. Added to that are the differences between SBT 0.7.x and SBT 0.10.x. It makes it tricky to know what parts of the documentation are still valid and which parts have changed. Then you pick an IDE (Eclipse, IDEA, Emacs w/ Ensime) and figure out what plugins are valid today and what versions of Scala they work with and hope that it all matches up.

With Clojure & emacs it's just a couple of commands to get Clojure installed and have a project correctly set up.

I do like Scala, but there are still many rough edges that aren't helped by the frenetic pace of breaking changes in the ecosystem. I'm sure part of it is that I'm coming to Scala without any substantive Java background.

(For whatever it's worth, emacs with Ensime had the best / most straightforward installation path out of any of the other IDEs)


In my opinion, working with the IntelliJ has been very easy in Scala. There's an excellent plugin that you may want to check out if you haven't already that lets you generate IntelliJ project files from sbt. https://github.com/mpeltonen/sbt-idea


https://github.com/lstoll/heroku-playframework - looks like they are already there.


sweet but surprising. This would probably never have happened if the author of Ring didn't work for Heroku.

Anyway, definitely a major milestone for the most elegant language of the last 5 years.


That explains why they have JVM support but have neglected to do Scala or other JVM languages yet.


I'm pretty sure you're talking about Brat or Ioke, although I'm not sure. :D



GrooveStomp is referring to the "most elegant language" part of the post -- not the part about the author of Ring.


Excellent news!

Heroku is the only reason I gave Ruby/Sinatra a try for a while. I love the idea of having Heroku-style deployment without giving up Clojure.


Very interesting. Seems rather niche, though after the recent sale of Phenona (which I believe was on Hacker News a couple weeks ago), I can see why everybody would be rushing to become the cloud-deployment solution for any language vertical.


Maybe they're targeting the kind of people who stayed awake when PG talked about LISP.




Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: