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: , , , , , , ,

Jun 12
Surprised by reality
icon1 Niklas | icon2 Tags: . | icon4 06 12th, 2007| icon33 Comments »

I’m a big fan of Wikidpad and use it for most (if not all) of my digital notes (a trusty Moleskin does the trick for those analog ones). Today I was in a meeting discussing a set of integrations between a few applications. Pictures was drawn on the whiteboard and I was somewhat desperately trying to convey these into wiki text. The results wasn’t all that good. This scenario has been played over and over again and I have tried a large number of different replacements for Wikidpad that would be somewhat more “rich” in their content, for example OneNote. Still, every time I have returned to old, trusted Wikidpad.
Now, while in the meeting today I thought that the pictures drawn would be perfect to draw using dot from GraphViz, another favorite of mine. I went into my text editor and hacked up a simple dot file that described that integration scenarios being discussed. When I was about to save the file, it struck me that since it just text it would be better suited to store it right there in the wiki. I thought that some Python (that’s what Wikidpad is written in) hacker should fairly easily write up some code to render it for me. When I was about to start writing an email begging at people over at the dev list, it actually struck me to look at the extensions already shipped with Wikidpad. Lo and behold, right there is was, GraphvizClBridge.py. And nicely documented as well. So now I got perfectly beautiful dot images just where I want them. Couldn’t be happier.

Mar 31
Office 2007 horrors
icon1 Niklas | icon2 Tags: . | icon4 03 31st, 2007| icon33 Comments »

A couple of weeks back I made the mistake of upgrading my Office 2003 to the bright and shiny Office 2007.

First of all, the new ribbons (huge toolbars for those of you who haven’t seen them) replacing menus are just pissing me off. The first couple of days I thought I was just going to adapt and learn how to find stuff on the ribbons. Simply put, this has not happened. I’m still struggling to find even to most basic things, adding significantly on the time I need to spend on tasks I don’t even enjoy doing. Adding insult to injury, there are things that I used in Office 2003 that I haven’t found at all (such as resetting the language on a selection in Powerpoint that contains mixed languages, the button just disappears). Not sure if it gone or if I’m just to stupid to find it among all icons and random buttons in strange locations (how about that Options button hidden at the bottom of the new application icon menu). And if these ribbons are all that good that Microsoft choose to throw out all menus (without any way of restoring them), shouldn’t they be used in all Office applications? Outlook still uses the menus just like before.

Second, I can’t seem to find options I used in Office 2003. The options panel back then was, arguable, pretty complex due to the amount of options. The new is greatly reduced in complexity, as far as I can see simply by removing options. That’s not a good solution.

Third, the performance is just crap. I’m on a fairly new Thinkpad with 2 Gb of RAM, one would think applications should be running blazing fast (most other do). However, all the Office applications are ridiculously slow. Opening a Word document now takes something like three times longer than in Office 2003. Outlook now integrates the indexed search that previously was available using the excellent Lookout plugin. Lookout was able to find all matching emails quite a bit quicker than the new search even switches to the search result panel, let alone shows any results.

Is this really the best Microsoft can do on their flagship product? They should have all their smartest people working on the Office team (those not busy with Vista of course) and still, this is the crap they ship? I just set OpenOffice to be the default option for all Office documents and I’m very happy with that choice. Writer will start and open a Word document faster than Word manages to show the splash screen (yes, really). Unfortunately, I’m still on Outlook as I have yet to find a worthy replacement, Evolution on Linux looks promising but doesn’t yet have the polish. But, at least Outlook (still) has menus.

All in all, moving to OpenOffice only makes my planned migration to Ubuntu that much easier. So, the end result might be positive.

Jan 30

Just had to try out the new blog feature in Word 2007. So far it looks good, although I’m still really confused about the new menu interface. Couldn’t even find the Open menu option until after clicking on all menu options at least twice I realized that the little circle in the upper left was slowly blinking.

Now for some HTML
torture
.

Update: the simple HTML test above didn’t turn as perfect as one could wish for. A <br /> tag was inserted before “torture”, but that seems to be a bug in Wordpress rather than Word. Besides that, Word seems to create the “correct” tags, such as <strong> rather than <b>.

Jan 16

I’m a heavy user of the del.icio.us extension for Firefox. One thing I really love is to open up the boomarks (click the checker button on the toolbar), enter a search string and find what I need.

This weekend however, I had to prepare a presentation on IBM WebSphere Service Registry and Repository (great name, isn’t it). Since I was going to sit in the library, without any network access (that’s how I get boring work done) I needed all my bookmarked pages pre-loaded. So, I opened up the wsrr tag and right-clicked and choose “Open in tabs”. Lo and behold, not only did it open my bookmarks, it also closed my already existing 50-or-so tabs. Not so great.

The del.icio.us developers take bug reports and feedback on a Yahoo Group so I posted my problem there. And, a few days later I got this reply saying that this actually happens due to a change in a Firefox update. Workaround provided and tested to work as expected. While I certainly don’t agree with the default behavior, it’s at least nice that you can change it.

Nov 20

Almost a year ago I wrote a piece on Google Pack, suggesting it would be the apt-get for Windows. Well, turned out that nothing much happened about that. So far all there is in the Pack repository is the stuff that was in there from day one, and now also Skype (however it doesn’t seem to be available in Sweden, funny as it was built by a swedish guy). Not a lot of progress in 11 months. So, I went googling for alternatives. Found two that looks active: win-get and InstallPad. win-get looks most promising as they actually got a fairly large repository, but the activity there seems low (for example, Firefox 2.0 is still not in the main repos). There are also other issues, most notably lack of automatic upgrades to what you already got installed.

So what’s holding back open-source developers from creating a strong apt-get alternative for Windows? Like on Linux, it will require strong governance around the packaging. But that’s perfectly doable. Another problem is that Windows applications are not as easy to install silently as their Linux counterparts. All types of funky GUI installers exists and judging from the win-get repos there are quite a few that lacks a silent install option. Even so, it is possible to create your own installers that fixes this problem. At work, our sister company Zipper does exactly this in there commercial FastTrack and AppLine products. FastTrack is apt-get for Windows inside your firewall and works quite well.

And, I really don’t get it why Google released Pack and then just seems to have lost all interest in it. They still have an outstanding possibility of getting open-source applications to the masses, and in a good and controlled fashion. That would certainly be very competitive with Microsoft.

I would be very interested in hearing about additional solutions in the area as I’m sure there a quite a few around that my Google searches has found.

Nov 17
Dark Room 0.8b
icon1 Niklas | icon2 Tags: . | icon4 11 17th, 2006| icon31 Comment »

The wonderful full screen editor Dark Room as just gotten slightly better. Version 0.8b is out with nice looking highlightning. If you’r like me and get really easily distracted while trying to write prose (I can focus when writing code), you should probably try out Dark Room or one of it’s similar friends.

May 14
Software I use
icon1 Niklas | icon2 Tags: . | icon4 05 14th, 2006| icon31 Comment »

Inspired by Alex Bosworth’s list of software he use, here’s mine. I will try to keep this updated as it evolves.

  • Windows XP: Runs on my laptops, still required for some software for work.
  • Ubuntu: Runs on home server. Would like to use it for the laptop as soon as possible
  • Firefox: browser supreme
  • Microsoft Office: for work related documents
  • OpenOffice: for personal documents (in ODF format)
  • PSPad: text editor of choice.
  • Subversion: used for storing and versioning all types of files
  • Eclipse: Used for all types of Java development. I use it with some plugins. Subclipse: Subversion client, Quantum DB: database administration tool, Mavenide: Used mainly to sync Maven with the Eclipse project.
  • µTorrent: excellent BitTorrent client
  • foobar2000: lean MP3 player
  • GTalk and Trillian: IM clients, still not sure if these are really the best options
  • VMWare: for testing and development on other platforms
  • Password Safe: for storing all types of passwords in a safe way
  • Putty: for SSH access to servers everywhere
  • WinSCP: for moving files to remote servers
  • wikidpad: for taking notes
  • Baretail: excellent GUI tail

Online services

Dec 27
Subversion as database
icon1 Niklas | icon2 Tags: . | icon4 12 27th, 2005| icon32 Comments »

After being a heavy subversion user for the last year or more I’m inclined to declare it the perfect tool for storing versioned documents. Of all types of SCMs (e.g CVS, VSS) and document handling systems (e.g. Documentum) I’ve worked with, SVN is the clear winner due it is very straightforward nature (it’s simply a versioned file system) and simple API (RESTish). Excellent clients like TortoiseSVN and Subclipse doesn’t hurt either. Of course, it doesn’t do everything every other system does, especially when compared to the high-end document handlers like Documentu. But then on the other hand, who really needs that functionality? Mostly you just want a safe way of storing your documents in a way where you can browse, retrive, change, revert and possibly audit them. And subversion fits those use cases significantly better than any other tool I have any experience with.

Now, to stretch this a bit further I was thinking of other systems where using subversion as storage might be useful. Especially in systems where you handle versioned document-type data. Two types of applications seems obvious to me: wikis and blogs. In both of these, the primary data is a clob with some metadata (like author and a publishing timestamp). In wikis especially, versioning is crucial due to the nature of multiple, possibly anonymous (or spamming) authors. I bet that basing a wiki around subversion instead of inventing your own RDMS based revision system will be significantly easier and require less coding. And with the native libraries for the popular programming languages (e.g. Java, Ruby, .NET, Python), this is bound to get even easier.

I can see one obvious issue, scalability. Subversion is built for a limited number of concurrent users, not what would be expected from a popular wiki or blog. This is an area where the traditional databases excel. However, for cases where you have more readers than writers (as would be expected for a blog or wiki), this can be solved using caching.

As an additional bonus, for applications using their wiki as the main documentation (like Geronimo), you could cut releases of the online documentation in the same way as you do with the rest of your artifacts, simply by tagging. It would also be easy to incorporate in your standard build process, for example with a wiki storing the text as APT (or other foramts as markdown) you could use Maven to tag, compile your code and build a PDF for the documentation using nothing more than the standard Maven plugins.

Does anyone know of any application built this way? I would be very interested in feedback on these ideas.

Jan 23
Subversion
icon1 Niklas | icon2 Tags: . | icon4 01 23rd, 2005| icon3No Comments »

Today I migrated my personal repository (mostly some documents and a few software projects) from CVS to Subversion 1.0. Installation was very smooth:

  1. apt-get install subversion
  2. apt-get install libapache2-svn
  3. svnadmin create /data/svnroot
  4. chown www-data.www-data /data/svnroot
  5. htpasswd2 niklas
  6. Configure Apache2 to locate the svnroot
  7. Done

After that I simply imported a snapshot of the files, I didn’t care all that much about the history of the files, but if I did I’m sure that the migration scripts would work just fine.

For lots of more information on making this transfer, see this writeup by Simon Tatham, the maintainer of Putty.

I’ll post some more later after I’ve been using svn for some time but so far its looking promising.

« Previous Entries