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...