FRONTBASE TECHNICAL NOTES
FRONTBASE TECHNICAL NOTES

FrontBase™: A new database for a new millennium

By: Malcolm Crawford,April 13, 1998

This article is a printed copy of an article published at www.stepwise.com

Apple's prediction that initial adopters of Rhapsody are likely to come from the high end and server side of the marketplace looks to be being fulfilled in part with the announcement of a number of database products for the new operating system. It has been encouraging to see announcements from at least a couple of Mac OS ISVs, in addition to ex-NeXT vendors such as OpenBase. A newcomer on the database scene is another ex-NeXT developer, Frontline Software, with a new product -- FrontBase™.

Aren't there enough databases out there already?

Frontline Software sees the market polarized between high end (Oracle, Sybase, Informix) and low end (OpenBase, Primebase) solutions The lower end of the spectrum seems to be becoming crowded, whereas the Rhapsody market currently has no announced entries from the Oracle+Sybase+Informix group, which presents Frontline Software with an interesting window of opportunity. There is a large gap between the two groups in terms of both functionality and performance. FrontBase is targeted closer to the Oracle end of the spectrum, i.e. a truly high end server with with high performance and as few limitations as possible.

Origins

FrontBase grew out of the requirement to provide a database system for use in a command and control centre implemented for the Copenhagen Police. This solution, deployed on NEXTSTEP/OPENSTEP, has been in uninterrupted production use since October 22, 1996, but not without challenges. It was found that true 24/7 uptime of third party software used, including the database product, was not being achieved. Therefore in August 1997 Frontline Software decided to draw on their many years of experience developing robust, reliable software, compiler and run-time system technologies, and develop their own database server. FrontBase is now not only working, but also in production use at the client, running very smoothly and handling 500,000+ indexed files with good performance.

A truly relational engine

As you might expect, Frontline Software will provide an EOF adaptor for FrontBase, i.e. an effective way of accessing the SQL 92 interface to the relational engine from an object-oriented application. FrontBase is likely to be the first industrial strength database in compliance with SQL 92, which, in contrast to its name, is the newest ANSI/ISO SQL standard.

The company is keen to stress, however, that in contrast to most other so-called relational databases, theirs has a truly relational engine that can handle an arbitrary number of tables in the way the relational theory describes, i.e. essentially as sets. A SELECT is, strictly speaking, an operation on a number of tables/sets that result in a new table/set. In FrontBase this is actually implemented using real sets, and importantly, this facilitates use of lazy evaluation schemes wherever possible, which makes it easy for FrontBase to handle very large tables.

Lazy evaluation postpones the difficult tasks until they really have to be performed, if they have to be performed. One way of thinking about this is in terms of fractions and real numbers. It is easier to add 1/6 + 2/6 + 3/6 to make 1 than it is to divide 1 by 6 to get 0.166..., 2 by 6 to get 0.333..., and 3 by 6 to get 0.5, and then add the decimals. Lazy evaluation makes it relatively easy for FrontBase to, for example, join (SELECT * FROM A,B) two tables of 1million x 1million entries, and then perform a subsequent operation on the result.

Frontline Software's long-term goal is to create a second product to run alongside FrontBase, an "R" implementation -- a real relational database, freed from the non-relational constraints of SQL[1], which might receive the blessing of Chris Date (the current leading light in relational database theory). Future versions might also integrate a JVM with the engine, giving an ODBMS with live objects and utilizing the strength of the relational theory.

Other advanced features

In addition to aiming for theoretical purity (with worthwhile goals, rather than simply for academic interest), Frontline Software also equips their database with a number of other features to make it more powerful and more reliable.

Multi-column indexing

FrontBase is able to do multi-column B-Tree indexing with a very low overhead: only in the order of 5-6 bytes per index per row. The goal of these indexes is that, whilst you do get an overhead in terms of memory and in terms of INSERTs and UPDATEs taking longer time, you are supposed to gain major speed improvement when SELECTing data. It makes it possible to use a combination of, for example, three columns as a primary key with little cost in terms of memory, but much improved SELECT speed.

Caching

In many WWW solutions, deployment involves multiple instances of the actual Web application running on multiple machines. To speed things up, instances often load almost complete databases into memory, with the unavoidable consequences when it comes to updates etc.

For example, the DELL WebObjects site had 3 instances of the app running on up to four machines. Typically there were then 9-12 instances, each with their own in-memory copy of the database. If the database was updated, each of them had to be restarted. FrontBase offers an elaborate caching scheme, with each table having its own caching and startup characteristics.

In the "most cached" scenario, all rows of all tables are loaded into memory upon startup and maintained in memory at all times. To add a further level of control, however, it is possible to tell given table to stay resident, or to tell the system to keep x% of rows in memory. FrontBase is therefore able to offer WWW solutions which include caching whilst still retaining full transaction protection and the full SELECT speed.

Enhanced locking strategies

FrontBase supports serialized locking with versioned reads, so that if a column or table is locked pending a write, the existing data can still be read without being blocked -- a mechanism that resembles that of the VAX/VMS file system. It also supports row-level locking, i.e. a given user is only locking a given row, while the others can continue to update other rows.

The benefits here are clear if you consider, for example, an airline booking system where there may be 200 users each working on a different row: it is inconvenient if one user is able to lock out the other 199.

100% crash resilient

Frontline Software claim that once a COMMIT has returned, your data is safe. With many low-end systems, a COMMIT does not mean that data is safely saved to disk, i.e. they are not transaction oriented. Furthermore, Frontbase's data will not be corrupted if your server crashes, or someone pulls the plug. This is because FrontBase uses a single file on the host file system and implements its own file system within that, rather using than a set of files on the host file system itself. This has particular benefits if the host file system becomes corrupt -- there is no way for BLOBs to be mysteriously lost.

Web interface

FrontBase can be administered using a GUI-based application, or from any machine using a Web browser.

First license free

In common with some other database vendors, including OpenBase, Frontline Software will be giving away the first FrontBase license for free. This "bronze" version will feature full functionality, with no restrictions other than that it will not accept connections from other machines -- and (not unreasonably) if you want support you'll have to pay for it. This would form an excellent free database to use with many entry-level WebObjects deployments where the WWW and database servers are on the same machine.

The "silver" version of the product will include the ability to accept connections from other machines on the network, and will include 3 months' e-mail support (9 extra months for and additional charge). The gold version will take the networking aspect a stage further, and will include a number of data caching strategies for optimum performance, and will include 12 months' e-mail support.

Omens for Rhapsody

Frontline Software plans to ship FrontBase sometime during the summer, not too long after Rhapsody's expected delivery. Frontline Software's attitude is reminiscent of that of many of the old NeXT start-up ISVs, who entered into the marketplace wanting to do things better. Sadly, given NeXT's mixed fortunes, few of them stayed the course to be in a position to take advantage of the opportunities Rhapsody has to offer. Rhapsody, however seems destined to be delivered at a time when a more focussed Apple's fortunes are on an upswing, and FrontBase -- like many other new Rhapsody-based products -- looks poised to catch the wave.