Monthly Archives: October 2006

Groovy & Grails

This evening I went to the Groovy & Grails User Group meeting, held at Skills Matter in London. The first presentation was Grails and Hibernate by Graeme Rocher (project lead of Grails, and new CTO of Skills Matter). Graeme gave some background on Groovy and Grails, and then showed some examples of the domain model […]

Giggle 2 Search caching design notes

Just trying to record my thoughts while I’m working out the design. Search cache consists of ‘generations’. Generation is number, which is included into the fragment key. A single extra fragment stores the current generation number, along with its expiry time (if set). This can use YAML, which is quite simple. When a change means […]

Giggle 2 Fragment Caching

This is my second article about implementing caching in my ‘Giggle 2’ project. Unlike the first part this doesn’t include any ‘cleverness’ extending Rails, it’s just using standard Rails functionality, but I want a record of the issues for myself.# In my plan I wrote about caching the footer for each user, but once I […]

conditional use of page cache in Rails

As discussed in my previous post, I worked out a way to use Page caching for the ‘public’ view of my Rails app, while rendering the same pages through Rails if the user is logged in. I implemented my idea today, so here’s a bit more technical detail. First, I add a cookie that indicates […]

rails caching and my projects

After posting about my projects the other day, someone pointed out that my site was “broken”. So I spent quite a while investigating the performance issues. The site is hosted on Dreamhost, and set up through FastCGI – but it seems that Dreamhost’s FastCGI configuration is not really optimal for Rails applications. I made a […]

projects update

A while ago I wrote about my spare time projects in progress. It seems like about time I made an update on whether they are making any progress! Happy Pig – I haven’t made any actual changes to the project itself, but I have installed a bug tracking system and started recording tasks in it. […]

persisting HTTP sessions over restarts on JBoss 4.0.4

I spent another frustrating day delving into JBoss configuration this week, just to restore behaviour we want in our application. What we want to happen is that HTTP session attributes are ‘magically’ persisted when the server is shutdown, and restored when the server starts again. This means we can minimise disruption on our live service […]

More on database abstraction

Having complained about Rails not abstracting the database enough, I ran into the opposite problem at work. One of the deployment platforms for our main system is JBoss1, and we use CMP entity beans for most of the persistence. I encountered a problem where a bean is created, and then later in the same transaction […]

Rails Associations with unsaved records

I’m obviously still learning my way around Rails! Last night I found some problems with my project: it didn’t seem to be dealing with new associations properly. The problem was that the object I was adding associations to was unsaved, since it is one I build up in the session before committing. It turned out […]

Simple common search behaviour in Rails

One of the spare time projects I’m working on at the moment is a Rails rewrite of my Gig List web site1. A feature of the site is a common search box that searches on most of the models. I tried some meta-programming to get the common search behaviour I wanted. So I have a […]