According to Gamma et al., the intent of the Strategy pattern is
to ``define a family of algorithms, encapsulate each one, and make
them interchangeable'' [5, page 315,]. This is usually
achieved by objectifying the algorithm [4], i.e., by
encapsulating it into a so-called strategy object; the latter is
then used by a so-called context object. Making each
Object protocol class independent of the algorithm supporting
protocol
is precisely what we need to be able to compose reliable
distributed protocols in a flexible manner.
In the BAST framework, strategy objects represent protocol algorithms
and they are instances of subclasses of class ProtoAlgo. A
ProtoAlgo subclass that implements an algorithm for solving
problem is referred to as class
Algo. In the Strategy
pattern terminology, a protocol algorithm, instance of some
Algo
class, is a strategy, and a protocol object, instance of some
Object class, is a context. A strategy and its context are
strongly coupled and the application layer only deals with instances of
Object classes, i.e., it knows nothing about strategies.