Closed piernov closed 5 years ago
A key use case for the TTY plugin is for debugging purpose, together with the JSON serialization plugin, where the user would type some JSON payloads in the terminal. I would not use the TTY plugins in a more advanced way.
What would be the preferred way for IPC, or for integrating with NodeJS?
Well, if two things implemented in ThingML are running locally on the same node (in the same ThingML configuration), there is no need for using external connectors and protocols (just normal connectors). Otherwise, the UDP or Websocket plugins could be used. But I must confess we have not used them for a while, so it might be some bug fixing to be done there.
In f64b280aa841c3cc025d237c588e154f4ab6022c the TTY plugin for JavaScript was made to require an actual TTY. (checking
process.*.isTTY
) This prevents use outside shell, for example calling from a NodeJS application usingchild_process.fork()
and then redirecting input/ouput streams to exchange message with the ThingML process or between multiple ThingML processes.Any reason a TTY would be needed? If not, could this be reverted?
Thanks,