Upload
jeff-wilcox
View
692
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Short slides about some of the app services and cloud basics used for the 4th & Mayor app, a Windows Phone foursquare app. Presented at a Windows Phone Garage event in Redmond, WA on 3/14/2013.
Citation preview
MY CLOUD + WINDOWS PHONE
EXPERIENCE@jeffwilcoxDeveloper, 4th & Mayor
JEFF’S TOPICS
My cloud environment
$$$
The cloud APIs I expose
Staging and Production Environments
Connecting to the cloud from my client application
Logging and Statistics
Migration challenges
Scale
Push Notifications for Node.js / Azure open source
MY CLOUD ENVIRONMENT
Amazon Web Services DNS (Route 53) Compute (EC2) Load Balancing (ELB) Storage (S3) & CDN Text and Email Notifications (SNS) Intra-region data transfer to 3rd party services
MongoLab Hosted MongoDB in US-EAST-1AWS
User Data, Push Processing Queues
Hosted MongoDB in West US / Azure Store Web Site Sessions
Windows Azure Web Sites
API Web Services (Node.js) Web Site www.4thandmayor.com Staging Environment for APIs & main Web Site Live Tile Generation*
Cloud Service Worker Role: Mail Processing
Cloud Service Web Role: SSL Load Balancer
Table Storage Service Virtual Machines
Linux: Statsd statistics & time/data store
Windows Azure Store
MY CLOUD ENVIRONMENT
Amazon Web Services DNS (Route 53) Compute (EC2) Load Balancing (ELB) Storage (S3) & CDN Text and Email Notifications (SNS) Intra-region data transfer to 3rd party services
MongoLab Hosted MongoDB in US-EAST-1AWS
User Data, Push Processing Queues
Hosted MongoDB in West US / Azure Store Web Site Sessions
Windows Azure Web Sites
API Web Services (Node.js) Web Site www.4thandmayor.com Staging Environment for APIs & main Web Site Live Tile Generation*
Cloud Service Worker Role: Mail Processing
Cloud Service Web Role: SSL Load Balancer
Table Storage Service Virtual Machines
Linux: Statsd statistics & time/data store
Windows Azure Store
$25-$150$50-
$100*
$40
FREE
*trial/partially free compute
BILLS
AZURE PORTAL ROCKS!
CLOUD APIS
My Services Push notification connections, disconnects, push URI changes
Automated Crash Reports Email crash reports & mail parsing Custom live tile generation App settings & preferences Continuous processing queue
Live tiles, toasts, new users, upgrade logic, special tasks
Platform/version-specific tasks & services
Storage-hosted services What’s new content Known current version number Version-specific kill bits, global kill bit Standard tiles
3rd Party Services Foursquare Google Analytics
3rd Party Tools UserVoice ($0) Tumblr ($0) GitHub ($12)
STAGING & PRODUCTION
Debug builds target my staging environment
Staging uses modified JSON values (keys, certificates, etc.)
Git deployment with Azure Web Sites makes it quick & easy
Production challenges
Version-specific endpoints
Migration between providers
Database and cloud downtime
AUTHENTICATION, KEYS, CERTS… Environment variable MODE assign staging/production value
Environment variable APP assigns service: e-mail processing, worker, web, API host
JSON-based configuration loaded through configuration.js
CONNECTING FROM THE CLIENT APP HttpClient NuGet/PCL
Retry policies, handling HTTP status
GZip Compression
RestSharp
JSON.NET
Caching technology & strategies; AgFx
LOGGING & STATISTICS
Logs Detailed Table storage Per-user Winston (Node.js logger) extension
Stats Statsd, Graphite, Carbon Time scale storage UDP Fire and forget Linux VM on Azure or EC2 Instance
DNS
MIGRATION CHALLENGES
> 150,000 users in active processing
DNS hosting helps w/transitions
Free time
Foursquare is in US-EAST-1 (AWS)
Statsd helps show trends during tests
SCALE
Smart per-user resource allocation
Web Sites Reserved Instances: Size & Count
Mongo-based consistency enables multiple workers
DNS Load Balancing
PUSH NOTIFICATIONS FOR NODE.JS MPNS module Windows Phone 7-8 Dev: Jeff Source: https://github.com/jeffwilcox/mpns
WNS module Windows 8 Dev: Tomek Source: https://github.com/WindowsAzure/wns
OPEN SOURCE AZURE
Consider Windows Azure Mobile Services for your next app!
Resources at:http://windowsazure.com/
Check the OSS team out online:http://windowsazure.github.com/
NOTES
4th & Mayor is a trademark of Wilcox Digital, LLC
This presentation was created for a “Windows Phone Garage” event on 3/14/2013
Opinions are Jeff Wilcox’s alone.