This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-15
Channels
- # aws-lambda (6)
- # beginners (8)
- # cider (12)
- # cljs-dev (12)
- # cljsrn (9)
- # clojars (2)
- # clojure (161)
- # clojure-berlin (9)
- # clojure-italy (10)
- # clojure-russia (18)
- # clojure-spec (20)
- # clojure-uk (18)
- # clojurescript (37)
- # cursive (13)
- # data-science (1)
- # datomic (23)
- # flambo (2)
- # hoplon (22)
- # immutant (11)
- # jobs (1)
- # klipse (11)
- # leiningen (5)
- # liberator (7)
- # luminus (5)
- # lumo (3)
- # off-topic (28)
- # om (8)
- # onyx (15)
- # parinfer (111)
- # pedestal (21)
- # re-frame (6)
- # reagent (38)
- # rum (4)
- # spacemacs (2)
- # specter (34)
- # unrepl (122)
- # untangled (3)
- # vim (1)
- # yada (8)
Are there any common reasons why I could manifold/put!
something onto an SSE stream, but the client won't acknowledge it for 40+ seconds? This happens even if I have a large buffer and put 1 or 2 objects in
When opening the connection, here's what runs:
(defn yada-sse [ctx]
(let [{:keys [request response-channel]} ctx
addr (or (get (:headers request) "x-forwarded-for") (:remote-addr request))
country (get (Util/getGeo addr) "country_code")
source (ms/periodically 5000 (fn [] " "))
sink (ms/stream 1000)]
(ms/on-closed sink
#(close-conn ctx))
(update-proxy-pool addr sink country)
(info "Connecting...")
(ms/put! sink (str "data: " (generate-string {:ip @afghan.util/this-ip})))
(ms/connect source sink)
sink))
(yes, I had to do some odd things to be compatible with this client)Where is the Yada code that reads from a manifold stream and sends it to the SSE client?
@bradford do you have anything like nginx in between? If so, you need some configuration to avoid buffering
There is no code in yada that reads from the manifold stream. That's kind of the point of using manifold. Aleph passes the stream to Netty.
The actual code is in Netty.
@malcolmsparks nope, no nginx 🙂