Keywords: language

Next: 2 Defining the System Up: HAFA Overlord Language Definition Previous: Contents Contents
Subsections

- 1.1 Nebuloids
- 1.2 Procedures
- 1.3 Processes
- 1.4 The System

# 1 Introduction and Basic Concepts

The Overlord language is designed to allow the user to define a system-what processes should be running, how to start them, what to do if they fail, etc.-and to tell the Overlord what it needs to do in order to keep this system running smoothly. To this end, it utilizes the concept of processes, procedures (procs), and nebuloids. These concepts are defined in the following sections.

## 1.1 Nebuloids

Perhaps the most interesting concept of the Overlord language, nebuloids are a common, simple interface to Overlord plugin modules, and provide most of the power of Overlord language scripts. They can be thought of much like variables-in fact, one of the major nebuloid modules is the VAR module-except with the ability to perform functions when read, such as checking the memory usage of a process. How exactly a nebuloid behaves is based entirely on the corresponding nebuloid module implementation.

Nebuloids can be assigned to and read from, though not every module supports these abilities. Every time a nebuloid is read from, it generally performs whatever function the module was designed to do. Many modules also require that the nebuloid be instantiated, in order to give the module context about what task exactly it is to be performing. For example, when the LOG module is instantiated, it is told where it will be logging to (stderr, a file, or the syslog). When the LOG nebuloid is read from, it takes the message to be logged and the severity of the log message as arguments.

## 1.2 Procedures

Procs are simply a collection of Overlord scripting commands which can be called at specific intervals or by other procs, etc. (As we will see later, there are many other structures which can contain Overlord scripting commands; procs can be called by these, as well.) Scripting commands are discussed later on in this article.

## 1.3 Processes

A process definition in the Overlord language corresponds directly with a process running in a UNIX-like environment. The process definition tells the overlord how to start a process, what to do when it dies, and contains nebuloids and procs to aid in determining whether or not that process is misbehaving.

Processes also have the concept of dependencies, which are simply other processes which must be running in order for that process to function properly. It is ensured that these dependencies are running when the process is started, and the process is notified if one of the other processes it depends on fails. The user can determine the best course of action in this case, whether it be to simply kill off the process and let the Overlord restart it, to simply ignore it and let the process itself deal with it, or to attempt to notify the process in some way that its dependency is temporarily unavailable.

## 1.4 The System

A system simply is a collection of processes, procs, and nebuloids (collectively known as policy). The procs and nebuloids defined here can be accessed system-wide by scripting commands. (Procs and nebuloids defined in processes can only be accessed within their own process.) The system also has the concept of dependencies; it must be told what processes must be running for the system to function.

Next: 2 Defining the System Up: HAFA Overlord Language Definition Previous: Contents Contents