Archive for December, 2010

“Daddy grips the wheel and stares alone into the distance. He knows that something somewhere has to break” – The Police

I recently attended SpringOne 2GX and had a great time. The folks behind Spring, Groovy, and Grails are fantastic. Go find a NFJS event and be dazzled. During one session I learned about RabbitMQ, a recent acquisition of SpringSource. This is an impressive project done in only 12,000 lines of code!

I’m greatly intrigued by a message queuing system. My only experience is as a gateway to a mainframe system. Not exactly a keen architectural strategy as much as “that’s how you gotta do it.” So I’ve seen something there, but have struggled to find a good use.

But I feel like I’ve found something! We have many applications that have a common need to interface with an external system via SOAP. This is an expensive operation and is currently handled synchronously. Ah HA! Toss it behind a queue and make it asynchronous and regain some performance. This call doesn’t need to have a response so the application doesn’t have to wait for the return!

Now throw in other ideas like an enterprise language-agnostic logging system, and step that up a bit with a destination for critical errors to be stored for investigation and triage. I think I now have a trifecta of ideas, and enough critical mass to justify revving up a new service!

This produces the following results. Notice that the keys (properties in JavaScript parlance) are UPPERCASED as though the serializer were shouting at you.

{"SOMENUMBER":4.0,"SOMESTRING":"Hello JSON"}

This becomes a problem when you deserialize the JSON in a case-sensitive context (i.e. JavaScript in a browser). It turns out this has little to do with the serialization and more to do with how ColdFusion creates struct keys from your (case-insensitive) code. We can help ColdFusion “do the right thing” by being more explicit with our keys.