Reactive Design Patterns Implementierung eines Circuit Breaker Patterns in C++

Abstract

A circuit breaker is software design pattern which safely connects different parts of the system so that failures do not spread uncontrollably across them.It helps to detect failures and prevent the propagation of failures across the whole system. The aim of this work is to implement the circuit breaker pattern in C++. In this work, a detailed analysis of the circuit breaker is performed by defining and creating the architecture, class diagram and sequence diagram of the circuit breaker. Components such as Thread Pool, Thread Safe Queue and Command Wrapper are implemented to ensure the functionality of the circuit breaker devel- oped here. Boost Unit Test Framework is used to test the circuit breaker. To evaluate the implemented circuit breaker experiments are run. They consist of running a simulation and observing the circuit breaker behavior. To consolidate the observation made on the simulation, a second test is run where real request are sent to website.