Product Review: Desaware NT Service Toolkit 1.1
Product: NT Service Toolkit 1.1
Manufacturer Desaware Inc.
1100 East Hamilton Ave, Suite 4
Campbell, CA 95008
Developer Requirements: Windows / VB6
The ascendancy of the Internet Age brought several new paradigms to bear on developers and users alike. Aside from the obvious ones, like the universal acceptance of HTTP and FTP for example, there are secondary - or less than obvious changes. And even in the web-services happy days of 2002, I'm sure you know customers or collegues who are still working with COM based software under Win2000 or NT. Corporations just don't change on a dime. Which is the reason why a tool like the NT Service Toolkit is very appropriate.
While the Internet has made its way into many corporate IT shops, some of the changes that come with it aren't quite so obvious. I’m talking about the kind of changes that you don’t think about very much until the day when some task or project quickly bring them into focus. TCP/IP is one of these pieces of the puzzle that I had not given any consideration to, until the day when a special project required an automated data exchange mechanism between servers located on two different continents. Maybe it’s just my naiveté, but I was exited when the project was up and running and two servers using different operating systems , Unix & Windows, with two different databases, Oracle & SQL Server, were happily pumping data back and forth between the U.S. and Switzerland. While undoubtedly the Web has garnered the lion share of attention, I felt the plumbing that made it possible for the web to be the scene stealer in the first place was equally as important. This project more than illustrated the point to me.
How then does my anecdote fit with the subject of this product review? In a word – beautifully. You see “NT Service Toolkit” by Desaware is one of those little known goodies that allow you to positively create “magic” using low level components like TCP/IP, FTP – you name it. Actually I wouldn’t want to prejudice your perception of this tool, since I can only imagine a certain set of uses. In the hands of a variety of developers, this tool could be the equivalent of an artists brush. Every artist uses one, but each artist’s work is different. That’s what the “NT Service Toolkit” reminds me of. Once you get going with it, you’ll find more and more ideas.
As indicated by the name, the toolkit is designed to allow a programmer to create a bonafide Windows Service using Visual Basic, and run them on either NT or Windows 2000. You may already know that a great number of components of the NT and Windows 2000 Operating System function as a service of some sort. Especially W2K adopted that notion, calling everything under the sun a “service”. COM and MTS became COM+ Services, network administration settings became “network services” , and IIS shows up as web services.
A service is an executable with certain differences from standard executables. As a programmer you would be interested in creating a service to develop applications that mimic the key characteristics of other NT/W2K services such as :
- Starting and stopping automatically when the system is booted
- Running without a user logging on and continue running after a user has logged off
- Running under a different security context than a logged in user.
Typically services can fall into certain categories such as system monitors, background tasks, agents, resource pools and business objects.
Most importantly, services differ from regular executables in the manner in which they utilize threads. A normal executable is assigned an initial thread upon launch and may optionally spawn additional threads, which always remain under the control of the primary EXE. A service, on the other hand, maintains always at least 2 threads; one belonging to the service executable the other being a handler thread that is used by the operating system to control the service executable.
Obviously you can’t just put together a VB executable and expect it to work as a service would. Enter the toolkit. It creates an executable that is configured with a small utility provided by Desaware, and contains just a minimal amount of information needed for a real service while allowing you to write COM components that are hooked into this executable and deal with all the business logic that you want to take care of. The small service executable is responsible for the necessary main thread, handler thread and any additional threads used to wait on NT synchronization objects as well as any threads needed for client support. (Insert Fig 1 here Caption: The Service Configuration Wizard helps to gather the minimum information needed to create a proper Windows service)
Enough with threads already! I know it sounds a little much at first but have a look at the following screen shot. It is a sample of a service that, as its sole reason for being, beeps at specific intervals. (Insert Fig 2 here) Notice that the entire service consists of 2 classes. Most of the action takes place in the class aptly called “Service”. Of course the method calls shown in the illustration look a little odd, but trust me with the well written manual provided by Desaware you’ll be up and running in no time.
Desaware Inc. is owned by Daniel Appleman, one of the more capable members of the U.S. Visual Basic community. This fact was apparent in the quality of the “NT Service Toolkit” as well as the quality of its manual. It was very gratifying that from the time I cracked the manual to the execution of my first service I was mostly reading the instructions, not debugging or trying to find workarounds. I didn’t produce a very elaborate example, rather a small service that would send e-mails at the expiration of a timer. But you know something – it was great fun! The toolkit works as advertised, and considering it has been on the market for a while, you can rest assured that it is as bug free as it can be.
I can’t begin to imagine the number of uses a product like the “NT Service Toolkit” could have in the hands of some creative developers. The server to server functionality I’ve mentioned in the beginning of this review is typical of a lot of projects that are coming up at the moment. Businesses need to have machines communicate with one another and execute processes independently. The “NT Service Toolkit” is one weapon in your arsenal that would allow you to accommodate such needs with a kind of finesse that makes you stand out as a developer. So go ahead and check it out! And when you write something that blows your bosses socks off, don’t forget to send a little thank you e-mail to Daniel Appleman at Desaware Inc., without whom it may have been a whole lot harder to accomplish the same goal.
|| © Copyright
5/2/2004; 7:24:03 PM.
This theme is based on the SoundWaves
(blue) Manila theme.