If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Friday, September 30, 2011

The power of Apache Cocoon, Xquery, and XSLT extensions

This article describes the use case where you have product data stored in a XML database.
Your customer wants to be able to search products based on (part of) the product name and display
the product properties in a html page. However, all products are also part of a workflow and to find
the status of a particular product we have to fetch information from another system. To fetch the status
this demo includes a MonitorClient which offers needed functionality. The demo describes how to generate the
entire page using purely Apache Cocoon, Xquery and XSLT. The only custom Cocoon component we developed is
the XQueryGenerator which basically reads an xquery from the specified @src attribute, injects any sitemap parameters from the match pattern and returns the results.

PH3330L.xml: Sample data which is stored in XMLDB:

products.xqlib: XQuery library for retrieving products:

products.xquery: returns a xhtml page containing matching products based on their name:

Beans configured in Spring application context:

client.xslt: replaces client:getStatus with actual value

Wednesday, September 28, 2011

Linux nice-to-know commands

How to retrieve fully qualified hostname?

How to copy file from one machine to another?

How to tail the last 100 lines of a logfile (in combination with more command)?

Sunday, September 11, 2011

Benchmarking HTTP requests using ApacheBench

After watching a presentation from Ryan Dahl about NodeJS I learned one nice benchmarking tool called ApacheBench. So I decided to give it a go on the simplest nodejs server.

Friday, September 2, 2011

Quartz Jobscheduler dashboard

I have a little project running at my customers site which basically is nothing more then a bunch of CRON jobs deployed as a Webapplication. As 1 Cron job seemed to fail from time to time I wanted to get some more insight into what triggers are defined, a way to pause or resume those triggers and check which jobs are currently running.

Here are some screenshots of my first prototype dashboard: