Feed on
Posts
Comments

Silver Bullets

I’m playing with Grails. It’s pretty impressive, although the potential for Hibernate abuse is alarming to me.

This alarm is not so much based on any broken feature of the implementation, but the exchanges I see on forums regarding Hibernate performance and scalability, with typical Hibernate answers like “these are not the droids you’re looking for“ and “move along” as a response.

There’s a lot of vigorous protestations and hand waving in Spring-land regarding potential architectural brokenness stemming from broad statements about Hibernate perfection in all cases, with passing mention of joyful Terracotta as a fix if needed.

The wholesale movement of caching from the database tier to the application tier just looks like pushing the problem around, making scaling more difficult to boot if you care a whit about synchronization. More silver bullets I guess. From a purely operational perspective, you also need to ask where and how you are best equipped to manage caching as an architectural feature.

I suppose as a career move I should be more aligned sweeping “minor” architectural concerns under the rug, no one wants to hear about them. The financial successes of Oracle RAC (distributed lock contention), Veritas Cluster (where’s the quorum device), VMware (works great for every load) and their ilk attest to blissful ignorance being a tack with a more positive pecuniary outcome.

I don’t think I risk being overly negative here, since the preponderance of press is on the side of Hibernate, it’s just that blind acceptance of sweeping claims about the qualities of any product or architectural approach, without a complete understanding of the physics involved, invariably results in surprises with a search for the next fix.

After much too much searching in my opinion, I found relief for my Hibernate concerns in a couple of excellent articles, the most enlightening of which discusses in some detail the relationship of the Hibernate session cache with transaction management. This coupled with a short section of Grails documentation on managing transactions has me much at ease now.

It’s not so much that you should design for the edge case, but that you need to know what the edges are and where the bodies are buried. So, I now embrace Hibernate, very carefully.

No Tags

Trackback URI | Comments RSS

Leave a Reply