OS/2 eZine - http://www.os2ezine.com
Spacer
16 September 2001
 
Andrei A. Porodko is a member of the 3rd Eye development team.

If you have a comment about the content of this article, please feel free to vent in the OS/2 eZine discussion forums.

There is also a Printer Friendly version of this page.

Spacer
Previous Article
Home
Next Article


Check out the Mesa/2 at http://www.sundialsystems.com/mesaos2ezine


This is Not Just a Net Drive. Everything is connected.

I have been working with computers for more than 15 years. Ten of those years with personal computers. In my practice I saw a lot of different programs written in various programming languages for many platforms. There were small programs and big ones. And I dare hope I was taught to appraise the program's beauty, the beauty of a program's "idea". Perhaps, I'm still using OS/2 thanks to the fact that OS/2 is based on the "idea". Of course I know the difference between the "idea" itself and the final product. Anyway I'm sure every program should have its own "idea".


I'm very keen on personal digital assistants (PDAs). In particular when they became functional enough for everyday utilisation. When we bought several Psion PDAs for our company, I wrote my own utility to transfer files between an OS/2 machine and a Psion. Although it was a useful program, I dreamt about an IFS (installable file system) which would provide seamless Workplace Shell and OS/2 integration.

Programmers know that writing a driver (an IFS is a kind of driver) isn't an easy task even for experienced professionals. At that time I met the "Idea" I was looking for. It was embodied in the NetDrive project. Beta versions of NetDrive 2.0 allowed one to create external plugins. That was the route I had searched for. And that was a very nice route! Many programs can use additional third-party modules. But I've never seen such an interface for drivers before (maybe just in the good old times on the RSX-11 when drivers were loadable.) NetDrive gives the ability to write a driver without actually writing it. Moreover, I think it is a real step forward in file-system design. Everything that could be represented as a set of files, can be accessed through a suitable plugin for NetDrive. And it is not just any access, it is uniform access. NetDrive has one control centre for any type of resource regardless of where they reside: locally on your computer, on your LAN, or somewhere in the Internet. But it is not enough to just sing the praises. Because I was one of the first NetDrive plugin developers, I thought my experience with this product could be interesting to the readers of the OS/2 eZine.

NetDrive consists of four main parts :

  • "NDFS.IFS" - virtual IFS driver which should be loaded from "Config.sys" file during the boot process;
  • "NDCTL.EXE" - file systems manager-redirector (control program) which can be loaded at any time you need, but it is preferable to let it run at system startup. When this manager starts, it loads plugins listed in ndctl.cfg;
  • "ND.EXE" - the end user command line utility for attaching drive letters, creating mount points, mounting resources, etc.;
  • "NDPM.EXE" - a PM version of ND (PM Control Centre) for the same purposes as is was mentioned before for "ND.EXE".

Despite the fact that I like the command line, I prefer PM Control Centre for NetDrive. It's a very powerful utility to do everything you would need to do with NetDrive. NetDrive uses terms unfamiliar for a ordinary computer user, which come from old computer systems and UNIX. Those words are "mount", "mount point", "resource". In fact those words are very clear if we look at the process of accessing a resource closer. As I said before, first of all we should be aware that NDCTL is running. Look at the screen shot below, it's very easy. You have to create a new drive letter, because OS/2 works with file systems using drive letters. Drive letter creation means the same as "Attach new drive".

Now you can "mount" resources. "Mount" means that with this command you're making files on the resource you need visible and accessible for any OS/2 program. If you plan to use more than one resource simultaneously, you should be able to separate them somehow. You, probably, would not want to have two different resources at the same location. Of course you can attach a new drive letter from the second resource, and mount different resources on different drives. But don't forget you've got only 24 letters ;-). There is also a "mount point" mechanism. You have to create a pseudo-directory on the attached drive letter and than mount a resource to this mount point. All files and directories from the resource will be visible inside this pseudo-directory. As you can see, "mount-point" means a directory on the NetDrive's drive. Look at the next screen shot, where a tree of mount points created (and actually mounted) for three different resources is shown:

The last step you have to perform is the mounting itself. Due to the various nature for the different resources you probably will have to indicate some specific parameters. For Ftp-resource they are :

Don't be afraid of the number of parameters, plugins have an elegant help system and most of parameters have a default value. You can get help about any of those parameters and their allowed values. Moreover you don't have to perform all described steps every time you need a NetDrive resource. Look at the NDPM windows carefully again. There are two buttons: "Save" and "Load". "Save" - saves all current mounted resources with their parameters, all drive letters attached, and all mount points created. When you next press "Load" and choose a suitable configuration, you will get those resource's environments back. Let's illustrate the power of the NetDrive "idea". The next screen shot is a part of my desktop, it shows some different resources mounted and opened.


[Click on image to view full size.]

Another of NetDrive's advantages is its size. It occupies only 500 kB on my hard disk and I have support for my Psion, my digital camera, FTP, NFS, Windows VFAT, CDROM ISO images and for the Secret Drive.

In conclusion I want to talk about writing plugins. As a programmer I can say it is quite an easy task - you just have to carefully follow some simple rules. There is a toolkit for NetDrive plugins available upon request. It includes an example of plugin, which you can use as a skeleton in your work. I wrote two plugins myself and I'm going to write one more (for the ThirdEye project). There are some extra plugins written by independent programmers, for example the ISO CD images plugin and the Secure Drive plugin. You can see a full list of plugins at the NetDrive's home page.

Someone said - "The beauty is power." I can add "The beauty is power when it is beauty of idea."


Glossary

Descriptions were taken from IBM's Glossary of Computing Terms.

plug-in: A self-contained software component that modifies (adds or changes) function in a particular software system. When a user adds a plug-in to a software system, the foundation of the original software system remains intact. The development of plug-ins requires well-defined application programming interfaces (APIs).

mount: To make a file system accessible.

resource: Any facility of a computing system or operating system required by a job or task, and including main storage, input/output devices, the processing unit, data sets, and control or processing programs.

Previous Article
Home
Next Article

Copyright (C) 2001. All Rights Reserved.