-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Not a lot here yet, mostly a scratchpad for future features, etc.
Thoughts on federation A distributed configuration of jsfs would consist of a local jsfs daemon running on the system that will be accessing the filesystem and listening on local ports. This is akin to a "network client" or "redirector", where the applications using the store access the distributed file store via calls through this local instance.
The local instance of jsfs maintains a list of other nodes sharing a filesystem. The jsfs metadata is shared among these hosts, replicated automatically. When the local node requests a file from the distributed filesystem, the local jsfs instance receives the request and looks up the hashblock(s) for the requested file. The local block store is then interrogated for the block files. If the files do not exist in the local block store, a request to each node in the list of nodes sharing the filesystem is made. These requests target a new (currently not-implemented) endpoint which only accepts requests for specific hashblocks and only returns the contents of these blocks. Note that a request is sent to all nodes asynchronously, as quickly as possible, and as soon as a "found" response is returned for the requested block from any node all other requests are cancelled. This ensures that the most responsive node handles the request without any negotiation overhead.