4 ms·
Cool first Ruby project, for sure, but "Dropbox clone" is a stretch. That phrase does help explain the idea in a nutshell, but this is essentially a script tha
by adriand 16y ago
Cool first Ruby project, for sure, but "Dropbox clone" is a stretch. That phrase does help explain the idea in a nutshell, but this is essentially a script that polls at intervals and either pulls from the remote repository, or adds, commits, and pushes from the local one.
Incidentally, when I read the source I didn't notice any conflict handling, so you might want to be careful if you intend on using it for anything where conflicts are a possibility.
- arethuza 16y ago"polls at intervals and either pulls from the remote repository, or adds, commits, and pushes from the local one" What does the dropbox client do that is significantly different from this? Does dropbox do block level replication or something? NB I use dropbox and like it, but I do like the idea of the server component being completely open.
- dan00 16y ago"What does the dropbox client do that is significantly different from this?" Using inotify (linux). Polling doesn't scale.
- arethuza 16y agoI'd assumed the "poll" there was the connection to the server - I hadn't even thought about polling for modified files!
- meltingice 16y agoYeah, I'm looking into inotify to see how I can implement that with Ruby. Would definitely be nicer than simply polling the directory.
- nixme 16y agoTry rb-inotify (linux) and rb-fsevent (os x): https://github.com/nex3/rb-inotify https://github.com/nex3/rb-inotify https://github.com/thibaudgg/rb-fsevent https://github.com/thibaudgg/rb-fsevent
- adriand 16y agoThe biggest thing that comes to mind is native clients for every computer and device I own (PC with both Windows & Linux on dual-boot, Mac desktop & laptop, iPod Touch, iPad), complete with nice file browsers, integrated media playing, etc. I was going to put that in my original comment, but thought it was somewhat obvious: at first glance, it seems to me that this would require the most work if you wanted to actually clone Dropbox. That, and the nicely designed website, marketing copy, clever social/viral features, etc.
- eddieplan9 16y agoFYI, dropbox does not do meaningful conflict resolving. It dumps a new file for each duplicated copy. Even worse, dropbox does not do merge even it is mergeable. This "dropbox clone" is actually better than real dropbox in this aspect.
- necubi 16y agoActually, this is one of my favorite features of Dropbox. It may occasionally make me do some additional work to merge files, but it's worth it for the peace of mind: I know that Dropbox will never delete anything I don't want it to or erase history I want left intact. Automatic merging isn't generally useful for things besides code, and if your using Dropbox for managing code you probably want to use a real SCM.