Harnessing the Cloud to Create Social Mobile Apps That Scale<br />Jim Zimmerman<br />CTO, Thuzi     (Facebook Preferred Pa...
Agenda – Using the Cloud to…<br />The Grand Intersection: Mobile, Social, Success <br />The Challenges<br />How to, Lesso...
Mobile Usage of Smartphones Simply Exploding<br />Smartphones up 75% in 2010 worldwide from 310 million in 2010 to 390 mil...
900 <br />Million<br />90<br />Social is Getting Bigger Too, Particularly on Mobile<br />200 <br />Million<br />2x<br /># ...
Social Promotions running on Facebook spike easy<br />Fans<br />Week 1<br />Week 2<br />Outback Steakhouse<br /> 350,000 p...
But Social Apps, Well That’s Another Story:They Need Amazing Scale<br />The Backend Need:<br />Run 1 million updates, dail...
So Let’s Talk About Relevant Design Patterns<br />The Backend Need:<br />Run 1 million updates, daily<br />(that’s right, ...
Multiple Devices All Talking to the Cloud<br />If the app you are creating is successful, how will you scale?<br />How qui...
So…. What is the Windows Azure Platform?<br />Web Scale<br />App Fabric<br />Compute<br />Management<br />Storage<br />(“N...
Data Strategies for Cloud Scale Apps<br />Partitioning data key to cloud scale apps<br />Horizontally partition for scale ...
Scaling to millions in the Cloud<br />The Device:<br />Mobile phone<br />Tablet<br />NoSQL<br />Storage<br />Web Server In...
Client side Javascript and HTML 5 Features<br />$.post("./Service/AddMessage", personMsg, function (result) {<br />	$.ajax...
Using the Windows Azure Toolkit for scheduling<br />CloudEngineengine = new CloudEngine();<br />            Action<Message...
Examples – Ruby Tuesday Bracket challenge<br />Leaderboard<br />How do you figure out who is winning among your friends<br...
Ruby Tuesday Facebook Leaderboard<br />14<br />
Ruby Tuesday Bracket – Viewable from Devices also<br />15<br />
TownHall<br />A social engagement platform hosted on Windows Azure and available for organizations to customize and moneti...
Building Blocks<br />TownHall<br />Also: <br /><ul><li>Native code
iPhone, iPad, WP7, Blackberry, Android – April 30th
Titanium has “Accelerator” that is cross platform
Scales very well
Can handle 8 million per hour
To deploy…
Create Azure account
Upcoming SlideShare
Loading in …5
×

Harnessing the cloud to create social mobile apps that scale

860
-1

Published on

This is a discussion at the 2011 Web 2.0 Expo SF event, with Jim Zimmerman, CTO of Thuzi. We shared lessons on how to use the cloud for social apps that inevitably need dramatic scale to be a success.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
860
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Resources:Whitepapers You May LikeSQL Azure: http://www.microsoft.com/en-us/sqlazure/whitepapers.aspxWindows Azure: http://www.microsoft.com/windowsazure/whitepapers/default.aspxInteroperability assets: http://www.interoperabilitybridges.com/Discussion:Azure Platform TenetsWeb scaleHaving enough resources for your app, when you need itAs a company we understand scale given such cloud solutions as Windows Update, MSN, XBox liveUtility billing model - pay for what you useAn Open platformAny comment that we are a closed platform is simply incorrectBased on open RESTful standards to engage any device using HTTP servicesResurces for Eclipse, PHP, Java and othersVisit http://www.interoperabilitybridges.com/PaaSThis is “Platform as a Service” – building a new app or re-architecting an existing one to evolve it in some manner. The Platform enables you to transform your current solutions to take advantage of the cloud, yet harness on-prem servicesWhy PaaS?Focus your precious headcount on the app and customer dataYour on-prem datacenters have inconsistent infrastructures while Azure is a standardized environmentYou don’t spend time / effort to take care of OS patches and security upgrades, because Azure is maintained for you. Additional IT capacity does not mean you are swamping your team with more maintenanceYou don’t need to plan for peak load, you just use the on-demand scaleYou don’t worry about how to avoid and recover from failures, you use something built to expect and withstand failureMicrosoft’s PaaS is about the developer harnessing a whole range of possibilities And about non-MSFT technologies like Java, PHP, Ruby, etc.We are unique in the ability to federate and have single identity across our platformsAvailable in 41 countries (as of April 2011)AustraliaAustriaBelgiumBrazilCanadaChileColombiaCosta RicaCyprusCzech RepublicDenmarkFinlandFranceGermanyGreeceHong KongHungaryIndiaIrelandIsraelItalyJapanLuxemburgMalaysiaMexicoNetherlandsNew ZealandNorwayPeruPhilippinesPolandPortugalPuerto RicoRomaniaSingaporeSpainSwedenSwitzerlandTrinidad and TobagoUKUnited States
  • Harnessing the cloud to create social mobile apps that scale

    1. 1. Harnessing the Cloud to Create Social Mobile Apps That Scale<br />Jim Zimmerman<br />CTO, Thuzi (Facebook Preferred Partner)@jimzim<br />Abe Pachikara<br />US Cloud Computing Developer Adoption Lead, Microsoft<br />Twitter: @abepachikara<br />
    2. 2. Agenda – Using the Cloud to…<br />The Grand Intersection: Mobile, Social, Success <br />The Challenges<br />How to, Lessons, Tips and Tricks<br />Examples<br />1<br />
    3. 3. Mobile Usage of Smartphones Simply Exploding<br />Smartphones up 75% in 2010 worldwide from 310 million in 2010 to 390 million in 2013 - IDC<br />Source: IDC<br />Source: The Nielsen Company<br />2<br />
    4. 4. 900 <br />Million<br />90<br />Social is Getting Bigger Too, Particularly on Mobile<br />200 <br />Million<br />2x<br /># Objects that people interact with (pages, groups, events and community pages) <br />Average user creates 90 content pieces each month<br /># Active users currently accessing Facebook through their mobile devices<br />Use of Facebook from a mobile device vs. non-mobile device<br />Source: Facebook<br />3<br />
    5. 5. Social Promotions running on Facebook spike easy<br />Fans<br />Week 1<br />Week 2<br />Outback Steakhouse<br /> 350,000 people sign up - - in 12 days<br />670,000 in 5 weeks, (but that is only .17% of Facebook at time of the promotion!)<br />Day 1 Signups for Thuzi’s clients<br />4<br />
    6. 6. But Social Apps, Well That’s Another Story:They Need Amazing Scale<br />The Backend Need:<br />Run 1 million updates, daily<br />(that’s right, <br />daily !)<br />…. And Each User Has 50 Friends<br />… Let’s say only 20k users buy the app, run it on…<br />Mobile phones<br />& Tablets<br />The App:<br />Friend Related Status or Data<br />5<br />
    7. 7. So Let’s Talk About Relevant Design Patterns<br />The Backend Need:<br />Run 1 million updates, daily<br />(that’s right, <br />daily !)<br />The App:<br />Friend Related Status or Data<br />
    8. 8. Multiple Devices All Talking to the Cloud<br />If the app you are creating is successful, how will you scale?<br />How quick do you want to get to market?<br />Database, document storage, async coding practices<br />Nearly unlimited access to more compute power when needed<br />Do you want to spend more money on IT staff to manage servers or spend more on developers<br />7<br />
    9. 9. So…. What is the Windows Azure Platform?<br />Web Scale<br />App Fabric<br />Compute<br />Management<br />Storage<br />(“No-SQL “)<br />CDN<br />Data Sync<br />Marketplace<br />Relational database<br />Web Services APIs (for interoperability and portability) <br />Utility Billing Model<br />Developer Experience - Use existing skills and tools.<br />Open Platform based on RESTful standards<br />Housekeeping: See “Speaker Notes” sections for useful resources<br />8<br />
    10. 10. Data Strategies for Cloud Scale Apps<br />Partitioning data key to cloud scale apps<br />Horizontally partition for scale out<br />Vertically partition for cost/performance<br />Choose appropriate partition keys <br />Table storage requires different approach to data modeling. <br />Don’t be afraid to aggressively de-normalize and duplicate data<br />
    11. 11. Scaling to millions in the Cloud<br />The Device:<br />Mobile phone<br />Tablet<br />NoSQL<br />Storage<br />Web Server Instances<br />(Web Roles)<br />Background Processes<br />(WorkerRoles)<br />Get Newsfeed<br />Message Queues<br />Post Message<br />Relational Database<br />External APIs<br />10<br />
    12. 12. Client side Javascript and HTML 5 Features<br />$.post("./Service/AddMessage", personMsg, function (result) {<br /> $.ajax(“./Service/GetFeed”, function (r) {<br />saveToLocalStorage(“data”, r.data);<br />});<br />});<br />function saveToLocalStorage(key, value) {<br /> if (typeof (localStorage) == 'undefined') {<br /> // alert('Your browser does not support HTML5 localStorage. Try upgrading.');<br /> } else {<br /> try {<br />var serialized = JSON.stringify(value);<br />localStorage.setItem(key, serialized); //saves to the database, "key", "value"<br /> } catch (e) {<br /> alert(e);<br /> }<br /> }<br /> }<br />11<br />
    13. 13. Using the Windows Azure Toolkit for scheduling<br />CloudEngineengine = new CloudEngine();<br /> Action<MessageHandlerSettings> configSettings = c =><br /> {<br />c.BatchSize = 32;<br />c.MaxThreads = 1;<br />c.MaxRetries = 1;<br />c.IntervalBetweenRuns = TimeSpan.FromMinutes(1);<br /> };<br />engine.WithMessageHandler<PersonMessage, CallPersonCommand>(configSettings);<br />// Azure C# Side<br />varblob = new EntitiesBlobContainer<PersonMessageView>();<br />vardata = blob.Get(“personMessages");<br />varmsgs= data.AllMessages;<br />return msgs;<br />
    14. 14. Examples – Ruby Tuesday Bracket challenge<br />Leaderboard<br />How do you figure out who is winning among your friends<br />Bracket points<br />Show points so far on individual brackets<br />20 points win round 1, 40 round 2, 80 round 3, etc<br />13<br />
    15. 15. Ruby Tuesday Facebook Leaderboard<br />14<br />
    16. 16. Ruby Tuesday Bracket – Viewable from Devices also<br />15<br />
    17. 17. TownHall<br />A social engagement platform hosted on Windows Azure and available for organizations to customize and monetize<br />16<br />
    18. 18. Building Blocks<br />TownHall<br />Also: <br /><ul><li>Native code
    19. 19. iPhone, iPad, WP7, Blackberry, Android – April 30th
    20. 20. Titanium has “Accelerator” that is cross platform
    21. 21. Scales very well
    22. 22. Can handle 8 million per hour
    23. 23. To deploy…
    24. 24. Create Azure account
    25. 25. Run scripts to deploy the database
    26. 26. Use VS Express 2010 or the trial
    27. 27. Moderated forums
    28. 28. Community forums
    29. 29. Themes available out of the box
    30. 30. Points + Badges for engagement
    31. 31. Events functionality
    32. 32. Polling
    33. 33. Ideas site
    34. 34. Scalable (cloud hosted)
    35. 35. Customizable</li></ul>17<br />
    36. 36. Examples of Townhall in Actual Use<br />NASA JPL<br />“BE A MARTIAN”<br />UNITED WAY WORLDWIDE “CAMPAIGN FOR COMMON GOOD”<br />COLOMBIAN PRESIDENTIAL<br />CANDIDATE<br />CEOs FOR CITIES<br />“OF, BY AND FOR YOU”<br />NEBNY EGYPTIAN CROWDSOURCING<br />US HOUSE REPUBLICANS<br />“AMERICA SPEAKING OUT”<br />O’REILLY MEDIA<br />GOV 2.0 FORUM<br />WHITE HOUSE/US DEPT OF EDUCATION “ASK ARNE”b<br />
    37. 37. Resources you can use today<br />General Bits and Runtimes<br />Facebook related assets: <br /><ul><li>C# SDK – http://facebooksdk.codeplex.com/
    38. 38. Azure Toolkit – http://azuretoolkit.codeplex.com/
    39. 39. Technical walkthru - http://www.devx.com/MS_Azure/Article/46308</li></ul>Mobile Assets: Tapping the cloud for Windows Phone apps <br /><ul><li>Cloud cover session
    40. 40. Team blog posting</li></ul>Try Azure for yourself:<br />http://bit.ly/jimonazure, <br />Promocodejimonazure<br />Apps To Repurpose<br />TownHall App can be found here – <br />Next major rev will be delivered by April 30<br />Here’s a useful datasheet<br />19<br />
    41. 41. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.<br />The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.<br />
    42. 42. Appendix – Other resources you may like<br />
    43. 43. “Growing Fast“ <br />“On and Off “ <br />Inactivity<br />Period <br />Compute <br />Compute <br />Average Usage<br />Usage<br />Average<br />Time <br />Time <br />On and off workloads (e.g. HPC or batch job)<br />Over provisioned capacity is wasted <br />Time to market can be cumbersome <br />Successful services needs to grow/scale <br />Remove upfront CAPEX investment barrier<br />Complex lead time for deployment<br />“(Un)predictable Bursting“ <br />“Business Critical LOB“ <br />Compute <br />Compute <br />Average Usage <br />Average Usage <br />Time <br />Time <br />Unexpected/unplanned peak in demand <br />Services with seasonality trends <br />Can’t over provision for extreme cases <br />Business/divisional opportunities<br />Time to market – agile support of business<br />Development and deployment backlog<br />Cloud Scenarios<br />
    44. 44. Extra Credit: Windows Azure Resources<br />Learn<br />“What is the Windows Azure Platform?” 4 min video<br />Windows Azure Case Studies<br />Deploying a large scale app, Virtual Lab<br />Azure developer center<br />Using your MSDN Premium Benefits<br />Microsoft’s Datacenters<br />Security Talk Series<br />Watch Professional Developers Conference sessions<br />Get<br />Windows Azure Tools for Microsoft Visual Studio<br />Windows Azure Platform Training Kit<br />Interoperability tools<br />Join<br />BizSpark, for startups<br />The vibrant online community – https://channel9.msdn.com/Shows/Cloud+Cover<br />Also on Facebook – www.facebook.com/windowsazure<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×