Re:Show HN: Pullbox – A dead-simple dropbox alternative usin...
by rakoo on Sunday August 16, 2015 @09:19AM
(#10068813)
> What would happen if you took git, sed, rsync, and inotify, and you mushed and kneaded them together until smooth?
You'd get unison (https://www.cis.upenn.edu/~bcpierce/unison/) :)
Re:Show HN: Pullbox – A dead-simple dropbox alternative usin...
by prashanthellina on Friday August 14, 2015 @09:17AM
(#10059939)
Very cool! I wish I'd found your repo before writing my implementation. In fact, I was going to rewrite mine in Golang to reduce memory consumption on my back-up server. I will take yours for a spin.
I built something similar recently [0] (also a bit like Sparkleshare, which I just learned about from another comment in this thread...), but for me I needed to sync all of my source code between multiple machines. You can't do that with stock git, but I was able to s/git/gut/gi to make "gut" (which uses .gut folders to store its own state and will happy gut-add files inside .git subfolders) and now I have a "~/work" folder on my laptop, on my desktop, and on a dev box on AWS, with all of my source code synced in real-time.
I also wrote much the same thing in Node and also in Python before rewriting (again) to Go. You can peruse my Python code at [1] if you're curious. I used plumbum (awesome library) for executing local/remote commands (makes it a bit simpler than using subprocess and calling ssh with shell commands). Also, you can use inotifywait with the "--monitor" option which makes it keep running when there are changes; you have to then parse out what changed, and make sure you handle state correctly, but that way you don't miss changes made while inotifywait starts back up again.
[0]: https://github.com/tillberg/gut
[1]: https://github.com/tillberg/gut/tree/0ce233d44f7f55448c15411...