Coma is still under development and so this documentation covers mostly the design.
Coma is built on top of a series of base classes (objects) that store all the runtime variables. The API defines these objects and how they are used. Each object must have the following characteristics:
Chances are that some of these objects are being referenced by more than a single thread. Because of this, data access must be encompassed by a mutual exclusion mechanism.
Each object must be representable as a Javascript object. Functions should process data types that are compatible with Javascript data types.
Objects that expose potential security issues, such as the file system or networking, must extend a base security class. Objects are scoped to a context: server, site, connection, and request. By default, scopes cascade down security rights.
Any code compiled into the main executable is considered to be trusted and has full access to any object in any scope.
The server must be explicitly told each native C++ modules and Javascript modules to dynamically load and what scope they belong to. Server scoped modules must be explicitly told to allow access from lesser scopes using access control lists.
There are 4 scopes:
This describes the process flow of how the server runs.
Settings are either defined as environment variables, command line arguments, or in the configuration file.
| Environment Variable | Command Line Argument | Config File | type | default | Description |
| COMA_CONFIG_URL | -configUrl | n/a | string | file:///etc/coma/conf.js | The URL to the configuration. Supported protocols are file and http. |
| COMA_USE_SYSLOG | -useSyslog | logging.syslog | bool | false | Enables outputting of log messages to syslogd. |
| COMA_LOG_PATH | -logPath | logging.path | string | /var/logs/coma | The path to write log files. |
| COMA_PID_FILE | -pidFile | n/a | string | /var/run/comad.pid | The location of the process ID file. |
Coma will support multiple types of subscribers.
Coma is designed to run on the latest 64-bit multi-core processors from Intel, AMD, and Sun Microsystems. The majority of Unix-like operating systems will be supported including:
FreeBSD may also be targeted. Windows will not.
It is also critical that Coma operate to the best capacity within a virtual machine such as Xen, Parallels, and VMWare.