Change soledad document's sync flag to allow multiple sync scenarios
We need the following flags:
- do not sync.
- upload but not download, unless explicitelly requested.
- always sync.
- default. (the client could choose the defaul behaviour, maybe we don't need a default)
Usage scenario:
16:52 <@elijah> the user has a ton of data about them 16:52 <@elijah> lets say, 10gb 16:52 <@elijah> and they start up a new device, say a mobile phone or a laptop 16:52 <@elijah> they don't want to wait until all 10gb have sync'ed before they can use anything 16:53 <@elijah> so, we have different flags for different databases. 16:53 <@elijah> some sets of documents are "always sync" 16:53 <@elijah> others are "sync when you can and if you have space" and others are "dont bother syncing this, just grap when needed" 16:55 <@elijah> it would be crazy to require a mobile device user to sync all 10gb before email will start up 16:55 <@db> currently we have a boolean flag, i guess we can change it to a numerical flag that will mean the options above 16:55 <@elijah> but the behavior is different 16:55 <@elijah> when a document is *created* it is *always* synced 16:56 <@elijah> the sync flag for 'no sync' is when you are updating the local replica based on data on the server. that is when you want to be able to skip a document in the syncing process, but not when it is created. 16:57 <@elijah> a boolean flag is sufficient for now, but the behavior needs to change, although i suppose it might be useful for the client to have some private storage that we ensure won't get uploaded. 16:58 <@db> i'll create an issue for that 16:59 <@elijah> so maybe there are really four flags: no-sync-at-all, sync-upload-but-not-download, always-sync, default 16:59 <@elijah> the names could use some work 16:59 <@db> what's the difference between default and always-sync ? 17:00 <@db> (u1db default is always sync) 17:00 <@elijah> the client could choose what to do with default, but is directed to ensure that always-sync is always synced 17:00 <@db> ah, ok 17:00 <@elijah> also, maybe always sync always happens first, and then default
(from redmine: created on 2013-12-26)