Oct 27
GMail IMAP and Thunderbird troubles
icon1 Niklas | icon2 Tags: . | icon4 10 27th, 2007| icon35 Comments »

I’m trying out the new, much hyped GMail IMAP support. I added the account to Thunderbird but pretty soon ran into troubles. It seems like Thunderbird has serious issues with folders containing large number of messages. My inbox currently has 65065 messages, which doesn’t seem that much. The problem manifest itself by Thunderbird being excessively slow doing anything to any mail in the inbox, some actions (like junking) not working at all. I’ve also seen Thunderbird using more than 1 Gb of RAM before I had to kill it. If I choose a folder with less messages, like one of the folders based on a GMail label, everything works as expected.

The mouse marker is pretty much pegged in hour-glass mode, still it doesn’t seem to use that much CPU.

I’ve noticed a similar problem before with a POP based folder that stopped working properly as it grew too large. I’ve googled and searched the Thunderbird Bugzilla without finding anything obvious. Anyone got any suggestion before I add a confused bug report?

Oct 27
to:read
icon1 Niklas | icon2 Tags: . | icon4 10 27th, 2007| icon3No Comments »

Pete Lacey started a thread on peoples favorite reading material over at the service-orientated-architecture mailing list. Quite a few people has chimed in and the list is getting pretty extensive. Mike Glendinning’s list is in itself impressive. Anyways, I collected the suggested books into an Amazon wish list for easy consumption. Enjoy.

(Having a slow evening by myself, watching Heroes, eating a nice piece of pecorino and drinking a bottle of Oxford Gold. Could be worse.)

Oct 27
Building CouchDB on Gutsy
icon1 Niklas | icon2 Tags: . | icon4 10 27th, 2007| icon3No Comments »

Today I installed a very basic Gutsy box just to try out some stuff. The first thing was to try out the new CouchDB features, including their new build system. I used the instructions by Ciaran Gultnieks with a few small changes. Worked excellent.


sudo apt-get install libicu36 libicu36-dev libreadline5-dev
sudo apt-get install subversion-tools xsltproc automake libtool
sudo apt-get install erlang
svn co http://couchdb.googlecode.com/svn/trunk/ couchdb
cd couchdb
./bootstrap
./configure --with-erlang=/usr/lib/erlang
make
sudo make install

As you noticed, the differences are that I needed to install Erlang and Debian/Ubuntu sticks it in /usr/lib/erlang rather than /usr/local/lib/erlang. I also used the latest trunk, not a fixed revision. After building, you start it with:


couchdb

After which you can connect to CouchDB at http://localhost:8888 and specifically the new amazing util client at http://localhost:8888/_utils/. CouchDB is very slick.

Oct 27

I just upgraded my Wordpress installation (the one used to publish this post) to the latest 2.3.1. Upgrading WP is easy, but boring so this time I decided on putting some additional work into the upgrade by switching to the SVN based install described here. Worked like a charm and future updates should now be as easy as running svn switch. I keep the rest of my site in my private SVN since a few years back. That means I would like to keep my WP customizations (like wp-config.php, plugins and themes) in my own SVN and then interleave their working copies to make up the final site. Haven’t yet figured out how to best do this. Tried soft linking my custom files into the WP checkout, but that blew up WP.

Oct 20
Isn’t that work email?
icon1 Niklas | icon2 Tags: . | icon4 10 20th, 2007| icon3No Comments »

I’m using GMail for both my personal and my work email. That means I have to remember to choose the correct From address for different recipients. I usually don’t.

Greasemonkey to the rescue. I searched userscripts without finding anything that matched my needs, so I wrote one. It quite simply asks you for your work email and a set of patterns to match for. For every email you then compose, it will search the To field for the patterns. And if one match, and your From address doesn’t, it will warn you. Works for me. For the patterns, I keep a list of the domain names for the clients and partners I work with.

Now, this is my first Greasemonkey script so please be kind, but report back any troubles or improvements. Also, I’ve found that other scripts I’ve used for GMail as frequently broken due to Google updating the site, if this happens to this script I’ll be happy to keep it in shape if you remind me.

Technorati Tags: , ,

Oct 19

Sometimes, when you’re out of luck, you need to use the old Base Java API for WebSphere MQ. That is, not JMS. And you might need to create, or even worse, read a RFH2 header. If this is you, you probably loath the mess that is the RFH2 header structure. It’s a mix of a leading binary structure, followed by zero or more almost-XML structures. I have yet to see a complete specification.

So, what’s a poor hacker to do. I’ve written up a utility class for creating and parsing RFH2 headers as part of the wmq-util library that I’m doing at work. The aim is simple: make it easy to use RFH2 headers without any risk of screwing up. Enjoy and report back bugs and suggestions.

Technorati Tags: , , ,

Oct 14
WMB init script
icon1 Niklas | icon2 Tags: , , . | icon4 10 14th, 2007| icon34 Comments »

For a client, I recently had to install a WebSphere Message Broker on Suse Linux. This also means getting it to start at boot time. Now, as far as I’ve been able to locate, WMB does not come with a init script. For WebSphere MQ, IBM recently added a service pac, MSL1, that does exactly this, but so far no luck for WMB. SLES uses LSB compliant init scripts, and has a command called insserv which automatically sets up the soft links to make all components start it the right order based on the dependencies you define as metadata in your script. So, with no further ado, here’s my current stab at the script:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          wmb
# Required-Start:    $syslog $network $remote_fs ibm.com-WebSphere_MQ
# Should-Start:      db2
# Required-Stop:     $syslog $network
# Should-Stop:
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: WebSphere Message Broker
# Description:       Starts WebSphere Message Broker
### END INIT INFO

# Source /etc/rc.status:
. /etc/rc.status

# Reset status of this service
rc_reset

case "$1" in
    start)
    	echo -n "Starting WMB "
    	su - mqm -c 'mqsistart BRK1D;mqsistart CFGMGRD'

    	# Remember status and be verbose
    	rc_status -v
	  ;;
    stop)
    	echo -n "Shutting down WMB "
    	su - mqm -c 'mqsistop BRK1D;mqsistop CFGMGRD'

    	# Remember status and be verbose
    	rc_status -v
	  ;;
    try-restart|condrestart)
	    ## Do a restart only if the service was active before.
	    $0 status
    	if test $? = 0; then
    		$0 restart
    	else
    		rc_reset	# Not running is not a failure.
    	fi
    	# Remember status and be quiet
    	rc_status
	  ;;
    restart)
    	## Stop the service and regardless of whether it was
    	## running or not, start it again.
    	$0 stop
    	$0 start

    	# Remember status and be quiet
    	rc_status
	  ;;
    force-reload)
    	$0 try-restart
    	rc_status
	  ;;
    reload)
	    rc_failed 3
	    rc_status -v
	  ;;
    status)
	   echo -n "Checking for service WMB "
	   /sbin/checkproc /opt/ibm/mqsi/6.0/bin/bipservice
	   rc_status -v
	  ;;
    *)
	    echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
	    exit 1
	  ;;
esac
rc_exit

Note that the script will start WMB as the mqm user. If this is not what you want, you will have to make your changes at the su commands.

To use, create a file called /etc/init.d/wmb and paste the above content into. Make sure it’s runnable with:

chmod +x /etc/init.d/wmb

The run:

insserv wmb

And it should set everything nicely for you.

Note that this script is dependent on the WebSphere MQ init script, as provided in the support pac mentioned above. It will also start DB2 beforehand, if available. In my case, we are using DB2, I’m just not happy with the current script I got so I will hold off publishing it until I’m done.

I will be happy to get feedback in the comments on my attempt and will update the code above with any changes.

Technorati Tags: , , , , , , ,

Oct 13
XML geekdom
icon1 Niklas | icon2 Tags: , . | icon4 10 13th, 2007| icon3No Comments »

One of my favorite blogs has to be Michel Kay’s Saxon diaries. If you’re not already familiar with Michael Kay, he’s one of the, if not the, foremost expert of XSL-T and related technologies. And he’s the sole creator behind Saxon, the best XSL-T engine around.

His posts usually deals with various improvements, mostly performance related, to Saxon. And they deal in very great detail. More than you will ever need, but still it tells you a lot about how to improve on a stable code base. The two most recent posts are excellent examples.

Oct 13
gMove
icon1 Niklas | icon2 Tags: . | icon4 10 13th, 2007| icon3No Comments »

As I’ve mentioned before, as part of switching job, I also moved all my email usage to GMail. Since I had some 2 Gb of Outlook .pst files sitting around since before, I thought I should attempt to move these over to GMail. Having them available for searching would be most valuable.

With the help of Scott Hanselman’s guide to moving to Google Apps , I found gMove. gMove is a clever hack that works around GMails import limitation by moving your emails to a special purpose POP server that gMove runs. It also uses the GMail API to automatically set up an POP account and the necessary filters to label your imported emails. It then scans your Outlook folders using the Outlook API and starts moving mail over. Once I got going, the import to gMove took a weekend. My emails then started dripping into GMail. The POP import in GMail has a throttle of about two mails per minute. As I was moving some 35000 emails, I had to sit down and wait for a while. 12 days to be more exact. Lucky I’m not this guy .

But they got over and are now available for all my searching needs. And backed up using the GMail POP server of course.

Turns out this put me very close to filling the available 2911 Mb of space that GMail offered. So, this announcement could not have been more timely.

Now I’m looking into getting my very first emails from my account at Linköping University. The account looks like its still around, hopefully the emails are as well.

Picture by Brian Scott under a CC license

Technorati Tags: , ,

Oct 12
zyb
icon1 Niklas | icon2 Tags: . | icon4 10 12th, 2007| icon32 Comments »

As part of switching employer, I had to turn in my old phone and get a new one from the new job. It turned out to be a Sony Ericsson P1i which so far seems pretty decent. On my former job, we use an Exchange infrastructure which meant using Outlook. On the new job, we don’t, which means using GMail and GCal. By the way, its been wonderful. Only, there is the issue of syncing the calendar and contacts to the phone (I don’t care for syncing email or tasks). Calendar sync was quickly in place with Goosync, an excellent service that I’ve used previously.

Contacts on the other hand was a completely different story. I have previously used Plaxo, which seems like the major player in this area before. However, they stubbornly refuse to support SyncML, the protocol used by Sony Ericsson and instead focuses on syncing with Outlook and then pointing to the mobile manufacturers support for getting contacts from Outlook to the phone. No good. Besides, I really don’t like the new Plaxo beta, trying to be a address book, GCal, Twitter and Facebook at the same time. Do one thing, and do it good.

A bunch of other ways was tried, including Scheduleworld and a Funambol plugin for Thunderbird. None turned out to be anywhere near satisfactory, or even working. Then I out of the blue remembered Mårten twittering on zyb, a site in beta which claims to do phone syncs. After creating an account and setting up SyncML on the phones, it took less than 5 minutes for me to transfer all contacts between the phones. A few minutes I had cleaned out some old contacts I no longer need and resynced. Perfect.

Now, two weeks later I keep adding contacts in both locations (the zyb site and my phone) and occasionally sync to keep them both updated. So far works flawlessly.

Update: Chris comments that GooSync as adding contact sync. Hopefully they will get it right and could then be a one-stop solution for my needs. I’ll post an update here.

Technorati Tags: , , ,

« Previous Entries