prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
prashanthellina's comments
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
I read that running multiple git commands at the same time on the same repo should be fine (I can't remember where I read this). It is probably better to synchronize regardless!
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
I am using this to synchronize my Markdown based notes files across machines. There are under a hundred files now so I haven't hit any issues in that department yet.
However, there is a gradual memory leak which persists even when I kill and restart my process. I observed this only on a KVM based Linux guest - not sure if this is because of inotify based listening but I'm going to have to dig deeper to find out.
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
My goal was to write a very thin wrapper around the workflow I would follow if I had to sync the changes myself manually. The tricky part was in figuring out how to inform multiple client machines when the backup server noticed a change in the file system. I wanted to avoid writing a server-side component that I had to install on the server and maintain.
When I found that I could use a combination of "ssh" and "inotifywait" (run inotifywait on the server using ssh from the client and listen for changes), I was pleasantly surprised that this even worked! I see my implementation in this aspect as the equivalent of AJAX long-polling that used to be applied for chat like communication in the browser in some implementations. i.e. When some modification happens on the server filesystem, the "inotifywait" command quits thereby unblocking the "ssh" command upon which I do a "git pull".
Because of the above, I was able to keep my implementation really simple - The whole functionality was achieved in under 300 lines of code.
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
prashanthellina | 10 years ago | on: Show HN: Pullbox – A dead-simple dropbox alternative using Git
prashanthellina | 10 years ago | on: Gitfs
1. Make it work on OSX 2. Use a lock file to prevent multiple instances from running when I put this in crontab
I found watchman[0]. Got to see if I can use that in place of "inotifywait".
[0]: https://facebook.github.io/watchman/docs/install.html