Skip to main content
Ben Nadel at the New York ColdFusion User Group (May. 2008) with: Michaela Light
Ben Nadel at the New York ColdFusion User Group (May. 2008) with: Michaela Light

ColdFusion Circuit Breaker Project On GitHub

By
Published in

Over the last month or two, I've been noodling quite heavily on the topic of Circuit Breakers in ColdFusion. Circuit Breakers are execution proxies that help a ColdFusion application deal with failure in a safer, more predictable way. Using a Circuit Breaker can help prevent upstream failures from causing subsequent failures in the downstream system. This programming pattern was popularized by Michael Nygard in his book, Release It!

While I've never actually used a Circuit Breaker in production (yet), I wanted to put my Circuit Breaker project up on GitHub so that I had a place to evolve the concept (or rather my understanding of the concept) over time. It also forced me to actually write some Unit Tests for my code (which is not something I do all that often).

View my ColdFusion Circuit Breaker project on GitHub.

In my implementation of the Circuit Breaker, the control flow logic is separate from the state management. This allows the Circuit Breaker to be generic and forces the state management implementations to remain decoupled. Different state management implementations can then be developed and tested independently and swapped in and out seamlessly.

Out of the box, my library ships with a Circuit Breaker State implementation can be configured for Failed Request thresholds and Concurrent Request thresholds. I believe that this will cover the majority of use-cases that ColdFusion developers will deal with.

Reader Comments

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel