One of the main problems with running a Grails based webapp on Heroku is the amount of time that it takes to start your (free) instance after it’s been set to idle by the Heroku routing mesh. This is because Spring takes a while to start up/configure everything and during this period, your users are staring at the screen waiting for your site to load.
One workaround is to setup a server elsewhere that pings your site, but if I wanted to setup a server elsewhere, I’d probably just run my webapp there instead of on Heroku. I had initially also tried using Pingdom to make 1 request per minute, but the Heroku routing mesh is smart and will idle your instance even if the Pingdom bot is trying to request it (or so it seemed).
Finally, I ended up with a solution that has kept my instance for jsonblob up for quite a while (as seen by Pingdom). All you have to do is make a HTTP endpoint that will return a varying amount of bytes in each response and configure Pingdom to request that endpoint.
Coding for fun Fridays
Have you ever been asked “FizzBuzz” in an interview? If not, you can read about FizzBuzz here.
Here’s a simple solution in Scala:
I’ve been doing a lot of work lately with Google App Engine/Objectify on a Spring project and found it was becoming cumbersome to always create an ObjectifyFactory whenever I need to interact with the datastore. (more…)
I’ve intended to contribute to an open source project for a quite a while, but had never made the effort to find a project to work on. Recently at work we’ve started using the Scalate templating engine with Spring MVC. Up until my change, the Spring MVC support in Scalate was very rudimentary, however the ScalateViewResolver now supports the order, prefix and suffix properties similarly to the InternalResourceViewResolver.
Filed under: Uncategorized
Thanks very much. I just want to let you know that your order (#XXXXXX) will ship fresh from our San Francisco factory on the evening of 27-Dec-2010 via US First Class Mail.
Thanks for tracking us down and giving us a shot. I hope we meet your expectations.
If there’s anything else I can do for you, just let me know.
PS: By the way, this is what we’re sending you:
1 -Trackpad Socket $12.00
Product Total: $12.00
Sales Tax: $0.00
Grand Total: $14.00
Even though this is probably automatically generated, it increased the chance that I’ll buy another product form them because it feels like there is a human connection to the purchaser. I wish more companies would send simple confirmation emails like this.