Open joercampbell opened 11 years ago
Brian and I are working with Silvia and Karen to implement the SkepticBreaker pattern as a project for an Open Source Computer Science class at UPenn. For now we're working on a forked repo - https://github.com/ekmason12/jrugged - in the CIS399 branch. We're currently in an implementation phase and plan to start rigorous testing once initial implementation is complete.
Awesome - I look forward to seeing the first pull request. :)
We've realized that the best way to include the SkepticBreaker as an alternative will likely involve some refactoring of CircuitBreaker and its related classes. I've attached a few slides below that show how we envision the new architecture.
We'd appreciate any feedback you might have - this direction will require a decent amount of refactoring and changing/adding tests, but we think that it makes sense in terms of structure and will organize the code shared by SkepticBreaker and CircuitBreaker.
Ok - So, I think my first question is why two different factories? You went through the trouble to refactor (or propose a refactor) to get yourself an abstract breaker... wouldn't the factory essentially be giving you back a 'breaker' ? Whats the driving reason to have two factories instead of one? ie. a factory that gives me a reg break OR a skeptic breaker is really just an argument difference yes? (Even with having an abstract factory class).
We had wanted to keep them separate because of their different properties, but having one actually makes more sense to keep track of both types. We can handle their differences by having "addSkepticBreaker" and "addCircuitBreaker" methods in BreakerFactory. I've attached the updated architecture.
Thanks guys - I think that makes much more sense now, the picture looks good and looking for much forward to seeing some of the refactor and code. ;)
@trevmex , @weggert - Any thoughts here on the design?
We're almost done with the refactor and testing, but we have a few questions about some implementation details, about the existing examples in jrugged-examples (we made one for SkepticBreaker), and also about how you'd like to review our changes. Would you like to check out the code in our branch, or just have us submit a pull request? Also, do you have some time later this week to discuss some of the details about the SkepticBreaker and the examples?
A pull request would be awesome. :)
Sure - what time did you have in mind? I am going to be fairly busy on Thursday, but wed and friday are more open. Lemme know.
Joe
Sounds good - we'll probably be able to send the request tomorrow.
Friday after 4pm would be best for us. If that doesn't work, one of us could probably find some time tomorrow. Thanks!
There's an interesting pattern called a "Skeptic" presented in this paper:
http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-77.pdf
(as seen on Werner Vogel's blog). It's somewhat similar to a CircuitBreaker but has different recovery behavior and perhaps deals better with intermittent problems. This would make an interesting addition to JRugged.