nodejs to nodejs repl/swank like communication with async calls?

109 Views Asked by At

I'm working on my own internal cmdline gui for controling my big remote node app. it uses terminal gui, things like this https://github.com/yaronn/blessed-contrib#rolling-log in combination with a REPL

but I don't want to implement an internal API for this 'admin client app' -> 'big app' communication.

I'd like to have a direct access to an internal context of the running app so that I can have an open ended, async parallel communication and code execution instead of calling specific API calls.

(I would probably like to patch into the log stream directly, maybe filter that log stream on the serverside (for high traffic logs), and execute simple commands in parallel. query user models and such.)

I know I can pipe a node repl to tcp (https://nodejs.org/api/repl.html#repl_repl_features) but this doesn't give me a way to call parallel async functions and differentiate between responses.

I know about swank-js, this is not really what it's been invisioned to do, but it might fit. I'm looking into it.

if that doesn't work out I will use my own generic query/reply protocol, send and receive JS code, call this on the server via repl or eval, and somehow wrap callbacks/promises into query replies.

Did anyone work on such a thing before me? Does anyone know of a similar project? seems like someone must have thought of such a "context bridge" between two remote apps. Any advices? What are your thoughs on this in general?

0

There are 0 best solutions below