3 ms·
I might not understand what the Datastore API is for, but if I wanted to make a simple app that could sync to Word Docs between to clients, would these .doc fil
by joejohnson 13y ago
I might not understand what the Datastore API is for, but if I wanted to make a simple app that could sync to Word Docs between to clients, would these .doc files get represented in this database structure (tables, records and values)? Is that data structure just for example purposes?
How would this algorithm handle changes to the same text file? Is the file a record, and each row considered a value in that record?
EDIT: Looks like this API is only for "structured data like contacts, to-do items, and game state."
https://www.dropbox.com/developers/datastore https://www.dropbox.com/developers/datastore
- smarx 13y agoYour edit is correct. To sync files, you would use the Core API or Sync API. (https://www.dropbox.com/developers/core https://www.dropbox.com/developers/core and https://www.dropbox.com/developers/sync https://www.dropbox.com/developers/sync)
- joejohnson 13y agoI'd be interested to hear how conflicts are handled with those APIs.
- smarx 13y agoThe API uses (optional) optimistic concurrency. So when you write a file, you can specify the expected parent revision, and if the revisions don't match, the operation will fail. If you want, you can have Dropbox instead just overwrite whatever file is present on the server or write the new file but rename it in the process (e.g. "myfile (1).txt"). This is pretty much all that's possible to do generally for files, since their structure is opaque. One of the ideas behind the Datastore API is to support developers structuring their data in such a way that changes can be merged automatically.