https://kotlinlang.org logo
#coroutines
Title
# coroutines
l

Lulu

04/27/2019, 12:43 AM
I'm trying to implement an ideal ratelimiting system with coroutines. Basically, I want to send requests to the server, and if it told me that I'm being ratelimited, requests should be delayed till the ratelimit is over. All this while also returning responses in time (we don't wait for all requests to finish, and provide the response to the caller whenever it comes). I already have an implementation but it's far from ideal. What's the best way to do this?
d

Dominaezzz

04/27/2019, 9:52 AM
Hmm, what does the client api look like? Are you using ktor?
7 Views