a refreshing com breeze

Thu, Nov 27, 2008

Looks like the SOA based provisioning project may be back on the cards but in a radically different form as IDM is looking too expensive to implement. However, the first task is to develop version 2.0 of the Siva system. I’m getting the notion to port the whole lot to C++. A third of it is in C++ already as Groupwise only has a COM interface to its admin functions, while the rest is in Java. I originally wrote the COM module as an exe as I thought it might be useful as a standalone app but that hasn’t proved to be the case. That means that Java has to load the exe on every account creation, which means the entire COM startup process is executed for every account, pushing the average creation time to around 50secs.

I could tune that by rewriting the COM module as a DLL and loading it into the main application’s process space on startup, so COM is loaded once, rather than for every account creation. But why stop there in efficiency savings? Why not go the whole hog and port it to C++? It’s never going to run on unix as it needs COM and splitting the COM part into a web service would send the average creation time through the roof. There’s a C SDK for Novell which I could use.

There was talk, years back, of Novell providing Java interfaces for the Groupwise postoffices but those never materialised and COM is the only way to create accounts in Groupwise programmatically. Luckily I’ve got a fair amount of COM/C++ experience but when I wrote the Groupwise module all I had to go on was a hunch. I opened the Groupwise client in a tool who’s name I’ve forgotten, it was so long ago but it was for loading DLL and EXE symbol tables. In the client symbol table I found lots of interesting looking functions, such as AddExistingUser. So I then trawled the net and came up with one header file, gwadapi.h, which gave me everything I needed. Stuff like:

It looks horrendous to a non C++/COM programmer but it was just what I needed.

Today I had a look at the latest Groupwise SDK from Novell and found to my surprise a samples directory, chock full of sample code. What a change 5 years makes! Only thing was, it was all in VB apart from one. So I’ll just have to dust off my old COM skills and get on with it.

comments powered by Disqus