This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (3)
- # announcements (1)
- # beginners (116)
- # boot (8)
- # braveandtrue (4)
- # cider (40)
- # cljdoc (120)
- # cljsrn (10)
- # clojure (29)
- # clojure-austin (4)
- # clojure-dev (43)
- # clojure-germany (1)
- # clojure-italy (4)
- # clojure-nl (17)
- # clojure-russia (19)
- # clojure-uk (76)
- # clojurescript (118)
- # cursive (13)
- # datascript (11)
- # datomic (73)
- # emacs (24)
- # figwheel-main (176)
- # fulcro (40)
- # hyperfiddle (4)
- # leiningen (3)
- # off-topic (1)
- # pedestal (4)
- # re-frame (6)
- # reagent (22)
- # reitit (1)
- # ring (3)
- # rum (8)
- # shadow-cljs (41)
- # spacemacs (11)
- # specter (19)
- # unrepl (1)
Does anyone know of a good library for API throttling which can handler bursts, limit requests per IP, etc.?
This can handle bursts and limit requests by IP you can add probably add manually: https://github.com/brunoV/throttler
Thanks but I ended up using
diehard (https://github.com/sunng87/diehard) though.
throttler current version is running on quite an old version of clojure, so I was facing difficulty incorporating it in my project.
From what I can tell it's recommended to use multimethods: https://clojure.org/reference/multimethods
@nooga intentionally, no. per https://clojure.org/reference/datatypes#_datatypes_and_protocols_are_opinionated - the first item there is “concrete derivation is bad”
I’m having a component which obviously implements
component/Lifecycle let’s say it’s a kafka producer, and I want other components to have that injected as a
sink, so that they can call a “method” on it, like
(send (:sink myself) some-data).
so that the sender doesn’t care what’s a sink as long as it implements some
thing is, I’d like to have a couple of those kafka producers, each one with different
alternatively I could just put an async channel there and supply a mapping fn when creating those?
@nooga I didn't quite understand your problem, but you might wanna check out #aleph (https://github.com/ztellman/aleph) and manifold(aleph's dependency). You can depend on the stream abstraction instead of a concrete impl like core.async Here's the rationale: http://aleph.io/manifold/rationale.html
Could someone please explain me why
lein repl with host 0.0.0.0 works whereas with host 127.0.0.1 it's not working? How it's possible?
@kwcharllie379 are you asking about docker? or are you having this issue with
lein repl outside of a container?
@kwcharllie379 if you start
lein repl on host 127.0.0.1, it's only listening on the loopback address which is only accessible within a machine. You need 0.0.0.0 so it listens on all IP addresses assigned to that machine. So you have to use 0.0.0.0 inside Docker for the REPL to be accessible outside Docker.
The same is true of starting up
lein repl on remote servers in general (and also for when you're programmatically starting nREPL servers inside your apps).