InstantDB      Basic Topics      Advanced Topics      Reference Topics
Documentation Home Page

Readonly Mode

InstantDB can open a database in readonly mode. This is primarily intended to allow the database to operate from read only file systems, and in particular from CD-ROMs.

The main property settings which are required in the database's .prp file are:

readOnly=1
transLevel=0
!traceFile=...

With these properties set as shown, the database will open all existing tables in readonly mode. Transaction processing is disabled to prevent the need to access the journal file, and the trace file is commented out to prevent any debug logging.

If very large results sets are anticipated, then care should be taken to ensure that sufficient virtual memory will be available and that excessive paging will not be generated.

Tracing can remain enabled, provided the trace log points to a writable part of the file system.

It is not currently possible to have readonly Binary fields. Binary fields rely on random access files in order to store their values. When a query is performed which includes a binary column in the results set, InstantDB creates a temporary file to hold the result set binary data. The temporary file location must be set to a known writable region of the file system for this to work. e.g., Set tmpPath=$user.home in the database properties file.

Reducing the Size of InstantDB

InstantDB already has a very small memory footprint. However, where distribution is costly, say over dial up links, the size of InstantDB can be reduced even further.

Besides the usual technique of encapsulating the database classes in a zip or jar file, it is possible to dispense with many of the InstantDB classes entirely. All of the following classes can be dispensed with where they are not specifically required.


Copyright © 2000 Lutris Technologies. All rights reserved.