This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-17
Channels
- # admin-announcements (4)
- # beginners (21)
- # boot (37)
- # cider (41)
- # cljs-dev (3)
- # cljsjs (11)
- # cljsrn (4)
- # clojure (31)
- # clojure-austin (21)
- # clojure-belgium (30)
- # clojure-canada (1)
- # clojure-dusseldorf (2)
- # clojure-poland (7)
- # clojure-russia (20)
- # clojure-taiwan (1)
- # clojure-uk (45)
- # clojurescript (90)
- # core-async (8)
- # cursive (4)
- # data-science (1)
- # datomic (5)
- # dirac (6)
- # docker (1)
- # emacs (8)
- # hoplon (102)
- # ldnproclodo (2)
- # lein-figwheel (3)
- # leiningen (13)
- # off-topic (9)
- # om (54)
- # onyx (4)
- # other-languages (101)
- # pedestal (8)
- # planck (2)
- # protorepl (1)
- # re-frame (15)
- # reagent (13)
- # spacemacs (4)
- # untangled (126)
- # yada (4)
So here’s an open topic for discussion: how do you decide on the size of channel buffers? It’s kind of implicit that you want things to balance so that producers can just keep ahead of consumers but will also slow down with back-pressure if they get too far ahead. The buffer size of the channel seems to be the way to tune that … but that feels like black magic to get the numbers “right”, and core.async doesn’t have a lot of hooks for monitoring, to help with making these determinations.
I think it would be pretty straightforward to wrap your choice of buffer with a logging implementation, to get some idea of what is happening https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/protocols.clj#L31-L35
I have gone through and updated a bunch of go blocks to write information to an atom before doing channel operations, and then compared channel read and writes, but that was more for debugging deadlocks
I wrote https://ce2144dc-f7c9-4f54-8fb6-7321a4c318db.s3.amazonaws.com/buffer.html about measuring buffering