Chapter 5. Server Configuration

MythiCal defines a hierarchical namespace, similar to a file system into which backend instances can be mounted. The overall configuration for Mythical, including definition of the backend instances is handled by the mythical.conf file.

The basic outline of mythical.conf looks like this:


#
# Sample MythiCal Configuration File
#

# Port for MythiCal to listen on
#port 4401

# Log level (see documentation for bitmask information)
#loglevel 255

# Path for backend 1
#path "/davical1"
#{
#     backend "davical_backend"
#     {
#         dbname "davical"
#         ...
#     }
#}
#
# Path for backend 2
#path "/davical2"
#{
#    ...
#}

5.1. Core Configuration

The following core parameters are available:

port <integer>

The TCP port on which MythiCal listens for incoming connections. Defaults to 4401.

loglevel <integer>

A bitmask specifying how much logging information is emitted to the console. The bitmask values are calculated from the following:

LOG_SOCKET (0x1)

Enable logging of socket connections

LOG_MESSAGE (0x2)

Enable logging of network messages

LOG_BACKEND (0x4)

Enable logging from backend modules

path <string>

Define path <string> within the MythiCal namespace. A path must contain a backend declaration as given below:

backend <string>

Bind the backend driver named <string> to the containing path. The existence of a MythiCal backend module is determined at compile-time by the parameters passed to into configure. A backend driver module name can be one of the following:

davical_backend

Bind an instance of the DaviCal backend to the containing path.

5.2. davical_backend configuration

The DaviCal backend has its own set of additional parameters documented below:

dbname <string>

The database name of the DaviCal database.

dbhost <string> (optional)

The server hosting the DaviCal database.

dbuser <string> (optional)

The username required to connect to the DaviCal database.

dbpass <string> (optional)

The password required to connect to the DaviCal database.

5.3. python_backend configuration

The Python backend has its own set of additional parameters documented below:

pythonpath <string> (optional)

An optional path string which is appended to sys.path on startup.

pythonmodule <string>

The name of the Python module to be used by this backend.

An example Python module showing how to use the basic methods to implement a very simple calendaring application can be found in src/backends/python/DemoMythiBackend.py.