Unix text streams to serve as message queues
The UNIX philosophy suggests we built a lot of simple programs that do one
thing well and that we do them with text streams. That is, the standard
input/output channels are sufficient means of messaging.
Console programs cannot only be piped together, they can also be directed
to a file. In doing this, you can essentially queue up messages (text in
files) for later processing. This seems to follow a similar model to
message queues but without all the sophistication.
Richard P. Gabriel suggests that a key advantage of Unix was that it
embodied a design philosophy he termed "worse is better", in which
simplicity of both the interface and the implementation are more important
than any other attributes of the system—including correctness,
consistency, and completeness.
From my perspective, text streams provide about as simple a channel of
communication as possible. This would seem to follow the worse-is-better
philosophy. Couldn't we thus use console applications and files written to
the file system as a poor man's message queue? And if so, has anyone
successfully taken and preferred this approach? I am simply wondering how
practical/feasible it is to substitute text stream processing for message
queues.
No comments:
Post a Comment