Infinity: Easier Than You Think. Infinitely.

Spaghettified musings on software

  • June 2010
    S M T W T F S
    « May    
  • Advertisements

Archive for June, 2010

Article Link About Batch Importing with GRAILS

Posted by gdjsky01 on 2010/06/06

Ted Naleid has a nice write-up on his optimizations of a database batch loading process using GRAILS. It’s a few months old but if I can help spread the information, so much the better. I do tend to agree with the comment that GRAILS might not be the correct solution for bulk loading of records into a database. Still, I see Ted’s solution as quick, easy, and works just fine for the size of the import he has. So why not?

I certainly would not have the same GRAILS application instance that is doing the bulk upload also taking normal traffic. That seem like a recipe for problems. Otherwise it is a good read with a decent solution. Enough so I thought to write a short post here. 😉

Were I to go beyond Ted’s volume, I’d look at a dedicated GRAILS app using the same domain objects or perhaps using GORM outside of GRAILS (if that is still possible). In some ways I see this as a good justification (or rationalization) for keeping Hibernate mappings separate, versioned, and in (gasp) XML. You can then use them in GRAILS or in any other code that can link to Hibernate.  Most of my domains predate GRAILS and GORM so mapping them in GORM is not straight forward. That costs me some of the GORM goodness to begin with. Of course I have the XML mappings already so the choice is easy to make. That’s the cool thing about GRAILS, you can use your legacy domain objects and/or mappings. For validations there is always Hibernate Validator.



Posted in GRAILS | 1 Comment »