210 likes | 333 Views
Peter Heinrich , Technical Evangelist. Cloud Save across Platforms & Devices. Games Services, Appstore for Android. Customer Experience. “ Put Buyers First? What a Concept” – Joe Nocera, New York Times.
E N D
Peter Heinrich, Technical Evangelist Cloud Save across Platforms & Devices
Customer Experience “Put Buyers First? What a Concept” – Joe Nocera, New York Times “Amazon.com Core Values: A Customer Experience Obsession” – Flavio Martins, WinTheCustomer! “If you do build a great experience, customers tell each other about that. Word of mouth is very powerful.” – Jeff Bezos “Amazon's obsession with customers pays off”– Matt Linderman, Signal vs. Noise
Small $$$ Fragile Mobile Devices Easy to misplace or lose Often targeted for theft Easily damaged or broken
? ? ? Use Cases Get Complicated
Currency Is Tricky Don’t allow offline purchases Allow, but exclude consumables Support negative balances Even online devices need to coordinate balance updates between themselves
Time Played across Devices 5 5+2 7+13 7 min 20 min 5 min 5 7 min 20
Time Played across Devices 5 2 13 2 min 13 min 5 min min 5, 2, or 13? 13
Time Played across Devices 5 2 13 2 min 13 min 5 min 5 7 min 20
Running Totals Make each client a local authority Keep subtotals and combine them in the cloud Return total on demand Sending deltas in updates is not idempotent
No Restrictions = Lots of Work Concurrency Control Sequence 2 1 3 1 3 2
Mergeable Data Uses a simple rule for conflict resolution, based on the nature of the data: High Score – largest / biggest Best Time – lowest / fastest Last Monster – most recent
Optimistic Locking • Save local timestamp or sequence # • Update local value • Retrieve remote timestamp / sequence # • If local > remote, push to cloud • Else, pull from cloud
Conflict Resolution Model data with mergeable types Simple rules allow unattended conflict resolution Nature of data defines rule Common types: Highest / lowest number, most-recent string
Whispersync for Games • Queues updates for offline operation • Automatically resolves conflicts between mobile devices and cloud • Lightweight API with fast integration Syncable Types: Number lowest, highest, most recent String most recent AccumulatingNumber running totals NumberList ascending, descending, latest StringList most recent StringSet Map
Learn more: developer.amazon.com Contact us: forums.developer.amazon.com developer.amazon.com/help/contactus.html Follow us: @peterdotgames /AmazonAppstoreForAndroid developer.amazon.com/blog