cloud save across platforms & devices

21
Cloud Save across Platforms & Devices Peter Heinrich, Technical Evangelist

Upload: tanika

Post on 23-Jan-2016

31 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Cloud Save across Platforms & Devices

Cloud Save across Platforms & Devices

Peter Heinrich, Technical Evangelist

Page 2: Cloud Save across Platforms & Devices

Games Services,Appstore for Android

Page 3: Cloud Save across Platforms & Devices
Page 4: Cloud Save across Platforms & Devices

Customer Experience

“Amazon.com Core Values: A Customer Experience Obsession” – Flavio Martins, WinTheCustomer!

“Put Buyers First? What a Concept” – Joe Nocera, New York Times

“Amazon's obsession with customers pays off” – Matt Linderman, Signal vs. Noise

“If you do build a great experience, customers tell each other about that. Word of mouth is very powerful.” – Jeff Bezos

Page 5: Cloud Save across Platforms & Devices

Save Customer Game Data!

Page 6: Cloud Save across Platforms & Devices

Mobile Devices

Small $$$ Fragile

Easy to misplace or lose

Often targeted for theft

Easily damaged or broken

Page 7: Cloud Save across Platforms & Devices

Mobile + Cloud, BFFs

DB

Page 8: Cloud Save across Platforms & Devices

Use Cases Get Complicated

?

?

?

Page 9: Cloud Save across Platforms & Devices

Real Money, Real Problems

!

Page 10: Cloud Save across Platforms & Devices

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

Page 11: Cloud Save across Platforms & Devices

7205

Time Played across Devices

5 min 7 min 20 min

min

5 5+2 7+13

Page 12: Cloud Save across Platforms & Devices

135, 2, or 13?

Time Played across Devices

5 min 2 min 13 min

min

2 135

Page 13: Cloud Save across Platforms & Devices

7205

Time Played across Devices

5 min 2 min 13 min

min

2 135

Page 14: Cloud Save across Platforms & Devices

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

Page 15: Cloud Save across Platforms & Devices

Other Game Data

Page 16: Cloud Save across Platforms & Devices

No Restrictions = Lots of Work

1 2

3

132

Concurrency Control

Sequence

Page 17: Cloud Save across Platforms & Devices

Mergeable DataUses 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

Page 18: Cloud Save across Platforms & Devices

Optimistic Locking

1. Save local timestamp or sequence #

2. Update local value

3. Retrieve remote timestamp / sequence #

A. If local > remote, push to cloud

B. Else, pull from cloud

Page 19: Cloud Save across Platforms & Devices

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

Page 20: Cloud Save across Platforms & Devices

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

Page 21: Cloud Save across Platforms & Devices

Learn more: developer.amazon.com

Contact us: forums.developer.amazon.com developer.amazon.com/help/contactus.html

Follow us:@peterdotgames/AmazonAppstoreForAndroiddeveloper.amazon.com/blog