File system watch API (as documented here) was not functional in AIX until node v7.x.

Filesystem watching
While the ‘watch’ feature provides a high level abstraction to node applications, the underlying operating systems define and manage the file system in a variety of ways. Because of this, it requires complex operations inside the virtual machine to make sure a uniform beahvior is exhibited by the API across platforms. Still, platform specific requirements and behavioral differences exist. Please refer to the API documentation to familiarize yourself with the AIX file watch facility and the caveat section to understand AIX specific information.

watch in AIX
The pre-requisite for feature to function in AIX is that it should have AIX® Event Infrastructure installed and the AHAFS file system mounted. These are usually not available under the default OS installation. Please refer to the AHAFS documentation for the details about how to install the event infrastructure (bos.ahafs) and mounting of the monitoring file system (/ahafs)

Use case

Common use case for file watching is to implement monitors and log streams. In contrast to applications developed in a conventional programming language (C#, Java for example) which necessitates a dedicated thread to implement monitors, event-driven and asynchronous programming model which node.js brings about helps achieve this relatively easily with semantics native to the language, and no additional resource allocated at the source level.

Here is an illustration of how the file watch works:

The output is as follows:

Bottom line

Advanced Interactive eXecutive (AIX) is a proprietary UNIX operating system whose salient features include high resilience, scalability and security while fully exploiting the underlying system (PowerPC) is widely used to host highly resilient systems. With the file watch feature functional in AIX, node.js capabilities are fully available in this platform. This brings together the power of event-driven programming at the virtual machine side and the robustness at the system side, making it a powerful platform for building and deploying highly interactive applications that demand high degree of stability and reliability.

Join The Discussion

Your email address will not be published. Required fields are marked *