In the previous post on fault tolerant programming in PHP we have shown the basics of fault tolerant programming using the circuit breaker pattern. Now we will show you a running demo of the application where the circuit breaker library Phystrix is combined with asynchronous programming. The advantage of this approach is that it allows the querying of multiple backend services asynchronously. A timeout can be set for each of the calls and the circuit breaker will deal with failing services.
↧