FSWatcher
The FSWatcher is responsible for tracking the current state of a file in a file system.
We do this by tracking the relatively high frequency file system change events and merging these events into a model of the current state of a given file. On any (relevant) state changes for a given file, the FSWatcher sends a NATS message informing the ComputePod of this change.
For our current implementation, we do this by using Linux inotify events. This means that the current implementation is limited to running ComputePods on Linux computers.
Comments
Note that "log files" have no dependants... and so we really do not need to keep SHA256 values for these files.
Anything which does have a dependant will need a SHA256 value when that file has finished changing.
Really we only need SHA256 values for primary artefacts, those which will be directly edited by users. How do we determine these artefacts? I guess they have no explicit dependencies (they are implicitly dependant on a Human user's whim).
NO: we also need SHA256 values for artefacts which are automatically generated by some build step. By comparing old and new SHA256 values we can determine if the artefact has in fact been changed in any substantial way. Such artefacts can be marked as such by the rules manager.
Who should run the SHA256 computations? The Artefact Manager since it has a better understanding of what a given file represents, as well as when there is a need to (re)SHA256.