This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-12
Channels
- # announcements (2)
- # bangalore-clj (4)
- # beginners (97)
- # calva (57)
- # cider (24)
- # clj-kondo (1)
- # cljdoc (4)
- # cljs-dev (8)
- # cljsrn (6)
- # clojure (27)
- # clojure-berlin (7)
- # clojure-dev (95)
- # clojure-europe (16)
- # clojure-italy (15)
- # clojure-losangeles (9)
- # clojure-nl (8)
- # clojure-spec (10)
- # clojure-uk (29)
- # clojurescript (25)
- # clojutre (2)
- # clr (6)
- # cursive (33)
- # datomic (20)
- # dirac (1)
- # duct (9)
- # fulcro (2)
- # graalvm (18)
- # jobs (5)
- # jobs-discuss (19)
- # nrepl (4)
- # nyc (1)
- # off-topic (18)
- # pathom (15)
- # re-frame (22)
- # reagent (4)
- # reitit (1)
- # rewrite-clj (9)
- # spacemacs (2)
- # xtdb (12)
Is it ok to have blocking operations in a resolver/mutation when using the parallel parser?
@kenny no. It will freeze your system sometimes
a dummy solution is wrap your blocking ops with a thread
https://github.com/souenzzo/graph-demo/blob/master/src/main/souenzzo/graph_demo/core.clj#L99
@kenny if you use the thread pool feature, its ok
the thread pool thing will run resolvers in a dedicated thread pool, so they wont block the go
block threads
@wilkerlucio Oh cool! So then you don't need to return a core.async thread from each resolver, right?
correct
even if you don't use the thread pool, its ok to return strait values
And the benefit over the regular parser is that the resolvers are run in parallel, right?
correct 👍
@kenny just a caveat, tune that number, nowadays I believe 200 is too much, at Nubank we are running pretty big instances with 100
and its been fine
depending on how much concurrency you are expecting it may be good to bump the Go thread pool as well (core.async default is 8
, we are using 32
)