Tuesday, June 27, 2006

Load-balancing with the TIBCO Portal

The TIBCO Portal (and perhaps other TIBCO web-based products) does not support load-balancing within the product itself. It is the responsibility of the servlet container to implement load balancing.

A brief explanation of the TIBCO system is necessary. TIBCO uses a product called the TIBCO Administrator (I'll call it the Administrator for short) to maintain an "administrative domain". This administrative domain consists of machines, servlet containers and software. Machines and servlet containers are registered with the Administrator. The TIBCO portal is packaged as an EAR which is deployed by the Administrator on the domain. The EAR contains several services (WAR files) which are deployed by the Administrator to one or more servlet containers registered with the domain.

You would think that you'd be able to deploy the portal services to more than one host and then place those hosts in the load-balanced cluster.

Unfortunately, you can't deploy most portal services to more than one servlet container in a domain. So, you can't do load-balancing this way.

As I said earlier, it is the responsibility of the servlet container to implement load balancing. The Administrator expects that the cluster behaves like a single servlet container, and that you register the cluster with the Administrator, not the constituent servlet container instances.

I wanted to do a load-balanced install of TIBCO Portal Builder under SunONE 6.1 SP4. This version of SunONE doesn't support clustering natively, and as I mentioned above, the Portal won't allow us to deploy services across multiple servlet containers. To work around this, TIBCO suggested that we install the portal on one machine, then copy (manually) the configured and deployed web applications to a servlet container on the other machine.

There is a snag with this approach, however. Some Portal services cannot be installed in this way. The BPS_PB, and CPS services must not be deployed onto more than one servlet container. So, to work around this, you have to place these services in yet another servlet container.

There is one final point with this approach. The Administrator appears to store the file system path of each registered servlet container in the Administration database. Each Portal service uses this information to find the file name of the servlet container configuration file (e.g. server.xml in SunONE) and parses this file on servlet initialisation. Precisely why this is necessary, I don't know, but the upshot is that:

  1. You have to install the servlet container in exactly the same location on both load-balanced machines, and

  2. You have to set the server name of servlet container on both the load-balanced machines to the same name.


If you don't, you won't be able to start the second server instance successfully.

Saturday, June 24, 2006

My and my "Canguro"

Well, here is a picture of me :-)

It was taken at a church function in Spain with my girlfriends' family. I was presented with a "Canguro" since I'm Australian!

Friday, June 23, 2006

Code Formatting for Blogs

It has been annoying me for some time that I didn't have properly formatted code in this blog. I could get it to either indent correctly but expand and ruin the page formatting (using <pre>), or line-wrap inappropriately (using <tt>).

Today I did a bit of web searching and found this excellent blog article on how to format ruby code for blogs. While the whole solution is a bit more than I need, inserting the following snippet of CSS into my blog style was just the ticket.

pre {
background-color: #f1f1f3;
color: #112;
padding: 10px;
font-size: 1.1em;
overflow: auto;
margin: 4px 0px;
width: 95%;
}


There's still a little bit that's not prefect (small <pre>...</pre> sections still look a bit funny), it's almost exactly what I was looking for!

Isn't the web wonderful :-)