Grails has a war command to create a Web Application Archive (WAR) file which can be deployed on any Java EE compliant application server.
Heroku apparently uses GIT and an entire repository of one’s code to deploy, from what I’ve gleaned in the tutorials (here and here)
Can you help me understand the integration between these two aspects at a high level. Is running on Heroku just like running in your development environment, where WARs aren’t used?
Thanks, Ray
Running on Heroku is running a war in a container.
The difference is that a Heroku dyno is staged via git hooks. Meaning that it builds whenever you push to the Heroku repository. The reason the plugin uses code directly is that this is much more efficient than pushing a .war pre-packaged to the platform.
What the plugin does is to facilitate what dependencies are pulled in by the git hook.
When you push your code, the git hook pulls in the dependencies of Grails and the appserver and packages it all together for you (the work the plugin does is configuration of this process).
In the end the app runs in an embedded container (or so I recon, I haven’t looked at the plugin more than rudimentary since SpringOne2GX) that is packaged and staged on a special staging dyno and then deployed to run on your computing dynos.
From your applications point of view, you are running in a container and you can code your app just as you normally would (except that if you make more dynos, their sessions are not replicated, so you cant rely on sessions the same way).
Edit:
It should be mentioned, that you can push a pre packaged war to the git repo if you so want, the build system is pretty flexible, also you are not allowed to have a ‘slug size’ (basically the space taken by your project when its ready to run) above 100mb.