Today I kicked the wheels on the Play Framework a bit. Coming from several solid years of Grails experience (and a decade of Java), in many ways it felt similar. I won’t go into a comparison or my thoughts on Play in this post, but I will share a very unscientific, rough footprint comparison. So there’s your disclaimer. I’m not setting out to make any profound claims, just want to share a rough observation.
The loudest issue I’ve heard from clients with respect to Grails is that the application footprint is just too large, especially for those who run many small applications side by side. So I’m searching for a framework that:
- java based that can be deployed to a Weblogic/Oracle stack (no choice there)
- provides the same development productivity boost as Grails/Rails
- is stable, reliable and generally fun to work with
I started to look at Roo last night but just wasn’t too excited about developing with it. Though there seemed to be a lot of gained efficiencies including a lot of code generation of boilerplate code and scripted, maven-backed magic, I just felt “blah” as I went through one of the tutorials. Play on the other hand seems very innovative, a breath of fresh air and I was excited to give it a try.
The Sloppy Science
I built the same basic application on Grails 1.3 and Play 1.0. It’s very similar to the application in the screencast on playframework.org – a simple task list app with
- one model/domain
- one controller with 3 actions
- one view with jQuery/JSON between the two AJAX actions
It lists all of the existing tasks, let’s you create new ones and lets you check them off, that’s it. Both apps use an in memory database.
I built these two apps as WAR files and deployed them to a local Tomcat 6 server. I deployed them separately and then ran through this script:
- create 3 tasks
- check two of them
- refresh to validate the “checks” were successful
- stop Tomcat, undeploy
Also deployed on the server was Lambda Prode which is where the screenshot below was generated.
The Results
WAR file size: the Grails WAR was actually smaller than the Play WAR. Grails 22.1Mb and Play 24Mb
As you can see below, the baseline memory footprint of the Grails app was significantly greater than the Play app. To some extent I think this is a non issue for typical, medium to large applications. But in the case where you have many small apps sharing the same resources, the additional overhead adds up.






