Programming is hard by Stephan Schmidt

Rails versus Grails

Hu, the performance wars seem to have to started. I’m not really into performance, as long as it’s fast enough. But some people demand an optimized Rails setup. As far as I’m concerned the benchmarks by Graeme was about two out of the box solutions. They showed that people can decide to use Grails over Rails without fear of a slow solution. If people earn money with Rails they can with Grails. There is no sense in optimizing one solution without the other. Right out of my head there are some optimizations for the Grails setup one might try:

- Use the fastest JDK, not JDK 5 but JDK 6 (7? Or 3rd party JDK). JDK 5 is not the fastest one
- Use the JDK on the fastest plattform
- Use fastest database (H2 not MySQL)
- Tune VM parameters (GC and object creation)
- Use faster application sever (Resin instead of Tomcat?)

These are very easy ones, just change the command line or the application setup. More diffucult optimizations are Hibernate tuning or using another ORM (Toplink?), move to a clustered setup (makes only sense with several servers), caching etc.

I think I’ll take a look into some of the options, just to tune my Grails application.

Update: After some research, Resin in the open source version is quite slow, Jetty might be slightly faster than Tomcat

If you liked this post, subscribe to my free full RSS feed.
Filed under: Java

You can share this post!
Do you want to tell others about this article? Use the social bookmark icons to submit this artice to the service of your choice. Thanks.

Get free updates by email

If you did like this article you can get free updates with your RSS reader, you can follow me on Twitter or get free update to new posts by email. Enter your email:

 
About the author: Stephan has been working as a head of development and CTO. He has experiences in different technologies since 20 years including Java, Rails and Python. Stephans main field of interest is maintainablity and productivity in software development. Want to know more? All views are only his own.

Comments

That will be an interesting work! Will keep an eye on it.

Cheers!

stephan

Yes I’m sure it will.

As for the update, I was about to suggest Jetty :). How about tomcat 5, vs 6 vs jetty :) Although H2 is the fastest DB, HSQL could be a better choice since it is more commonly use?

Thanks

stephan

Some benchmarks suggest, Jetty and Tomcat are about the same speed. I’ll try H2 next. H2 is newer, but has more professional features and is developed by the founder of HSQL.

my wrong … I thought HSQL could be better since it maturer and may have more features and the new H2. Nice to hear that. 1 here for H2

Hi again,

You might have read this …

http://www.michaelyuan.com/blog/2007/03/28/are-rails-and-grails-scalable/

how about test grails on JBOSS?

good luck!

Leave a Reply