17
MY CLOUD + WINDOWS PHONE EXPERIENCE @jeffwilcox Developer, 4 th & Mayor

My cloud + Windows Phone app experience

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

Page 1: My cloud + Windows Phone app experience

MY CLOUD + WINDOWS PHONE

EXPERIENCE@jeffwilcoxDeveloper, 4th & Mayor

Page 2: My cloud + Windows Phone app experience

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

Page 3: My cloud + Windows Phone app experience

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

Page 4: My cloud + Windows Phone app experience

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

Page 5: My cloud + Windows Phone app experience

BILLS

Page 6: My cloud + Windows Phone app experience

AZURE PORTAL ROCKS!

Page 7: My cloud + Windows Phone app experience

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)

Page 8: My cloud + Windows Phone app experience

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

Page 9: My cloud + Windows Phone app experience

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

Page 10: My cloud + Windows Phone app experience

CONNECTING FROM THE CLIENT APP HttpClient NuGet/PCL

Retry policies, handling HTTP status

GZip Compression

RestSharp

JSON.NET

Caching technology & strategies; AgFx

Page 11: My cloud + Windows Phone app experience

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

Page 12: My cloud + Windows Phone app experience

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

Page 13: My cloud + Windows Phone app experience

SCALE

Smart per-user resource allocation

Web Sites Reserved Instances: Size & Count

Mongo-based consistency enables multiple workers

DNS Load Balancing

Page 14: My cloud + Windows Phone app experience

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

Page 15: My cloud + Windows Phone app experience

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/

Page 16: My cloud + Windows Phone app experience
Page 17: My cloud + Windows Phone app experience

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.