Rich Web Experience

JSFOne

Private Events

Blogs

View all Blogs >>
  • Ted Neward

    Enterprise, Virtual Machine and Language Wonk

    For those of you who were at the Cinncinnati NFJS show, please continue on to the next blog entry in your reader--you've already heard this.... more»

  • Michael Nygard

    Agile technology leader and dynamicist

    Stewart Brand's famous book more»

  • Alex Miller

    Sr. Engineer with Terracotta Inc.

    The elevator doors slide closed. Your fellow occupant says “So what do you do? I’m in venture capital.” You turn to him and... more»

  • Jared Richardson

    Agile coach and co-author of Ship It

    Last week I was talking with a friend about a common ailment on development teams today. And it seems to be getting worse. Perhaps you've more»

  • Scott Leberknight

    Chief Architect at Near Infinity

    With all the hype this year about cloud computing and things like Amazon EC2/S3 as well as Google App Engine and Bigtable, you can feel it... more»

  • Jason Rudolph

    Author of Getting Started with Grails

    As we’ve seen over the last several weeks, it’s remarkably easy for code to earn the badge of 100% more»

  • Kenneth Kousen

    President of Kousen IT, Inc.

    In September, I’m very happy to be giving a couple of presentations at the more»

  • Stuart Halloway

    CEO of Relevance

    This is Part Two of a series of articles on Java.next. In Part Two, I will look at how Java.next languages interoperate with Java. more»

  • Howard Lewis Ship

    Creator of Tapestry and HiveMind

    According to Neal Gafter, the story for closures i more»

  • Erik Doernenburg

    Principal Consultant @ Thoughtworks

    The Spring framework has become ubiquitous in the Java world, and there are a large number of to more»

  • Neal Ford

    Application Architect at ThoughtWorks, Inc.

    It came to my attention recently that I had made a bad assumption about the Prod uctive Programmer book. My under more»

  • Mike Levin

    Software Developer specializing in Web2.0 websites

    more»

  • Matt Raible

    Creator of AppFuse and author of Spring Live

    The EhCache project appears to be having a very busy summer. EhCache 1.5.0 (a major new version) was rele more»

  • Pratik Patel

    Enterprise Architect

    In preparation for my upcoming No Fluff Just Stuff session in more»

  • Ryan Shriver

    Business and Technology Consulting

    more»

  • Mark Johnson

    Director of Consulting at CGI

    At the Columbus NFJS show held on July 25-27th during one of the BOF sessions Dave Bock, Scott Davis and I discussed unit tests vs functional... more»

  • Craig Walls

    Author of Spring in Action

    Just a short blog entry for today to let you know that I'll be speaking at the JavaM UG meeting in Dallas a wee more»

  • Joseph Nusairat

    Author of Beginning JBoss Seam & Co-Author of Beginning Groovy & Grails

    Well i am assuming Apress has the most random site in the world at times.But today only they have our recent book, Beginning Groovy & Grai more»

  • Venkat Subramaniam

    Founder of Agile Developer, Inc.

    I received a copy of "Beginning Groovy and Grails—From Novice to Professional" book by Apress written by more»

  • Andrew Glover

    Co-author of "Continuous Integration"

    Web Component Testing Screencast- my friend Rod Coffin demonstrates some interesting aspects re more»

  • Brian Pontarelli

    Brian Pontarelli - founder of Inversoft

    I went to the 37 Signals event last night sponsored by CPB. The speake more»

  • Graeme Rocher

    Project Lead of the Grails Project & CTO of G2One

    I'll be giving a talk on the state of Grails at the London Groovy+Grails user group meeting on the 31st of July. more»

  • Nathaniel Schutta

    Author, speaker, software engineer focused on user interface design.

    I remember the first time I flew for business - I was working for a small consulting company and I was heading to Chicago for a few days of... more»

  • Keith Donald

    Lead of Spring Web and Creator of Spring Web Flow

    I am pleased to announce that Developing Rich Web Applications with Spring, a three-day bootcamp lead by SpringSource engineers on web... more»

  • Richard Monson-Haefel

    VP of Developer Relations, Curl Inc.

    more»

  • Pramod Sadalage

    Co-author of "Refactoring Databases:Evolutionary Database Development"

    When creating a Foreign Key constraint on the database as shown below ALTER TABLE BOOK ADD (CONSTRAINT FK_BOOK_ more»

  • Vladimir Vivien

    Software Engineer / Consultant

    Judging from the list of features that will be included in NetBeans 6.5, more»

  • David Bock

    Principal Consultant, CodeSherpas Inc.

    I just spent this weekend speaking at the Ag ile IT Exchange conference i more»

  • Kirk Knoernschild

    Software Developer & Mentor

    I’ve published a summary of the OSGi survey results on the APS blog more»

  • Brian Goetz

    Author of Java Concurrency in Practice

    This surprised the heck out of me.  We recently finished a new TV room down in the basement.  We have a 50″ plasma TV, mounted on the... more»

  • Jason Harwig

    Senior Software Engineer at Near Infinity

    I was reading a blog entry at more»

  • Pete Behrens

    Organizational Agility Coach

    Marti nig & Associates Methods & Tools group recentl more»

  • John Heintz

    Principal Consultant with New Aspects of Software

    This post is to mostly keep track of the numerous blog threads going on about IDLs and schemas for REST. I find myself with more to say that... more»

  • Brian Sam-Bodden

    Java author, Ruby geek and Open Source Advocate

    In this installment we are going to build the Dashboard page of the Tempo application. T more»

  • Mark Fisher

    Spring Integration Lead

    In my recent post, I had mentio more»

  • Ron Bodkin

    Chief Software Architect, Quantcast

    I'm looking forward to speaking at The Rich Web Experience conference in San Jose next month. The event runs from September 7th through 9th.... more»

  • Mark Goodwin

    Web Application Security Specialist

    We've already looked at one of the two big problems posed by anti DNS pinning on Java applets; because there's rebinding on the applet and... more»

  • Scott Davis

    Author of "Groovy Recipes" & TDD Expert

    Every time I see a live show at the Denver Botanic more»

  • Romain Guy

    Java User Interface expert.

    more»

  • Ramnivas Laddad

    Author of AspectJ in Action, Principal at SpringSource

    InfoQ.com has published my AOP myths and realities talk recorded at a No Fluff Just Stuff conference. InfoQ.com founded by Floyd Marine more»

  • David Geary

    Author of Graphic Java and co-author of Core JSF

    The 2006 NFJS tour kicked off t more»

  • Jeff Brown

    G2One Director Of North American Operations - Groovy and Grails Developer

    <a href="http://groovy.codehaus.org/"& gt;Groovy</a> 1.0 RC2 was released today. If all goes well over the next few days the 1.0... more»

  • Kito Mann

    Editor-in-chief of JSF Central and the author of JSF in Action

    There are a lot of free JavaServer Faces component libraries, usually distributed as open source projects, functionally very advanced and... more»

  • Jason Hunter

    Author of Java Servlet Programming

    I just posted the JDOM 1.1 release for download. This release includes about 20 improvements and bug fixes. more»

Groovy not Enterprise-ready, you're kidding?

Posted by: Guillaume LaForge on 01/19/2008

Graeme pointed me at a white-paperish article claiming Groovy would not be Enterprise-ready. If the article had been acurate, I would have welcomed it, and we could have found ways to improve Groovy to make it ready, but unfortunately, the author did not do his job properly, and only spread FUD by saying Groovy doesn't hold to its promises.

As this article is pretty thin on the technical aspects, I won't explain why his conclusions are wrong -- and also because Graeme explained this already. Instead, I'll just comment on a few of his claims.

Some even claims that Java should be replaced by their preferred dynamic language.

I don't know who "some" is in this sentence, but at least, that's not me. Developers should always have the choice: the best tool for the job. Groovy has initially been conceived to complement Java, not to replace it -- which doesn't mean that you can't build a full project using Groovy only, as demonstrated by the powerful Grails framework. Java's a great language, and a wonderful platform. Unlike other platforms, Java's threadsafe, it optimizes access to databases, it scales extraordinarily well, etc.

SAP, one of the largest providers of enterprise software and services in the world, have released a new community driven product based on Groovy.

Yes, SAP, among other big vendors (IBM, Oracle, JBoss) who did the same, has decided to use Groovy and Grails for its new innovative project. Do you think a company like SAP would have chosen Groovy and Grails if these technologies would not have been Enterprise-ready? See a couple of links on this topic:

On the JRuby side, it has solid backing from Sun Microsystems and has been integrated into NetBeans IDE

Right, Sun's been investing in JRuby by hiring the two lead developers. They've been putting a lot of marketing effort on this, to surf the hype wave of Ruby on Rails. But Sun has also helped the Groovy project by giving us access to a nice Sun Fire T2000 machine for our performance testing needs, they've let us create a JSR for standardizing Groovy in the Java Community Process, and they are also currently working on Groovy and Grails support in NetBeans. There's just less marketing money spent on Groovy and Grails.

Before applying Groovy or JRuby to your enterprise applications, their suitability and reliability should be evaluated seriously.

Very true, and you should definitely not just trust anything you read on the web. You have to do your own homework, and evaluate the technical solution in a realistic context, rather than believing in some micro-benchmark or amateurish white-paper.

Groovy and JRuby are still very young and has not yet been confirmed in production.

For JRuby, I can't comment, despite the fact I haven't heard of much well-known JRuby-powered systems in production, but hopefully, someone can comment on this blog to get this straight. But at least, for Groovy, I personally know quite a few mission-critical applications that already embed Groovy. I can even tell you Groovy's handling million-dollars hedge funds daily in a Londonian financial institution. I can also tell you that US Fortune 500 insurance company Mutual of Omaha is running a risk calculation engine with thousands of lines of Groovy business rules. And what about the US National Cancer Institute which also uses Groovy to validate patients file details? And one of the top major American credit card company (in the top 20 on Fortune 500) that also uses Groovy in production? And Groovy would not be Enterprise-ready?

First, we observed that the Groovy runtime is not stable, that is, memory consumption increased linearly with repeating times. In other words, a certain amount of memory is lost - i.e. memory leakage - during each evaluation of the script. This is a serious flaw of the Groovy runtime; Groovy can not be used in long-running server environment unless alternative solutions can be found to avoid memory leakage. The simplest solution is "runtime recycling" -- throwing away the Groovy runtime after each execution and let JVM recycle Groovy runtime memory.

There is no leakage of memory in Groovy at all. Each time you evaluate a script at runtime, a new class is created in memory. And the classloader just remembers this class, in case it may be used further on down the road, instead of bearing the cost of recompiling / reevaluating it each time. However, if you wanted to just evaluate it once, discard the classloader or the Groovy shell used afterwards. It's as simple as that. No memory leaked at all. Just use the APIs as they are intended to be used, and don't claim that they are flawed because you didn't understand how to use them properly.

In certain server environments the current solution by recycling Groovy runtime is not enough and you may still have memory leakage problem. This is because certain servers always keep the classes in memory even they are no longer required. One of the example is the JBoss application server. In JBoss, classes are not unloaded from the memory even they are not required by the system. Of course, this is a design problem of JBoss and may be changed in future versions.

I don't know the JBoss internals enough to comment on this one, but as the Groovy classes are loaded by the Groovy classloader itself, I suspect the JBoss infrastructure would just let the classloader to be garbage collected otherwise it would be mostly impossible to make serious applications work on JBoss AS, which I highly doubt. Hopefully, someone with more JBoss knowledge can better comment on this.

Groovy has been very stable and mature for a long time already. It is being used by many high-profile companies and institutions throughout the world with great success. It is a pity to see such FUD spread of Groovy by an amateurish white-paper written by someone who doesn't seem to have done his researches well.

Update #1: I've added a new Enterprise use case for Groovy, where one of the US Fortune 20 credit card / bank company leverages Groovy, as someone pointed me at in a mail.

Update #2: Steven made a nice technical analysis on groovy.dzone.com, so if you want to learn more about the technical aspects of the story, and better understand the memory and classloading behavior in Groovy, go right there.


be the first to rate this blog


About Guillaume LaForge

As the official Groovy Project Manager and Spec Lead of JSR-241 standardizing the Groovy Scripting Language, Guillaume Laforge spends his spare time bringing a versatile and agile environment to the masses and initiated a year ago the seed of Grails, the Groovy & Spring web framework. He is also co-authoring Manning's "Groovy in Action" with Dierk K?nig, one of the passionate Groovy developers.
In his professional life, Guillaume is a software architect and Open Source consultant, working for OCTO Technology, a French-based consultancy
focusing on architecture of software and information systems.

More About Guillaume »