I want to pass messages between a Node.js server and a C program that is forked by the Nodejs server. I know there are a lot of possibilities. Here is one on StackOverflow. However, I want the lightest possible mechanism as the server passes one message to the Child process at the start and the Child process sends one at the end. What would be the lightest possible solution for this?
I can think of TCP, UDP, pipes, Unix sockets or just writing to a file and reading from it. TCP sockets would be a heavy solution.
Any suggestion?