Onyx

Michael Kraehe

Issue #1, March 1994

We continue to see database applications being developed in fourth generation languages (4GLs), and we continue to see more and more sophisticated (and expensive) 4GLs. Onyx is on the other end of the spectrum, offering a 4GL that takes advantage of the tools built into the operating environment under which it runs. This effort also shows that it is possible to earn a living working with free software.

Onyx is a tool for rapid prototyping of database applications. The theory behind Onyx is that any application consists of the following:

  • Internal tables to store temporary data

  • Masks to view and edit the date

  • Transactions between the internal tables and the rest of the world

Transactions can be bound to a menu, an input field, a function key or to the change of the current row of the cursor. So if the user selects a menu item or leaves an input field by pressing return the transaction will automatically be started.

Unlike other 4GLs, Onyx doesn't hide your environment (UNIX/Linux) but gives you the full functionality of the shell. For example, this is how we could print letters using data in an Onyx table combined with the capabilities of shell commands.

export table to pipe {
        awk | mailmerge | groff -Tps -mm | lpr -Pps; }

It is also possible to import a table using shell commands as in the example below:

import table from pipe {
        tar xvf /dev/rmt0 | sed "s/ *-> */->/" | sed "s/  */     /g"
        | sed "s/[^]*$/&  &/"; }

And, of course, it is possible to export or import to an SQL statement.

Onyx needs a SQL database which is doing the real work. So its possible to use a SQL anywhere in your Net. I'm normally using Informix on a Sparc II or Ingres at home under Linux.

Databases are named as database%engine@host.domain. Supported engines are currently GNU-Awk, Informix, Ingres and SHQL.

The last one (SHQL) is a genius shell-hack which is parsing the SQL by the shell and doing the job by awk. Of course that's really slow. It is included because that is where my idea for the Onyx project came from. Also, you need SHQL because it is used to manage the schema definition (create table, etc) for gawk.

Current System

Why did I write Onyx?

I started looking at Linux in late 91 and since MCC 95c+ I've thown away Xenix and am using Linux at home. As TCP/IP got into 98p1 kernel I thought about using Linux as a client for databases.

In winter 92 I began a project for the ”Wasserwirtschaftsamt Bremen“ called ”Verwaltung von Anlagen mit Wassergefaehrdenden Stoffen“. They had a Siemens MX 500 which was so slow that it was possible to roll a cigarette and smoke it to the end when somebody wants to do a query.

I told them that ”Client/Server computing is the only solution" and they installed my suggested hardware consisting of a Sparc II and 8 PCs. Having Linux in mind I gave the PCs 8 MB of RAM and a Tseng video card. This was the right idea as I saw later.

Informix SE and NET for the Sparc were delivered together with Informix for MS-DOS. The port of the old database and program was only a job of character conversation between DIN to MS-DOS. (In Germany we always have a umlaute problem.)

The hardware was installed as described above. It was fast enough to do the querys in just a second. Unfortunately, the MS-DOS systems were crashing nearly every hour! We didn't know if it's MS-DOS, PC-NFS, or Informix that was causing the problem. But we knew it was the time to look for a stable operating system. Of course Linux was my choice!

As an interim measure, the MS-DOS systems were used as terminals to telnet into the Sparc and jobs where run on the Sparc. The query times grew to up to half a minute and and I started to hack a better solution using Linux.

Two month later I installed the first version with Linux 99p6. It's now running 99p9. And I now have earned enough money (6,000 DM) to live for the next two years and I'm now rewriting this quick hack that I did in the first month. As there are some more Wasserwirtschaftsaemter (administration of installations with water endangering substances) for the Department of the Environment of the State of Bremen having interest in the program, I will continue the project earning more money and giving the Onyx-4GL to the Internet community. Onyx a killer application for Linux? Large databases are a place where the money is made. So let's talk about money. As I saw it, MS-DOS is bad choice as a possible platform for a database clients. I see two possible solutions:

  • Use a Mainframe for doing the job

  • Use Sparc or $CO Unix systems as clients

Both are really expensive choices. With Linux you only need a cheap PC to do the job in client/server computing and you don't have to pay a lot of money to a Unix vendor for every client.

Another possible scenario is needing to upsize an entry-level database from an MS-DOS platform. Let's think about the following configuration

  • First a 486-bases system with Linux and [university] Ingres as a server

  • If there are old 286 systems they can be used as terminals

  • Newer 86 can be upgraded to run the client locally

  • As the database is growing up you can use a faster (commercial) SQL on a commercial Unix as a server without trouble

  • DOS applications can be run by QuarterDeck DeskView-X without the posibilty of crashing the database in an xterm on any Linux box, if

  • DOS applications are really necessary

Such a configuration can be sold to any company and it cost less than a Novell Netware. And if the company has several locations in perhaps different cities its possible to mirror the transactions on normal modem lines which is impossible to do with a traditional database over a remote Novell FS.

Future Plans

As I've written above I'm now rewriting the whole program, and I hope to finish this in December. Look at the Usenet group comp.os.linux.announce for my posting.

The new version will include the following features :

  • Rewritten by using an Object Oriented Parser Generator

  • Include awk & ingres as local servers for Linux

  • Backup store and forward as a model for distributed transactions

  • Some example applications

  • Hopefully some documentation (Real programmers don't write docs, they write programs. The code was hard to write it should be hard to read.) But, I've expanded the parser generator to produce manual pages for each parser it produces. That's a start.

  • I'm considering adding a RFC on my transaction monitor so I can find out what features should be added to the rd version

Where to get it?

If you are in Germany, Onyx can be found on the ftp sites wowbagger.pc-labor.uni-bremen.de or olis.north.de. Onyx has also been posted to alt.sources on Usenet. Otherwise, your best bet is to use archive to locate a copy.

Michael Kraehe lives in the back woods of Germany and names the machines in his network as would an old anarchist so will find machines with names like durruti and kropotkin. His ideal computer would be a palmtop with a 17" display, Ethernet and SCSI so he could pack it on his 12 year old SR500 motorbike along with his dog.