Skip to content

Revision checking

July 30, 2012

After a laborious weekend involving lots of coding, I (think I) have finally managed to get some decent revision checking built in to Cloudpipes. Not seeing many errors now on it, but will need to test it a bit.

I must say it involved a lot of redesign and state-checking and was not so easy. I will soon add an update for 1-way sync too but first the basics. I havent sent out an update in a while now.

Revision checking and syncing can be acheived by keeping and saving a sync table at the client side which remembers what was last synced and the last revisions used. I use the last modified date for revisions for a number of reasons. Mainly because it can be expanded upon later on but also it gives a good idea of when the file was modified relative to the last sync.

The table format is simple, it contains {file_path, local_last_modified_date, remote_last_modified_date}. On starting processing a pipe, it loads the last sync table first, then generates a new sync table based on the file dates (fetches remote dates from Dropbox), then it compares these two tables to see whether it needs to upload the files or not depending on if they were locally or remotely modified.

Thanks to the guys at the Dropbox forums for ideas.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: