TODO : integrate the VFS-based file observer from Alex
The Replicated File System
This application is my first attempt to play with so called P2P & GRID environments. It is not a finite product, and does not suffer any comparison with "real-life" P2P software (like eMule or BitTorrent for example). Actually it does not deserve the same goal, even if a real working stuff was not the idea behind this small project... but let me try to play the game anyway :-P
Functional Description
The basic principle of RFS is, as the name says, to replicate a FileSystem (actually the contents of a folder on a computer's drive) on other hosts, all being inter-connected through a P2P-like network.
Each RFS node can export a local folder to its 'peers', and receives events from them as well.
Basically, each RFS node has local threads that scans the exported folder, and detect changes in it. When started (the UI allows to start/stop local scanning), they will look for :
- new files
- updated files
- deleted files
When a change is detected in the export folder, the node broadcasts the appropriate event to its peers. Then, the event is handled by the peers and the change on the remote folder is reflected locally (via download - for new and updated files - or local deletion).
What can I do with this ?
Well actually doing something was not the original purpose of RFS, once again it's more about an exercise than about building a fully operational software.
Still, I quickly thought about the following stuff :
- share files with friends or colleagues : it's a pretty cool way to share your documents, MP3s, photos etc easily ! Just drop your stuff in the export folder and your mates will get it directly
- replicated back-ups : RFS can be installed on a computer to back-up some data from there on several other hosts in a real-time and transparent way. Moreover, it can be manipulated remotely, which allows to launch backups from remote hosts ;
- collaborative work : replication allows to keep documents automatically synchronized, and everybody's got them locally, so you don't need to worry about getting everything before you go off-line ;
- ... ?
Don't hesitate to tel me if you think about another usage of RFS !
Missing features
The following features are currently missing in RFS.
- deep sync : allow to select a node and sync with it, with the possibility to select files individually) ;
- disconnected mode support (keep unsent events and re-send when peer available : at the moment you miss everything that occurs while you're not connected) ;
- This mode may be useless if deep sync is working well !
multiple export folder support (at the moment you can only export 1 single folder) ;
- port range definition (ports are more or less obtained randomly, so firwalling is difficult) ;
- better implementation of file monitoring (the current one is heavy and unefficient, e.g. locked files in the export dir !) ;
- ...
- NOTE
- There is absolutely no plan that these missing features will be implemented some day !
Installation & Usage
RFS is based on the Java platform (SE), and relies on the great ProActive GRID & P2P library from INRIA. RFS includes the required libraries from ProActive, but you've got to have a JDK (>= 1.4) installed and configured.
Installation
Download the full project (zip), and unpack anywhere you want.
Configuration
- Have a look at
/etc/rfs.propertiesand set the values in there (export and import dir) ; - You also have to edit
/bin/init.shand set the install root dir as theRFS_HOMEenvironment variable.
- TODO
- Explain LAN & Internet deploys !
Usage
To use RFS, first you have to start an RFS node. You have two options here : either starting alone, or joining an existing network, and this is done via command-line arguments passed to the startup script (at the moment you have to open a command prompt to start everything).
It goes a little somethin' like this :
%> cd <RFS_INSTALL_DIR>/bin %> rfs <node_name> <join_through_name>@<join_through_host>
With :
node_name: the name of the node (like a pseudo)join_through_name: the name of the node you want to join throughjoin_through_host: the host where the node you want to join through is running
This should bring up the RFS console, a basic UI that allows you to start/stop the file scanning thread, and see events and downloads.
Here is a screenshot of the console :
You can control (start or stop) the file scanning thread to avoid overhead on your host if you don't plan to export but just receive : this thread is used only for export matters, you will still be synchronized with other's exports even if you stop local scanning. Also, changes to your export folder should be detected by your node when the thread starts again next time, so don't hesitate to turn it off sometimes, specially if you know that there's no activity in your local export dir.
