A Simpler Inter Process Communication API with inotifywait
<p>As it goes on a *nix system, <a href="https://en.wikipedia.org/wiki/Everything_is_a_file" rel="noopener ugc nofollow" target="_blank">everything is a file</a>. It summarizes the notion that a lot of information in *nix systems is represented as a file somewhere on the filesystem. /proc is probably the most famous of these, but there are other places of interest around if you look for them.</p>
<p>Couple this idea of files with a feature such as <a href="https://en.wikipedia.org/wiki/Inotify" rel="noopener ugc nofollow" target="_blank">inotify</a>, and you can get an event stream into any file or directory you wish to monitor. inotify generates events on a range of different actions possible with a file or directory such as opening, reading, writing, closing and many more.</p>
<p>If used creatively, a utility around this can provide a system wide messaging platform, wherein processes could be set up which monitor specific files or directories and perform certain functions as they observe specific events. For example, a single server which is configured to send emails can have a process observing a directory named <em>inbox</em>, and any file created in there with enough information to send an email will get processed. The files in the observed directory can also be created via SCP which would be using the operating system’s own auth service.</p>
<p><a href="https://medium.com/@kumarrg/os-wide-event-messaging-with-inotifywait-d2fa0be648d3"><strong>Read More</strong></a></p>