Hacker News new | comments | show | ask | jobs | submit login
Scala on Heroku (heroku.com)
126 points by adamwiggins 2208 days ago | hide | past | web | 20 comments | favorite



I love Heroku's little "language and community" section of these articles when they add a new supported platform. For example, the link to the explanation of Scala's Hindley-Milner type inference method (http://www.codecommit.com/blog/scala/what-is-hindley-milner-...) definitely taught me something new about the internals of Scala, and in general a new topic in Computer Science.

Congrats on shipping yet another supported platform!


Minor correction - Scala does not have the Hindley-Milner type inference method and for technical reasons it would be very hard to have something similar. Languages that do have Hindley-Milner are those from the ML family, like Ocaml, Haskell and F#.

That said, the linked article is pretty cool.


The codecommit article is a good intro to H-M as in Haskell, OCaml, F#, SML (AKA Damas-Milner by at least one dev I respect), here is codecomit guy re: why Scala can't use HM / DM, rather, Scala is flow-based, or "local type inference".

http://scala-programming-language.1934581.n4.nabble.com/scal...

http://stackoverflow.com/questions/3689407/disadvantages-of-...

http://stackoverflow.com/questions/7234095/why-is-scalas-typ...

this sentence in OP objectionable

Erlang and Clojure: two other functional, concurrency-focused languages which many developers find inscrutable.


Oops, thanks for correcting me. I think the original article claimed it did use it, or at least something very similar - it looks like Herkou has tweaked their article and pulled that link.


I'll bite: what is Heroku? I read the "polyglot programmer" link on the article. What it seemed to point at was common deployment tools between languages, but it seemed vague, and there must be more. What is it?


Think Google App Engine with more languages, with real database access (bring your own db if you want, or they can host it), dozens of add-ins, and a sane pricing model.


"sane pricing model"

by sane you mean really expensive for hobby projects. I keep thinking this will be a problem in the long run, disruptive technologies tend to be bottom up. I can't host a message board on heroku because it's way too expensive.


Yeah, I don't consider Heroku or the platform-as-a-service providers good for hobby projects, esp. something like a forum or blog where you can just get a cheap VPS somewhere.

The sweet spot is having very reasonable billing like $15/month for a 20GB database (5MB free) and $35/month for a 2 dedicated workers (or free for 1 which needs to be spun up and is ~10 seconds for the first request). My current use case is projects which could become small income earners, where ~50/month to experiment is dirt cheap if it saves me hours of setup time.


you know, I hadn't evaluated it since it was a pure ruby service. It's a bit different with a jvm language where you can get away with 1 worker (threaded request handling) and the db upgrade. $15/month would likely be sufficient for a forum. I'll give it a try and see how it goes :)

I wish there were something between the $15 and $200 db offerings.


Yep, it's definitely a steep jump from 20GB shared to dedicated. At that point it might be better to move onto your own hardware (if I fill up 20GB database then I'm doing something right).


I've had no problem running my hobby on projects on Heroku for free. What about it has been prohibitively expensive for you?


If you follow the "how to run it on Heroku" section in the README here: https://github.com/typesafehub/webwords/tree/heroku-devcente... then you would get something like this running app here: http://webwords.herokuapp.com/

That's pretty much what it does ;-)

Some people call this a "Platform-as-a-Service" or PaaS.


In the simplest simplest terms, it's hosting for your app. But you get a lot of bonuses like add-on services, great deployment and app management, and easy scaling (assuming your app is built to support that).

Since their new infrastructure upgrade, it seems it's easier for them to support more and more language stacks. There also seems to be quite a bit of add-ons you can use.


Excellent news. I'm just starting to learn Scala as a natural evolution to Java. The pace of Heroku rolling out new language support lately has been great. I'll be playing around with Heroku more, but I have to wonder: should I be expecting to pay something to use Heroku as a side learning exercise?


Depends on whether or not your side project uses more than 5MB of database storage. I'm running a tiny node.js app on Heroku and you get up to 750 hours per month of free CPU time, so I haven't paid a dime (but I am really in love with how slick everything is).

Is anyone else stunned at how quickly Heroku has been pumping out new hotness? I was kind of worried when they announced they were being acquired, but if anything, it seems like being acquired has increased their pace.


Just a quick warning for those of you who consider using this service. The scala version they use is extremely old and the new version has been greatly refactored as has an excellent new parallel collection system.

I urge you to find another host if possible.


On Heroku, you can use any Scala version that SBT will use. I even used parallel collections in the sample app: http://devcenter.heroku.com/articles/scaling-out-with-scala-...


anybody knows if this means that something like a lift project or a scala play project now work on heroku? I only see a finagle example but that's not a web framework


Play support came out a while ago: http://blog.heroku.com/archives/2011/8/29/play/ One trick with play-scala is that the default welcome page is broken because it depends on a module that's only enabled in dev mode, and Heroku runs play in prod mode. So replace the default welcome page with a real page.

The announcement today is for SBT-based projects. Anything you can build with SBT should be possible to use. You have to figure out how to honor the Heroku configuration variables (namely PORT for the port to listen on) and you have to figure out how to get an executable command, for example with https://github.com/typesafehub/xsbt-start-script-plugin

We put up two examples today, the Finagle one and the larger "web words" one: https://github.com/typesafehub/webwords/tree/heroku-devcente...

Web words example shows how to run Jetty, and you should be able to drop various web frameworks into Jetty.


I'm curious how this will work with Play 2.0, which will be sbt-based.




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

Search: