KingMob / TrueGrit

A data-driven, functionally-oriented, idiomatic Clojure library for circuit breakers, bulkheads, retries, rate limiters, timeouts, etc.
MIT License
121 stars 0 forks source link

Thank you 🤗 and link to a similar tool #1

Closed piotr-yuxuan closed 2 years ago

piotr-yuxuan commented 2 years ago

Hello, thank you for this great little project! I wonder if you've come across safely [0] and whether you could find there ideas to port to TrueGrit? :-)

[0] https://github.com/BrunoBonacci/safely

KingMob commented 2 years ago

Thanks @piotr-yuxuan!

I wrote the initial impl of True Grit ~3 years ago, and I don't recall seeing safely at the time, though it would have been around. I just remember not liking the alternatives I did find, but we had to do something because Netflix was sunsetting Hystrix, so I wrote my own. I love Bonacci's mulog library and its ideas, however, so I'm open to suggestions. What do you want to see?

I looked over safely for ideas, and if you're currently using it, I can see a few things you might want to be aware of:

OTOH safely does some things I wish True Grit did:

That being said, I think True Grit is more composable, extensive, and simpler, but hey, I'm biased. 😄

KingMob commented 2 years ago

Hmmm, I just thought of a slight addendum in regards to saying "It looks like safely CB state is keyed off more than a name/keyword". Since it keys off all the options, you should be able to share the same CB between multiple fns if all the options are the same, including the CB name. But, that means they all have to have the same retry/timeout/etc policy, which you may not want to share.

Anyway, @piotr-yuxuan did you see my Slack messages about primitive-math and byte-streams PRs?