PHP Classes

PHP Circuit Breaker class: Test if a service is ready checking status first

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (10 months ago) RSS 2.0 feedNot enough user ratingsTotal: 301 All time: 7,409 This week: 206Up
Version License PHP version Categories
php-circuit-breaker 1.9BSD License5.0PHP 5, Systems administration
Description 

Author

This class can test if a service is ready checking status first.

It can keep track of the status of services like databases or remote Web services to determine if they can be accessed normally or they are down for some reason.

The class uses the APC extension to store cached values of the status the services, so applications avoid trying again while the services are down until they are not brought up again.

The class can be configured to try a given number of times until the service being tested is considered to be down.

A timeout period can be configured after which a failed service should get only one more chance to become available.

Innovation Award
PHP Programming Innovation award nominee
May 2013
Number 2


Prize: One subscription to the PDF edition of the PHP Architect magazine
Circuit breaker is method to prevent excessive use of resources that may not be available for some serious reason.

This class provides a PHP implementation of this circuit breaker method.

Manuel Lemos
Picture of Yasir Siddiqui
  Performance   Level  
Name: Yasir Siddiqui is available for providing paid consulting. Contact Yasir Siddiqui .
Classes: 14 packages by
Country: Pakistan Pakistan
Age: 40
All time rank: 3133 in Pakistan Pakistan
Week rank: 159 Up6 in Pakistan Pakistan Down
Innovation award
Innovation award
Nominee: 8x

Winner: 1x

Details

php-circuit-breaker-design-pattern-implementation ================================================= This PHP package implements Circuit Breaker Design Pattern. You can track any service you want. All you need to do is configure all services in Config.php. See example.php to see how it works. For more information on Circuit breaker pattern visit http://en.wikipedia.org/wiki/Circuit_breaker_design_pattern

  Files folder image Files (4)  
File Role Description
Plain text file CircuitBreakerClass.php Class Class source
Accessible without login Plain text file Config.php Conf. Configuration script
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:301
This week:0
All time:7,409
This week:206Up