Nav & Search

Parsing dates from RSS-feeds to Groovy Date-objects in Grails

Projects - September 3rd, 2009

During my work with i recently got into a snag when I tried to parse the publication dates from the RSS-posts and save them as Groovy-dates. After many checks and double-checks of the format for the parsing, I could’t understand why the Date.parse() function crashed and complained that there was something wrong with the format. I got closer to the solution when I tried parsing a date consisting of only numbers, since it worked I knew that the code parsing the string was correct.


Introducing – Satisfying Your Thirst for News

Projects - August 31st, 2009

Today I activated, it’s my first web application built using Grails designed to satisfy its users thirst for news. It does this by combining RSS-channels with twitters on the same subjects, this way the user can get editorial content and also see the latest buzz on the same topic as the posts.

I really like developing with Grails, it speeds up many of the mundane tasks immensely when creating applications for the web. The other side of the coin is that a lot of small problems surface during the coding and deployment of the first application in a new language on a new framework. With most of the problems out of the way is now online (or actually on and off, it’s in heavy beta)!


How to Setup a VPS to Run Grails on Jetty

Projects - August 27th, 2009

To keep costs down Virtual Private Servers (VPSs) are a very good way to host web applications, they provide all the benefits of a dedicated server but are much cheaper to hire. The disadvantage most of them have is that the cheapest options often have limited amounts of memory (256-512MB), when running a PHP application this is often more than enough but for running Java and Grails applications (which run on a Java application servers) this provides a little challenge. It’s not unfeasible at all, it’s just that some extra attention has to be payed when building the application stack.

The most important step is to start as minimal as possible and only adding applications and starting processes that are necessary. One way is to use Tomcat as an application server and configuring it to be used without Apache Web Server. I prefer Jetty to Tomcat since I find it easier to set up and deploy the web applications and they use about the same amounts of memory. An added benefit of using Jetty is the ability to run it on port 80 without using iptables, ipchains or a similar mechanism which sometimes can be really tricky on a VPS since you can’t fiddle with the kernel.