If you have node running and I have node running, has anyone seen a solution that will allow us to keep a set of files in sync.
Synchronisation is complicated, so I thought that could be left to a tool like unison (which is like rsync) and then all node would have to do is connect up a TCP pipe between authenticated users.
filesystem1---unision==tcp==node.js------[http]----node.js==tcp====unison---filesystem2
It's probably about 12 lines of JavaScript, but at this point it is beyond me, or any of the examples I could find, so far.
I have looked at a whole bunch of other file synchronisation options (like Git, veracity, fossil, including a week of trying to install a Simias iFolder server on Linux, fail ~ which looked promising because it included a filewatching client for each major OS) but now I'm thinking that something much, much simpler would probably be the go.
If anyone has seen a Node.js project that does such, or is at a level where connecting two TCP pipes is not too hard, then I would appreciate hearing from you
The basic approach I would take to this problem is to use stream2.
My basic approach would be something like this.
getting data from first tcp
then at your node
then on the other end, you do the reverse
at node
coming from the second tcp
through2
creates transforms streams andgulp
help you create tasks with stream. Vinyl files are just an abstraction used by gulp.I hope that gives you an idea of how to use streams to solve your problem good luck