Ok, I’ve been dipping my toe into Groovy for the past week or so, including some Grails thrown in for good measure. I like what I see. In a previous life, I was a long-time Java developer, and even after a shift to management almost four years ago, I still code on an almost daily basis.
I’ve been searching for awhile now for a dynamic language to use as our “standard” in-house “scripting” tool. We’ve too many perls, pythons, bashes, and more running amok on various boxes and projects across our enterprise. In the last two years, I’ve become quite enamored with Ruby — both with Rails and down at my Linux command prompt, where it finally gave Perl the “don’t have to go home but you can’t code here” hint — but I’ve missed some of the libraries I’d taken for granted in the Java world.
And, for what we do, integration with Java is highly desirable. In my mind (and for the feature set I desire) this points to two possibilities: JRuby and Groovy.
JRuby is very nice. It has my nice comfortable Ruby syntax, open classes, and more. But two things trouble me currently:
- Java integration isn’t fully there. You can write Ruby classes that call Java classes, BUT, you can’t develop classes in Ruby and then make use of them from Java as if they were “real” java classes. The JRuby guys are moving in this direction, but it’s not there yet.
- While others in our group really like Ruby, a few, especially the more junior guys, are still getting their heads around some of the more interesting (read painful) nuances of our architecture and J2EE technology in general. If I forced Ruby upon them now, they’d probably walk (albeit missing a great opportunity).
Enter Groovy. I’ve eyed it on more than one occasion, but it wasn’t until I picked up a copy of GinA a few weeks ago that I finally gave it a shot. And it’s nice! Many parts feel as if they come directly from Ruby, so much so that it’s not a stretch to pick up very quickly. It also provides the Holy Grail of Java integration: Java->Groovy->Java call capabilities….in other words, your Java can call your Groovy can call your Java. That’s extremely cool, and creates a whole new realm of possibilities for a Java shop like ours. Throw in syntax that is welcoming to a Java developer and compilation to byte code, and the case for Groovy is a strong one!
So, being the good PHB^H^H^H CIO that I am, I began the due diligence process. What due diligence, you ask? When looking at technology that could become a significant part of our development environment, I, as a PHB, look for general indicators that give warm fuzzy feelings (while in reality, could mean nothing):
- Review of the architecture and design decisions made by the developers.
- Size, responsiveness and general attitude of the community, particularly on the mailing lists.
- Current buzz surround the technology on blogs, tech pubs, etc.
- Benchmarks comparing the technology to other competing options.
- Commercial uptake.
I’ll leave the reasoning behind these questions for another discussion, but over the years I found that (right or wrong) they’ve served me well in assessing new tools or frameworks.
Groovy (and Grails, to a certain extent) scores well on 1, 2, and 3 above. I like the technology so far, and from what I understand of the overall design it is very well thought out. The community is very welcoming, and the lists have been extremely helpful. There is quite a bit of effort to market Groovy and Grails, and with the release of GinA, seems like there is a new article daily.
However, when I went after 4 and 5, I was surprised. Regarding 4: I can’t find a SINGLE benchmark comparing Groovy to competing technologies on the JVM (JRuby, Beanshell, Jython) or dynamic languages in general (Ruby, Python, Perl, and so on). Nor can I find any benchmarks concerning how Grails stacks up to JRuby on Rails, Ruby on Rails, vanilla Hibernate/Spring (something Grails uses under the covers), etc.
Surely, a technology that’s got 1, 2, and 3 down has had someone do this sort of research?!? Surely someone close to the respective projects has asked these hard questions of themselves?
Because I know the previous paragraph has to, has to, be true, then I can only assume one thing: someone has done this as an exercise…and the results were depressing. Why else would the results not be published? If Groovy or Grails was faster, even slightly so, then you can bet it would trumpeted far and wide. The fact that it’s not leaves an unsettling feeling.
I’ve asked the questions on the mailing lists, and I’ve only gotten vague wishful answers, to the tune of “well, we use Java (Spring/Hibernate) under the covers, so we’ve got to be as fast or faster”. Really? Then where are the numbers? Why this gap?
I think it would behoove the Groovy guys (and Grails guys as well) to put some of this research in the public eye. I don’t necessarily care that it’s slower…I just want to know how it compares. It doesn’t rule it out in any way regarding whether we use it or not…it only lets us know where we stand. It gives warm management fuzzies.
So I’m now working on my own benchmarks, but given time limitations it’ll be rough. Don’t hold it against me…after all, I’m just a PHB. I will definitely post the results here when I have them. Anyone with suggestions on the best way to approach this sort of benchmark, please let me know.
Regarding commercial uptake, or number 5 above, the explanations that are offered regarding this in both camps is that many big companies are using Groovy and Grails, but because of competitive advantage they won’t allow themselves to be revealed. That’s a hard point to prove or disprove, but it would help if there were at least a few successful products out there constructed in Groovy or Grails. In the Ruby on Rails world, it seems there are more than a few companies very willing to divulge that they use Rails…no doubt to ride the Rails marketing machine’s coat tails. Why should we accept that, given significant adoption, the adverse would be true for Groovy/Grails?
So, there you have it. It is not my intent to offend anyone in the Groovy or Grails communities…as I said, you’ve been great so far. I’m only trying to give you the perspective of one decision maker, in one company, who is taking a hard look at your projects and assessing the viability of adoption. I really like what you guys are doing, but I need your help in understanding how well it’s working. I’m sure others do as well.
Tags: Groovy
About
Leave a Comment