Vulcan Runtime Configuration
Vulcan allows database access in several modes on a single computer as well as access to various services. The means of access to a database is controlled through a cascading group of configuration files. A production system will include three configuration files, client.conf, vulcan.conf, and server.conf, all located in the installation directory. If policies for all users of that system are the same, there is no reason to create other configuration files.
A development system may need to provide different environments for different users. This document describes using configuration files for such an environment.
When a client starts, Vulcan attempts to find an appropriate configuration file for that client first by translating the environmental variable "VULCAN" in the client context. The translation should be the name of a configuration files. If that fails, Vulcan then looks for specific filenames in specific locations:
getenv ("VULCAN") ./vulcan.conf ~/.vulcan.conf <registry>install\client.conf c:\program files\firebird\client.conf /opt/firebird/client.conf
When running in a development environment, users should have private configuration files that control which vulcan they use. Those files can be specific to a working area (i.e. ./vulcan.conf) or specific to a user (i.e. ~/.vulcan.conf).
A typical private configuration file might look like this:
# /home/harrison/.vulcan.conf # use my own development vulcan RootDirectory /home/harrison/vulcan/install # get the rest of the configuration information there include $(root)/client.conf
$(root) equates to the RootDirectory. In a production system, this would default to the installation directory and need not be defined explicitly. In a development system, where different users want different copies of Vulcan, the initial configuration file should define RootDirectory appropriately.
The configuration file for the development vulcan might look like this:
# # This is the generic client configuration file. # # First, get the Windows remote specification. Bah on # ambiguous ':' characters <database (*:*:\*> filename $0 provider remote </database> # Next, special case Windows full pathnames, so the ':' # between the device and the directory doesn’t look like # separator after a remote host name. <database *:\*> filename localhost:$0 provider remote </database> # Next, special case the security database for embedded use. <database security.fdb> filename $(root)/databases/security.fdb provider engine8 </database> # Next, send anything with an explicit hostname to remote <database *:*> filename $0 provider remote </database> # Now, create special case for embedded use of one database <database employee.fdb> filename /firebird/vulcan/src/JdbcTest/$0 provider engine8 </database> # Finally, make everything else go through the remote interface # by prefixing the name presented with 'localhost:' <database *> filename localhost:$0 provider remote engine8 </database> include $(root)/vulcan.conf
Aside from the final include statement, this file contains only directions for handling various databases by name. The name may be further qualified or totally replaced in the line that begins 'filename'. The line that begin 'provider' indicate which types of access can be used. $0 represents the entire database name string as presented. $1 represents the first segment. $2 represents the remainder of the input database name string. For example if the name presented is "firebird:/databases/foo.fdb" which is caught by this database block:
<database *:*> filename $0 provider remote </database>
$0 represents "firebird:/databases/foo.fdb". $1 represents "firebird". $2 represents "/databases/foo.fdb".
The $(root)/vulcan.conf file describes the providers and common databases used by a particular installation of vulcan:
# # This is the root configuration file. PLEASE DO NOT EDIT # <database security.fdb> filename $(root)/security.fdb provider engine8 services </database> <database *> filename $0 provider remote engine8 services </database> <provider engine8> LockFileName $(root)/vulcan.lck library $(root)/bin/engine8 </provider> <provider remote> library $(root)/bin/remote </provider> <provider services> library $(root)/bin/services </provider>
In this case, the installation support three providers, engine8 which is local service, remote, and services which provides access to the services API. Each provider declaration names the specific library that is the provider. The local service also names the lock table that provider will use.