This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-09
Channels
- # aws (51)
- # beginners (57)
- # calva (10)
- # chlorine-clover (7)
- # cider (20)
- # clj-kondo (55)
- # clojure (43)
- # clojure-europe (9)
- # clojure-italy (1)
- # clojure-nl (5)
- # clojure-spec (8)
- # clojure-uk (71)
- # clojurescript (33)
- # core-async (22)
- # cursive (20)
- # datomic (3)
- # emacs (8)
- # figwheel-main (8)
- # fulcro (13)
- # garden (2)
- # graalvm (60)
- # graphql (26)
- # jobs (6)
- # joker (6)
- # kaocha (2)
- # lambdaisland (5)
- # malli (36)
- # off-topic (9)
- # portkey (15)
- # re-frame (3)
- # reagent (25)
- # remote-jobs (4)
- # spacemacs (3)
- # sql (111)
- # tree-sitter (29)
- # uncomplicate (3)
- # xtdb (2)
Hi @tajoddin.shima not sure I understand your question, some example illustrating your issue would help. Maybe keep mind this tip: https://clojuredocs.org/clojure.core.async/mult#example-563432f8e4b0290a56055d17?
thanks for answering @fmjrey
I have some client who wants to read from a source channel so I think I must use mult
I also want the to have the most updated data so I think I must use sliding buffer
for this part, but the problem is their speed aren't equals so beacuse of the synchronization in mult
one client must wait for all others to done they first read ... how can I avoid this?
I'm not sure how you can avoid this situation entirely unless you tap into the source before core.async. The doc also says so: > Use buffering/windowing to prevent slow taps from holding up the mult.
And even if you post to two different channel, you would need to decide what the source should do when one blocks.
so overall you need to review the constraints you can afford in terms of lost data and or blocked thread
for example: https://www.reddit.com/r/Clojure/comments/cbv9yh/tape_when_kafka_is_too_much_and_durablequeue_not/
thanks for answering @fmjrey
I have some client who wants to read from a source channel so I think I must use mult
I also want the to have the most updated data so I think I must use sliding buffer
for this part, but the problem is their speed aren't equals so beacuse of the synchronization in mult
one client must wait for all others to done they first read ... how can I avoid this?
Am I right in assuming that an alts!
where all entries are [channel-to-put-to val-to-put]
, all val-to-put being identical, it will choose the channel-to-put-to that becomes available first?