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

    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
MY CLOUD ENVIRONMENT
Amazon Web Services                           Windows Azure
   DNS (Route 53)                             Web Sites
   Compute (EC2)                               API Web Services (Node.js)
                                                Web Site www.4thandmayor.com
   Load Balancing (ELB)
                                                Staging Environment for APIs & main Web Site
   Storage (S3) & CDN
                                                Live Tile Generation*
   Text and Email Notifications (SNS)         Cloud Service Worker Role: Mail
   Intra-region data transfer to 3rd party     Processing
    services                                   Cloud Service Web Role: SSL Load
                                                Balancer
MongoLab
                                               Table Storage Service
 Hosted MongoDB in US-EAST-1AWS
     User Data, Push Processing Queues        Virtual Machines
                                                Linux: Statsd statistics & time/data store
 Hosted MongoDB in West US / Azure Store
     Web Site Sessions                        Windows Azure Store
MY CLOUD ENVIRONMENT
Amazon Web Services                           Windows Azure
   DNS (Route 53)                             Web Sites                    $50-$100*
   Compute (EC2)         $25-$150              API Web Services (Node.js)              *trial/partially free compute
                                                Web Site www.4thandmayor.com
   Load Balancing (ELB)
                                                Staging Environment for APIs & main Web Site
   Storage (S3) & CDN
                                                Live Tile Generation*
   Text and Email Notifications (SNS)         Cloud Service Worker Role: Mail
   Intra-region data transfer to 3rd party     Processing
    services                                   Cloud Service Web Role: SSL Load
                                                Balancer
MongoLab                     $40
 Hosted MongoDB in US-EAST-1AWS
                                               Table Storage Service
     User Data, Push Processing Queues        Virtual Machines
                                                Linux: Statsd statistics & time/data store
 Hosted MongoDB in West US / Azure Store
     Web Site Sessions       FREE             Windows Azure Store
BILLS
AZURE PORTAL ROCKS!
CLOUD APIS
My Services                                                  Storage-hosted services
 Push notification connections, disconnects,                   What’s new content
  push URI changes                                              Known current version number
 Automated Crash Reports                                       Version-specific kill bits, global kill bit
 Email crash reports & mail parsing                            Standard tiles
 Custom live tile generation
                                                            3rd Party Services
 App settings & preferences                                  Foursquare
 Continuous processing queue                                 Google Analytics
   Live tiles, toasts, new users, upgrade logic, special
    tasks                                                    3rd Party Tools
                                                              UserVoice ($0)
   Platform/version-specific tasks & services
                                                              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                                     Stats
   Detailed                                Statsd, Graphite, Carbon
   Table storage                           Time scale storage
   Per-user                                UDP
   Winston (Node.js logger) extension      Fire and forget
                                            Linux VM on Azure or EC2 Instance
                                              DNS
MIGRATION CHALLENGES
> 150,000 users in active processing   Foursquare is in US-EAST-1 (AWS)


DNS hosting helps w/transitions        Statsd helps show trends during
                                       tests

Free time
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.

My cloud + Windows Phone app experience

  • 1.
    MY CLOUD + WINDOWSPHONE @jeffwilcox Developer, 4th & Mayor EXPERIENCE
  • 2.
    JEFF’S TOPICS My cloudenvironment $$$ 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
  • 3.
    MY CLOUD ENVIRONMENT AmazonWeb Services Windows Azure  DNS (Route 53)  Web Sites  Compute (EC2)  API Web Services (Node.js)  Web Site www.4thandmayor.com  Load Balancing (ELB)  Staging Environment for APIs & main Web Site  Storage (S3) & CDN  Live Tile Generation*  Text and Email Notifications (SNS)  Cloud Service Worker Role: Mail  Intra-region data transfer to 3rd party Processing services  Cloud Service Web Role: SSL Load Balancer MongoLab  Table Storage Service  Hosted MongoDB in US-EAST-1AWS  User Data, Push Processing Queues  Virtual Machines  Linux: Statsd statistics & time/data store  Hosted MongoDB in West US / Azure Store  Web Site Sessions  Windows Azure Store
  • 4.
    MY CLOUD ENVIRONMENT AmazonWeb Services Windows Azure  DNS (Route 53)  Web Sites $50-$100*  Compute (EC2) $25-$150  API Web Services (Node.js) *trial/partially free compute  Web Site www.4thandmayor.com  Load Balancing (ELB)  Staging Environment for APIs & main Web Site  Storage (S3) & CDN  Live Tile Generation*  Text and Email Notifications (SNS)  Cloud Service Worker Role: Mail  Intra-region data transfer to 3rd party Processing services  Cloud Service Web Role: SSL Load Balancer MongoLab $40  Hosted MongoDB in US-EAST-1AWS  Table Storage Service  User Data, Push Processing Queues  Virtual Machines  Linux: Statsd statistics & time/data store  Hosted MongoDB in West US / Azure Store  Web Site Sessions FREE  Windows Azure Store
  • 5.
  • 6.
  • 7.
    CLOUD APIS My Services Storage-hosted services  Push notification connections, disconnects,  What’s new content push URI changes  Known current version number  Automated Crash Reports  Version-specific kill bits, global kill bit  Email crash reports & mail parsing  Standard tiles  Custom live tile generation 3rd Party Services  App settings & preferences  Foursquare  Continuous processing queue  Google Analytics  Live tiles, toasts, new users, upgrade logic, special tasks 3rd Party Tools  UserVoice ($0)  Platform/version-specific tasks & services  Tumblr ($0)  GitHub ($12)
  • 8.
    STAGING & PRODUCTION Debugbuilds 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
  • 9.
    AUTHENTICATION, KEYS, CERTS… Environment variableMODE assign staging/production value Environment variable APP assigns service: e-mail processing, worker, web, API host JSON-based configuration loaded through configuration.js
  • 10.
    CONNECTING FROM THE CLIENTAPP HttpClient NuGet/PCL Retry policies, handling HTTP status GZip Compression RestSharp JSON.NET Caching technology & strategies; AgFx
  • 11.
    LOGGING & STATISTICS Logs Stats  Detailed  Statsd, Graphite, Carbon  Table storage  Time scale storage  Per-user  UDP  Winston (Node.js logger) extension  Fire and forget  Linux VM on Azure or EC2 Instance  DNS
  • 12.
    MIGRATION CHALLENGES > 150,000users in active processing Foursquare is in US-EAST-1 (AWS) DNS hosting helps w/transitions Statsd helps show trends during tests Free time
  • 13.
    SCALE Smart per-user resourceallocation Web Sites Reserved Instances: Size & Count Mongo-based consistency enables multiple workers DNS Load Balancing
  • 14.
    PUSH NOTIFICATIONS FOR NODE.JS MPNSmodule  Windows Phone 7-8  Dev: Jeff  Source: https://github.com/jeffwilcox/mpns WNS module  Windows 8  Dev: Tomek  Source: https://github.com/WindowsAzure/wns
  • 15.
    OPEN SOURCE AZURE ConsiderWindows Azure Mobile Services for your next app! Resources at: http://windowsazure.com/ Check the OSS team out online: http://windowsazure.github.com/
  • 17.
    NOTES 4th & Mayoris 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.