Resource and Control Model
The goal of cobald
is to simplify the provisioning of opportunistic resources.
This is achieved with a composable model to define, aggregate, generalise and control resources.
The cobald.interfaces
codify this into a handful of primitive building blocks.
Pool and Control Model
The cobald
model for controlling resources is built on four simple types of primitives.
Two fundamental primitives represent the actual resources and the provisioning strategy:
The adapter handling concrete resources is a
Pool
. Each Pool merely communicates the total volume of resources and their overall fitness.The decision to add or remove resources is made by a
Controller
. Each Controller only inspects the fitness of its Pools and adjusts their desired volume.
These two primitives are sufficient for direct control of simple resources. It is often feasible to control several pools of resources separately.
Composition and Decoration
For complex tasks it may be necessary to combine resources or change their interaction and appearance.
The details of managing resources are encoded by
Decorator
s. Each Decorator translates between the specificPool
s and the genericController
s.The combination of several resources is made by
CompositePool
s. Each CompositePool handles several Pools, but gives the outward appearance of a single Pool.
All four primitives can be combined to express even complex resource and control scenarios.
However, there is always a Controller
on one end
and a Pool
on the other.
Since individual primitives can be combined and reused,
new use cases require only a minimum of new implementations.