This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-03
Channels
- # 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”
which I think states Rich’s opinion on this pretty clearly :)
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 Sink
protocol
thing is, I’d like to have a couple of those kafka producers, each one with different Sink
implementation
alternatively I could just put an async channel there and supply a mapping fn when creating those?
must be some way to do with extend-type or reify, no?
@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
@coinedtalk that’s what I’m thinking
https://stackoverflow.com/questions/22422820/connecting-to-a-headless-nrepl-running-in-a-docker-container-from-another-contai
Could someone please explain me why cider-connect
on lein repl
with host 0.0.0.0 works whereas with host 127.0.0.1 it's not working? How it's possible?
I mean in both cases cider tries to connect with localhost
so it should work perfectly fine in both cases
@kwcharllie379 are you asking about docker? or are you having this issue with lein repl
outside of a container?
I think that I'm asking about docker specifically.
@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).
Now I got it ;) thank you very much @seancorfield