I'm a freshman to ZK. We're going to build a multiple mounted file system, all clients shares a centralized backend storage, with local cache enabled. Since it is allow to read/write the backend file concurrently, local data/meta data could be out-of-date, so the subscription model is used to have notify data/meta-data changes, other than check timestamp on each file access.
With ZK we could have threads watch znode for events and trigger callbacks, but the lock granularity is a problem, the zk file hierarchy represents exactly the same with our file system hierarchy, but we can not watch all the znodes, is it possible for client watching the one znode(for example the root znode), any changes on child/low level znodes will notify clients, and envoke the callbacks. It means only one watcher required for a given file system, which reduces watchers dramatically. Thanks a lot.
