Open windymelt opened 7 months ago
Thanks! Definitely, rate control is something that will be great to include, and very much in-line with the scope of the project, in the "resiliency" part.
Just as Ox has repeat
and retry
, the goal here is to implement a rate limiter. Similarly to other resilience operation, this should come with a configuration object.
Rate limiting itself should be possible in a stateful way, e.g. given a RateLimiter.apply(=> T): T
method, which will block if the rate limit is reached. But we're open to any other suggestions.
As to the rate limiting configuration options, the algorithm mentioned in the original description should be available. Moreover, resilience4j might provide more inspiration.
/bounty $500
/attempt #120
with your implementation plan/claim #120
in the PR body to claim the bountyThank you for contributing to softwaremill/ox!
Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🟢 @paulpdaniels | Oct 16, 2024, 3:20:03 PM | WIP |
🟢 @rathi-dev | Oct 17, 2024, 8:43:44 AM | WIP |
🟢 @vishalpatil1899 | Oct 21, 2024, 1:22:21 AM | WIP |
🟢 @pablf | #235 |
/attempt #120
Algora profile | Completed bounties | Tech | Active attempts | Options |
---|---|---|---|---|
@paulpdaniels | 3 bounties from 1 project | Scala, JavaScript, TypeScript & more |
Cancel attempt |
/attempt #120
💡 @pablf submitted a pull request that claims the bounty. You can visit your bounty board to reward.
/attempt #120
As we are getting first PRs for the bounties, I've published our "How to prepare a good PR" guide. I should have probably done this right away, sorry! :)
Hi! At first, thank you for great async library! I tried examples and played exercises using documentation. It was full of fun!
My suggestion is providing rate control primitives (e.g. simple rate limit, smart (leaky bucket / token bucket) algorithm).
Sometimes I want rate control in production concurrent programming (e.g. batch processing along HTTP API).
Of course, we can implement simple control using
par()
andSource.tick()
. But in production use, I think out-of-the-box rate control primitives is preferred.