Building and Trying FileMQ
The FileMQ stack is on GitHub. It works like a classic C/C++ project:
git clone git://github.com/hintjens/filemq.git cd filemq ./autogen.sh ./configure make check
You want to be using the latest CZMQ master for this. Now try running the track command, which is a simple tool that uses FileMQ to track changes in one directory in another:
cd src ./track ./fmqroot/send ./fmqroot/recv
Open two file navigator windows, one into src/fmqroot/send and one into src/fmqroot/recv. Drop files into the send folder, and you’ll see them arrive in the recv folder. The server checks once per second for new files. Delete files in the send folder, and they’re deleted in the recv folder simultaneously.
I use track for things like updating my MP3 player, mounted as a USB drive. As I add or remove files in my laptop’s Music folder, the same changes happen on the MP3 player. FILEMQ isn’t a full replication protocol yet, but we’ll fix that later.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access