Resource Abstraction via Pools

The fundamental abstraction for resources is the Pool: a representation for a number of indistinguishable resources.

As far as cobald is concerned, it is inconsequential which specific resources make up a pool. This allows each Pool to implement its own strategy for managing resources. For example, a Pool providing virtual machines may silently spawn a new machine to replace another.

The purpose of a Pool is just to provide resources, not use them for any specific task. For example, the aforementioned VM may integrate into a Batch System which provides the VM with work. What matters to cobald is only whether resources match their underlying usage.

Supply and Demand

Each Pool effectively provides only one type of resources [1]. The only adjustment possible from the outside is how many resources are provided. This is expressed as supply and demand:

supply [r/o]

The amount of resources a pool currently provides.

demand [r/w]

The amount of resources a pool is expected to provide.

Note that demand is not derived by a Pool, but should be adjusted from the outside. The task of a Pool is only to adjust its supply to match demand.

Allocation versus Utilisation

While a Pool does not calculate the demand for its resources, it has to track and expose their usage. This is expressed as two attributes that reflect how much and how well resources are used:

allocation [r/o]

Fraction of the supplied resources which are allocated for usage

utilisation [r/o]

Fraction of the supplied resources which are actively used