This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-08
Channels
- # announcements (11)
- # babashka (13)
- # beginners (11)
- # biff (2)
- # calva (17)
- # cider (19)
- # clojure (60)
- # clojure-berlin (1)
- # clojure-dev (20)
- # clojure-europe (48)
- # clojure-nl (1)
- # clojure-norway (98)
- # clojure-spec (7)
- # clojure-uk (5)
- # core-typed (32)
- # cursive (13)
- # datomic (12)
- # dev-tooling (5)
- # emacs (7)
- # figwheel-main (2)
- # graalvm (4)
- # hyperfiddle (4)
- # introduce-yourself (1)
- # malli (14)
- # missionary (32)
- # off-topic (7)
- # overtone (4)
- # pedestal (10)
- # proletarian (4)
- # re-frame (8)
- # releases (11)
- # tools-build (1)
- # tools-deps (4)
- # xtdb (38)
Hi, folks! A question: suppose I want to have a middleware that sends REPL-side events - like, for example, a message that a promise in JS resolved, or that a breakpoint was hit. What should be the "recommended", if that exists, way of doing it? Sending back a message with some op
field? Something else?
Hi Mauri! afaik nRepl is a request/multi-response protocol, with nothing for server sent events, so maybe a new op
for polling events is your only option?
or maybe a long polling system is a little bit more efficient, but I guess that depends on clients and servers timeouts handling
what I would try is to add a middleware with a subscribe-to-events op
that will send multiple responses but never send one with a :status :done
. As events occur you keep sending back responses.
On the client side call subscribe-to-events
once after the client connects and dispatch all events client side for every response returned
For now, the only thing that I saw that sent me REPL-side events were STDOUT and STDERR, but they just added some fields to a message and that's it...