1. Lessons Learned from Making
Apps Resilient with Azure
Mobile App Services
Matthew Soucoup
Sr. Cloud Developer Advocate,
Microsoft
@codemillmatt codemilltech.com matt.soucoup@microsoft.com
2. Slides & Code!
Slides: slideshare.net/MatthewSoucoup
Code: github.com/codemillmatt/zumo-resilient
Matthew Soucoup
Sr. Cloud Developer Advocate
Microsoft
18. Keeps data processing where it
belongs (on the server)
Works great with MVVM
Fast downloadOnly data that’s needed
Keep Client Schema Flat - Benefits
19. Selectively pick data
to store
Optimize local
schema for screens
Mobile specific APIsFlat data
Don’t recreate the
server schema
Lessons Learned
20. PUSHING & PULLING DATA
Resilient Apps with Azure Mobile App Services
30. Cloud security and benefits with
device-level performance
Only pull what’s needed
Consistent data between devicesConsistent data between users
Benefits
32. Check SyncContext
PendingOperations
Make use of
background services
Push and pull when it
makes the most sense
Only do large pushes
over Wi-Fi
No need to push data
right away
Lessons Learned
41. Don’t ask the user if their data
should win
Different exceptions for offline push
vs. connected push
Never mess with the Version fieldPush shared data ASAP
Lessons Learned
43. Want to get back to seed data?Weird behavior / bad data in dev?
Purge and Refresh
44. Reseed app with test dataProvide users ability to clear cache
Server schema changes –> refresh
client data
Great during development – erase
test data & start over
Benefits
45. var query = syncTable.CreateQuery()
.Where(st => !st.SeedData);
syncTable.PurgeAsync(”seed_query", query, true, null);
Create a query that defines data to
purge
Run “PurgeAsync” to delete data
First parameter resets incremental
sync query for all pulls
3rd parameter “forces” delete even
with pending operations
46. Seriously, do it super earlyDo it early in the dev cycle
Lessons Learned