Cloud Services/FirefoxOS Sync
Work In Progress - Nothing Final Here
Objective
If we call this sync, everyone will be confused
Some things Firefox and Google are both pushing for:
- https://github.com/slightlyoff/BackgroundSync/blob/master/explainer.md <== HERE
- https://github.com/slightlyoff/ServiceWorker/blob/master/explainer.md
There are shared and private data types on fxos
shared include contacts, calendar, photos
private would be whatever an app might come up with (cupcake recipes, etc.)
both should be able to have a backing store that can sync with the apps on device
Use Cases
- install a flickr app, and your photos get uploaded to flickr ("sync")
- install a Google+ app, and your photos also get uploaded. Do both at once!
- install Delicious app, sync bookmarks (pending a bookmark DOM API, which we don't have)
- Facebook keeps its contacts in sync.
- Fruux backup keeps contacts in sync, EXCEPT Facebook contacts
- provision identity on fruux using firefox accounts assertion
Features
Scheduling
when resources permit (memory, wifi)
Aware of network cost (e.g., wifi only, nighttime minutes)
provide each app some assurance that it won't get OOM-killed while working
make sure each app is done within 5 minutes or so
feedback on success/failure?
Precedent: alarm API.
- Doesn't account for cases where you don't want the app to be woken up (e.g., the e-mail app shouldn't check for new messages if the phone's battery is running low).
- Can't wake up the app when an external event happens (e.g., you're on Wi-Fi). Scheduling becomes interesting, too; 10 apps shouldn't be woken up simultaneously.
UX Challenges
- how does the user know this is going on in the background?
- how can the user know about resource usage per app?
- if i'm on a limited data plan, there should be a way for me to know that there's a crappy app that's hoovering up all my data (existing network stats? per-app data usage?)
- dovetailing with success/failure feedback - something like android's notifications that "15 photos synced three minutes ago" - toaster pops down and tells you the results. simple, unobtrusive, non-blocking affordances to tell you that things worked.
- if there's a sync app, where do users find it? (preinstalled, probably) but not a certified app, so it can be updated. it would show up as an update, as play services on android - you can't open that app, but you can update it out-of-cycle
- would be nice to identify such apps as special in some way - they don't have a launcher, etc. (something in the manifest for this already? "role"?)
- services app could be bundled with various other apps?