
Throttler: a Clojure library for rate limiting - robgering
http://brunov.org/clojure/2014/05/14/throttler/
======
zindlerb
Looks very well put together. I am not familiar with throttlers. What is
throttling normally used for?

~~~
rectangletangle
Keeping users from making an insane amount of requests to your site/api per
some unit of time.

~~~
rabino
It looks more like it's for limiting your own outbound API calls, or resources
usage, etc.

~~~
brunov
Hi, author here. That was exactly my motivation for writing it. There's all
sort of middleware and plugins out there for throttling from the server side,
but I found nothing that would let me control my own outbound API calls to a
an external service in Clojure. I also wanted support for burstiness, and that
was even harder to find.

I bet you could come up with other uses for it though. Someone told me over
email they're planning on using it in traffic simulation for a game, for
instance.

------
sesm
Can it be used from ClojureScript?

~~~
brunov
Hi, author here. I haven't tested it on ClojureScript yet, but since
core.async is supported by CLJS I don't see the reason why it wouldn't work
there as well.

If it doesn't, let me know on Github and I'll look into it! I don't have any
experience with CLJS, but I'm interested in learning so it'd be a good excuse.

~~~
lgas
I submitted a pull request which sets up the project to use cljx to work in
both Clojure and ClojureScript.

ETA: Just realized that <!! and >!! aren't available in ClojureScript, so it
needs some more work to be complete, but the pull request should help you get
set up to develop for both.

