Fork me on GitHub
#sci
<
2021-08-05
>
viesti18:08:51

Wonder if anyone has tried to make a kind of sci nrepl for browser. Was thinking about sci based lib, that would understand nrepl commands, but which would work in a browser and could connect to a "proxy" (lacking better name) that would accept connections from these "nrepl handlers" (browser, or even some other process, like say a Lambda) and the "proxy" would also accept standard nrepl connections, but would broadcast commands to multiple "handlers" connected to the "proxy".

viesti18:08:16

A little handwavy, but airing out the idea anyway 🙂

borkdude18:08:31

Perhaps the webdriver protocol is similar

viesti05:08:37

ah, thanks for pointing it out 🙂

viesti05:08:32

Skimmed https://www.w3.org/TR/webdriver/, and yeah there's similarity in that there's a "intermediary node", local and remote ends, and sessions. I was thinking to allow sending same command to multiple remote ends, then each of them could respond with their value, which the intermediary node would push to the local node, but should add some identification of the remote end, either at nrepl protocol level or in the result.

viesti05:08:37

maybe the remote end could be more like a nrepl handler only, the intermediary node then could ask for some identification from it (maybe this could be application specific thing even, like looking up stuff in re-frame app db), then the intermediary node could add associate that identification to nrepl session id, and pass the remote end identification to response messages sent to the local end

viesti05:08:52

thinking out loud