Nandaka wrote:
nockgeneer wrote:Online sync (through website login or Google Drive or some other method perhaps...) for moving between devices. This would make the above feature less necessary. . . . at least for me.
Syncing through file is not recommended, too much pain. See:
http://inessential.com/2011/10/25/why_j ... _on_dropbo
I think that what you need in order to make a reliable syncing through file is modeling as if it was a Subversion system. Like in Git or SVN, you'd upload first a "base" of the data, and from since onwards you'd only upload the changes to it (in fact, the base would be unnecessary if you consider that every user starts from a certain "default" data). Then, every time you wanna update the information on the current device, you check the last "commited changes" you updated yourself to and start downloading since that one (which would make updating costs stable through time).
The device commits your changes to the info, if there's any, every 15 minutes or so. First, it'd check if there was any commit you didn't download yet, download them if there's any, and use some DIFF mechanism (which, seeing as the user data in this app is very simple, would be also very simple itself) to check if there's conflictive changes. If there is any, it would throw a popup or a notification to the user to ask for actions. There could be even an option that makes it so "automatically do X when there is conflict" if it is necessary. If there is no conflict, and also after solving existing conflicts, you commit your changes to the directory.
Now, how would you get directions along the updates? Very simple. Just make it as Subversion does in SVN (idk if Git does): Every update is labelled with a number, which is (<last update's number> + 1). Also, for avoiding concurrent conflicts, when you start creating an update, you make an empty archive inside the main folder, with the name <not ready - updating>, so every other device sees it when trying to commit and waits. You would upload every update as a folder, or as a text/XML file, with the ID in its name. Then, when you finished committing the changes, you erase the "WAIT" archive and let the other devices kick in with their commits.
This model I find to be very simple. The only challenge would be to do it using a cloud storage, which I'm not familiar with so I can't give you my thoughts. But I've seen a lot of devs. using dropbox, so that one seems to be the way to go. Maybe there's something better though.
Thanks for the app btw. Mostly because of its ease-of-use is that I use it instead of Aldiko for reading your works guys. Much much better.