Support for rr.spawn(serve=True)
for multiprocess web-viewing
#7768
Labels
enhancement
New feature or request
🪵 Log & send APIs
Affects the user-facing API for all languages
user-request
This is a pressing issue for one of our users
Users want to be able to log to the web-viewer from multiple processes, just like they do with the native viewer.
This requires an intermediate proxy, so all the data can go through a single websocket port, which the web-viewer then knows to poll.
The solution today is to manually start a tcp+websocket server with
rerun --serve
, then just userr.connect()
in all your clients.That manual step is annoying, and AFAICT, could be automated away by augmenting
rr.spawn()
.All
rr.spawn()
does is basicallyfork_exec("rerun --port={port}")
. We could add an extraserve: bool
parameter, and thenrr.spawn(serve=True)
would bottom out infork_exec("rerun --port={port} --serve")
.Assuming our usual policy of "silently re-use the existing instance in case of conflicted ports", that means every client could just call
rr.spawn(serve=True)
and voila, all the processes are logging to the same web-viewer.Related:
rr.serve
should berr.serve_websocket
,rr.connect
should berr.connect_tcp
#7766The text was updated successfully, but these errors were encountered: