Latvian Government Uses Linux

Mr. Komarov tells us how he used Linux to give an old database new capabilities and thereby saved his government money.

Recently I've found a new unusual use for Linux, which I have used successfully at work. Here is a list of machines and software I had to work with:

  • Local Ethernet network

  • Novell NetWare 4.10 file server

  • About 15 DOS/Windows workstations

  • Linux box as an IP router, mail server, etc.

  • A database application written in Clipper for MS-DOS, which contains more than 400,000 records

The Problem

This database application was written for a stand-alone DOS workstation about five years ago, and the most powerful computer we had at that time was a 386SX with 2MB of RAM. At one point we patched this program to add a little network support. The main database migrated to the NetWare file server, and the program worked with the server as if it were a local drive (Z:). Data is added to this database every day, and it has grown to more than 300MB in size. There are now 15 users connected to it, but the program itself remains the same as it was five years ago.

Each time a user searches the database, his workstation uses about 30 to 100MB of network traffic. The NetWare server shows 100% utilization and searches can last for hours. One day (it was a beautiful spring morning to be precise) my boss asked me to connect 10 more workstations to the database and to add remote access to the database via the Internet and dial-ups. I just about had a heart attack.

What Needed to be Done

Of course, we needed to rewrite our database from scratch with client server and Intranet support. Yes, we had to, but we are a government organization with a very limited budget. When I asked local software developers about the possible cost for this rewrite, they told me that because it would be a mission-critical client-server application, with extended network and Internet support, as well as maintenance, the price would be about $20,000 to $40,000. Now my boss had the heart attack. That's not all—our database is very special. It was written for very specific tasks and was tested for a long time with bug fixes added during the experimentation period. We just couldn't afford to write such an application ourselves from the beginning, going through all the same problems once again. And even more—we needed to add remote access to the database immediately, so we needed another solution.

The Solution

I have used our Linux box to solve some of these problems in the following ways:

  • I moved the database from the NetWare file server to Linux.

  • I installed the most recent version of the DOS emulator (dosemu-0.64.3) available at that time.

  • After configuring and starting up the dosemu, I mounted the directory with my database as a local disk (Z:) in dosemu and installed the application.

  • I started the application to be sure it worked—it did.

  • I configured dosemu to use the exact amount of memory my application needed, and I checked the terminal specific configuration lines in the dosemu configuration file.

  • I made a TELNET connection to my site and started dosemu with my application—this also worked.

  • I made a dial-up connection to Linux and started dosemu from the shell prompt with the application—it worked again.

  • I started X using xdos--another success. Oops, now I was running four copies of my application at once.

  • Last, I shared the database directory via Samba or MARS_NWE (NetWare server emulator for Linux), mounted it on the other workstations as a normal database disk, and it worked that way too.

Perceived Gains

Our DOS/Windows workstations can continue using the database in the old manner. All that has changed is that the file server for the database is now Linux, and clients can be connected to the database not only via NetWare protocol but also via the Microsoft Network using Samba—not bad.

Since more than one copy of the DOS emulator can be run at one time on Linux, it is possible for users to access the database from the Linux console, the X Window System, an X terminal, a serial terminal, a remote TELNET connection and a remote dial-up connection. Note that if the database application is started from dosemu, it works 10 times faster because, in this case, it uses data not on the network but on a local drive.

After using this configuration for about two months, I've found running the application from dosemu on Linux is more stable than running it from Windows 3.11. There are some tricks to prevent data loss in case of a broken remote connection to dosemu. By the way, while experimenting with MARS_NWE, I found it to be very stable, powerful and fast. Data transfer speed from Linux via MARS_NWE remains almost as fast as it was from the native NetWare 4.10 file server, so users connected from DOS/Windows workstations do not see much difference. And all this was accomplished during one night without any programming or additional capital investment.

Dmitrie Komarov is the Network and System Administrator of the Police Department of Riga, Latvia. He wrote his first programs in BASIC when he was 11 years old and had never seen a computer. He has been a Linux fan since kernel 1.2.13 and expects to remain one forever. He can be reached via e-mail at dmit@rgpp.gov.lv.

______________________

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState