Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at InVision In Real Life (IRL) 2018 (Hollywood, CA) with: Eric Betts
Ben Nadel at InVision In Real Life (IRL) 2018 (Hollywood, CA) with: Eric Betts@AGuyNamedBettse )

ColdFusion Circuit Breaker Project On GitHub

By Ben Nadel on
Tags: ColdFusion

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.



Looking For A New Job?

100% of job board revenue is donated to Kiva. Loans that change livesFind out more »

Reader Comments

Post A Comment

You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
Oops!
NEW: Some basic markdown formatting is now supported: bold, italic, blockquotes, lists, fenced code-blocks. Read more about markdown syntax »
Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.