Skip to content

ExtendingMiSim

LWagner edited this page May 9, 2022 · 1 revision

Extending MiSim

MiSim aims to be easily extensible regarding resilience patterns, workload generators, and fault loads. aims to be easily extensible regarding resilience patterns, workload generators, and fault loads.

To contribuite to MiSim in form of an extension, extend on of the given base classes:

Class Description
InstanceOwnedPattern Base class for instance owned patterns. These will be created per service instance.
StrategicInstanceOwnedPattern Base class instance owned patterns that can employ different strategies.
ServiceOwnedPattern Base class for service owned patterns. These work on a whole service.
StrategicServiceOwnedPattern Base class service owned patterns that employ different strategies.
StrategicPeriodicServiceOwnedPattern Base class for a service owned pattern that is executed periodically. (Has additional period, start, and stop properties)
ILoadBalancingStrategy Base class for load balancing strategies.
IAutoscalingPolicy Base class for autoscaling policies.
SelfScheduledExperimentAction Base class for experiment actions (e.g. injections or summoner monkey).

Additionally to these base classes there are two interfaces that can be implemented:

Interface Description
IPatternLifeCycleHooks Allows for listening to the pattern lifecycle events (Initialzation, Startup, Shutdown).
IRequestUpdateListener InstanceOwnedPatterns that implement this interface will be notified when a request send by the instance changes its state.

Lastly, your newly implemented pattern, injection or strategy needs to provide a name under which it can be found in the architecture or experiment description. This is done using the @JsonTypeName annotation. You can also provide multiple alternative names.