Richard Bucker

Clojure and Scala... again

Posted at — Aug 9, 2011

[Update 2011-08-09: I am returning from a failure to install scala and clojure. I was able to install OpenJDK from the Ubuntu packages, however, I wanted to build ant from source. And that does not appear to be possible. Ant depends on JUnit and JUnit depends on Ant. This makes it impossible to install everything from source. What’s worse is that the build instructions are so much worse than I remember. There was a time when I would install all my Java tools except the JDK and my commercial JDBC drivers by hand.]I just watched a video presentation from one of the Twitter geeks and he was going on and on about the JVM. What make it interesting is that Twitter is moving from Ruby to the JVM, in fact everything is now written in Java or Scala; and there are some research projects in Clojure.I was looking over my resume recently as I was reviewing my Java experience for a potential position. And with about 10 practical years experience from the first version of Java (1.02) until a few years ago… it was an uphill battle with most managers. Now “Java is the new Cobol” or “nobody ever got fired for using Java”.I find myself looking back at dynamic languages with a little more interest. Perl and I have a long history and Python and I are getting there.But I have some criticisms: Eclipse was a wonderful project once. Now it’s total chaos. NetBeans is a nice platform but with a little FUD I’m concerned about Oracle and eating your own dog food. We might not be getting the best tools from them. There are other Java IDEs but they are expensive or single purpose. (IntelliJ’s Idea is $199 for an individual license; but it supports Groovy, Clojure, and Scala.) I tried to install Scala and Clojure using packages, however, the version numbers were so far back that it’s scary. I have heard “please upgrade” too many times.On the positive side I have a couple of books already. I’m sure they are good enough. I’m still a little bitter about the dependency on Java libs for Scala and Clojure but if you’re a functional programmer I think that Scala and Clojure are going to be easier to sell than Erlang or Haskell… as they are incremental steps (baby steps) and they still use the JVM.So what is the plan or roadmap? deploy jars and wars instrument deliverables in a consistant way use event driven design with MQs watch your TPS rates in terms of events log in a way that makes sense plan to deploy in a cluster (see MQ) plan to use 3 types of databases (OLTP, OLAP, DW) use one-way replication in a rollup fashion Keep it simple by making sure that the unit of work is something the average programmer can pick up. Stay native. If you’re writing a Scala app then use Scala libs. And when you cannot, write it yourself. And when that’s not possible then use a Java version; and plan to write it when you can.Scala and Clojure are going to get another shot real soon.PS: and so I’ll probably launch a jar framework for application monitoring. Anyone want to play?