Giter Club home page Giter Club logo

gohystrix's People

Contributors

dahernan avatar zeisss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gohystrix's Issues

Simplify command interface

Just for discussion: I find it "ugly" to have to define a Name() and Group() function.

I played around with a few concepts, and I came up with the following solution:
The command only has one Describe() function, which returns a goHystrix.CommandOptions containing all necessary values (name, group, threadgroup, isolation level, etc.). Using the builder pattern, this function could be very small, but descriptive.

An example, how this could look like can be seen at this gist: https://gist.github.com/ZeissS/9766129

What do you think?

Move Timeout, Name, and Group to CommandOptions

I'm thinking of moving the methods Timeout(), Name(), and Group() to CommandOptions and keep the Interface simple.

You can pass the options to the NewCommand as following

NewCommand(interface, commandOptions, circuitOptions)

@zeisss any advice??

Circuit breaker not resetting

In the NetFlix Hystrix Java implementation an open circuit breaker will reset itself (i.e., close) after circuitBreaker.sleepWindowInMilliseconds. In goHystrix an open circuit breaker will only reset itself if no requests are received during the NumberOfSecondsToStore interval. The NumberOfSecondsToStore interval is important in defining the rolling window of metrics but it's not enough. A circuit breaker implementation also needs to provide a way for the breaker to periodically allow requests to go through in order to see if the failed dependency has resolved, i.e., it needs to support a 3rd state - half-open.

Do you have any plans to provide a half-open state similar to NetFlix's Hystrix? If not, would you accept a pull request to implement it?

I do like goHystrix's support for access to detailed metrics!

Expose all circuit breakers

Given I have an application which uses goHystric to secure it backend calls, I would like to expose the collected statistics to an external service automatically, e.g. statsd/graphite.

Currently, Circuits() already provides me with an way to access existing CircuitBreakers, if I have the names. With this I can access the metrics and thus via Stats() the samples values.

It would be nicer to have some operation to iterate over all existing circuitbreakers, to automatically expose them. This could as simple as having an Each(handler func(group, name string, breaker *CircuitBreaker) function, which loops over everything.

Make Fallback() optional

Hi,

I just stumbled upon the original netflix article and was searching, whether someone did something similar for Go. And there you are :) Thanks!

I was wondering, why you made the Fallback() function required? I think one could just define an aditional interface, move the fallback function there and check (on error in Run()), if the command can be converted to the Fallback interface.

Just a thought I had while reading your README (I haven't actually tried anything yet).

Thanks again!

P.S.: The same could be done for the Timeout. Just default to something like 5 seconds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.