I plan to use Unix named pipes (mkfifo) for simple multi-process messaging. A message would be just a single line of text.
Would you discourage me from that? What obstacles should I expect?
I have noticed these limitations:
- A sender cannot continue until the message is received.
- A receiver is blocked until there are some data. Nonblocking IO would be needed when we need to stop the reading. For example, another thread could ask for that.
- The receiver could obtain many messages in a single read. These have to be processed before quiting.
- The max length of an atomic message is limited by 4096 bytes. That is the PIPE_BUF limit on Linux (see man 7 pipe).
I will implement the messaging in Python. But the obstacles hold in general.