6 ms·
What a coincidence, I found myself writing a little Go lib for exponential back off yesterday, and was wondering what the purpose of introducing jitter was and
by diggs 12y ago
What a coincidence, I found myself writing a little Go lib for exponential back off yesterday, and was wondering what the purpose of introducing jitter was and what effects it would have. I need it for interacting with the Twitter stream api and they're pretty clear that when they say exponential they mean it. But jitter looks very useful in some situations after reading this, so I added that to my lib as well...
It's here if anyone's interested it https://github.com/Diggs/go-backoff https://github.com/Diggs/go-backoff
- ekimekim 12y agoIf we're talking about implementations in various languages, I might as well link to my capped backoff with jitter implementation for python. https://github.com/ekimekim/pylibs/blob/master/libs/backoff.py https://github.com/ekimekim/pylibs/blob/master/libs/backoff.... (apologies for the long link, I keep all my one-file python libs in a single git repo for sanity. I think i've uploaded this one to pypi, where it's available under the name "backoff")
- RickHull 12y agoHi Mike! Thought you might be interested in my Elixir impl, though not as featureful: https://github.com/rickhull/backoff/blob/master/lib/backoff.ex https://github.com/rickhull/backoff/blob/master/lib/backoff.... Example usage: https://github.com/rickhull/backoff/blob/master/examples/demo.exs https://github.com/rickhull/backoff/blob/master/examples/dem...