commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1085) Add a circuit breaker implementation
Date Sat, 31 Jan 2015 02:29:34 GMT

    [ https://issues.apache.org/jira/browse/LANG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299580#comment-14299580
] 

Bruno P. Kinoshita commented on LANG-1085:
------------------------------------------

Hi again Oliver!

The code looks really neat, including the tests! Kudos! I read Martin Fowler's article and
your implementation, and looks like you followed his example. IIUC, the circuit trips only
when you've reached the threshold of incidents over a certain period of time.

I'd like to explore the CircuitBreaker design a bit more, to make it more generic. I'm not
sure if I could implement a Memory Circuit Breaker as [this one|https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java]
using the existing patch. 

Maybe the existing circuit breaker in the patch could become a TimeCircuitBreaker (?), a common
interface extracted from it, and this way we could add more circuit breakers (memory, open/closed
resources/quantity of connections open, etc)? The existing patch looks really nice, just food
for thought :-)

Have a nice weekend,
Bruno

> Add a circuit breaker implementation
> ------------------------------------
>
>                 Key: LANG-1085
>                 URL: https://issues.apache.org/jira/browse/LANG-1085
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.concurrent.*
>            Reporter: Oliver Heger
>         Attachments: CircuitBreaker.java, CircuitBreakerTest.java
>
>
> A _circuit breaker_ is a useful component to protect an application against unreliable
services or load peaks. A simple implementation could be a good fit for the concurrent package.
> A proposed implementation is attached. Feedback is welcome!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message