On May 14, 2014, at 9:43 AM, Bruno Vecchi <vecch...@gmail.com> wrote:

> Throttler[1] is a little library I wrote out of need for one of my personal 
> projects. It lets you control the maximum rate of function calls or message 
> transmissions through core.async channels.

This is way cool, thanks for sharing it!

A while back I needed something like this to throttle http requests, and I 
cobbled something together that used Thread/sleep, 
it worked, but vastly inferior to your library, AFAICT. I intent to throw out 
my code out and use your library.

In my application, I would like to have a throttle-fn that was guaranteed not 
to occur faster than some number, but also want to add a (bounded) random 
number to that limit.
For example, let's say I wanted my http requests to be no more frequent than 
every 5 seconds, but some random number of seconds between 5 seconds and 15 
seconds.
Is there any way to add/modify throttler to handle a case like that?

In my application, I use clj-http to make http requests, and what I did was to 
create a wrap-throttle middleware and added that to the middleware stack for the
(customized) http client I used for rate-limited requests.  I am thinking that 
approach would work well with your throttle-fn....

Best regards,

Don

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to