Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

13 wp7 working with azure

2,054 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

13 wp7 working with azure

  1. 1. Windows Phone 7<br />Li Jingnan / Wang Tao<br />2011-7-15<br />1<br />
  2. 2. 2 days<br />2<br />
  3. 3. about<br />anytao| Ethos<br /><ethos:Member<br /> id = “Wang Tao”<br /> msn = anytao@live.com<br />weibo = http://weibo.com/anytao<br />runat = “Senior System Architect”<br />/><br />Jason | Ethos<br /><ethos:Member<br /> id = “Li Jingnan”<br /> msn = zengnami@hotmail.com<br />weibo= http://weibo.com/jn1981<br />runat = “SE”<br />/><br />
  4. 4. about<br />http://book.anytao.net<br />
  5. 5. 13 Working with Azure<br />Wang Tao / 2011-07-15<br />Senior System Architect<br />
  6. 6. session outline<br />Overview<br />Windows Azure toolkit for WP7<br />overview<br />why phone + cloud?<br />why WP7 + Azure?<br />5min Azure<br />identity<br />storage<br />service<br />communications<br />
  7. 7. why Phone + Cloud?<br />the cloud levels the playing field<br />the cloud provides a larger pool of resources from which to pull<br />the cloud provides a way to reach across device platforms<br />
  8. 8. why WP7 and Windows Azure?<br />PaaS: you build it, Windows Azure runs it<br />automatic O/S patching<br />scalable<br />utility billing<br />additional services (e.g. ACS, Traffic Manager, Caching, CDN, etc.)<br />common development tools<br />Visual Studio<br />languages<br />emulators for development<br />
  9. 9. 5m about Azure<br />9<br />
  10. 10. Windows Azure Platform<br />Scalable compute and storage<br />Automated service management<br />Familiar tools, technologies, languages <br />Relational storage for the cloud<br />Consistent development model<br />Automated database management<br />Connect existing apps to the cloud<br />Connect through network boundaries<br />Easily control authorization to apps<br />
  11. 11. WAZ Storage<br />Any pictures?<br />Windows Azure<br />SAS<br />Process Image<br />User Authentication<br />Store Image in Windows Azure Blob Storage<br />Process Image<br />Send Notification<br />Username & Password<br />Access Token<br />Access Token<br />Shared Access Signature<br />Original Text<br />Translated Text<br />Translated Text<br />Translated Text<br />Microsoft Push Notification Service<br />Bing Translator<br />
  12. 12. what are the pieces we just saw?<br />identity<br />storage<br />services<br />communications<br />
  13. 13. identity<br />
  14. 14. identity options<br />create your own (e.g. username + password, token)<br />custom model<br />ASP.NET membership providers<br />use a single existing identity system (e.g. Live Id, Facebook, etc.)<br />outsource identity management (e.g. Access Control Service)<br />
  15. 15. storage<br />
  16. 16. storage<br />SQL Azure<br />Relational database<br />Highly available<br />Managed for you as a service<br />Windows Azure Tables<br />Non-relational structured storage<br />Massive scale-out<br />OData<br />Windows Azure Blobs<br />Big files<br />REST<br />
  17. 17. SQL Azure: OData Service<br />client sends data to web role<br />web role stores data in SQL Azure<br />(2)<br />Web<br />Role<br />(1)<br />
  18. 18. Windows Azure Blobs: public blobs<br />client sends data to web role<br />web role stores data in blobs<br />client fetches public blobs directly<br />(2)<br />Web<br />Role<br />(3)<br />(1)<br />
  19. 19. Windows Azure Blobs: SAS<br />client gets Shared Access Signature from web role<br />client stores data in blobs<br />client fetches public blobs directly<br />Web<br />Role<br />(2)<br />(3)<br />(1)<br />
  20. 20. Windows Azure Tables: Proxy Calls<br />client sends data to web role<br />web role stores data in blobs<br />(2)<br />Web<br />Role<br />(1)<br />
  21. 21. do not store your secrets on the phone<br />
  22. 22. services<br />
  23. 23. Web Role versus Worker Role<br />Web Role has IIS<br />Worker Role does not<br />DLL with Main()<br />Both implement the RoleEntryPoint<br />
  24. 24. scaling work in Windows Azure<br />Web role receives message<br />Web role enqueues work<br />Worker role polls queue<br />Worker role sends notifications<br />(2)<br />(4)<br />Worker Role<br />Web Role<br />MPNS<br />(3)<br />(1)<br />
  25. 25. multitenancy<br />you can have more than one application running in your role instance<br />
  26. 26. Content Delivery Network<br />CDN<br />CDN<br />CDN<br />CDN<br />CDN<br />CDN<br />
  27. 27. Traffic Manager<br />
  28. 28. Communications<br />
  29. 29. communications<br />two communication models<br />Phone-initiated<br />Cloud-initiated<br />
  30. 30. Phone-Initiated Communication Options<br />HTTP-based, request/response<br />framework choices (WCF, OData, WebRequest, etc.)<br />wire format choices (SOAP, JSON, POX, etc.)<br />
  31. 31. Cloud-Initiated Communication<br />Push Notifications<br />single connection between phone and Microsoft Push Notification Service<br />bandwidth- and battery-friendly<br />no guarantee of delivery<br />three kinds of push notifications<br />Raw – send a message to an application<br />Toast – send a message to the user<br />Tile – update an image, title, or count<br />
  32. 32. subscribing to Push Notifications<br />phone opens a channel<br />phone sends URL to cloud<br />cloud pushes notifications via URL<br />Microsoft Push Notification service notifies phone<br />MPNS<br />Web Role<br />(3)<br />(1)<br />(2)<br />(4)<br />
  33. 33. what makes this easier?<br />
  34. 34. Windows Azure Toolkit for Windows Phone 7 (v1.2.3)<br />http://watoolkitwp7.codeplex.com/<br />
  35. 35. Windows Azure Toolkit for Windows Phone 7<br />make it easier for phone developers to use Windows Azure<br />toolkit includes:<br />client libraries<br />sample applications<br />source code<br />documentation<br />get it: http://watoolkitwp7.codeplex.com/<br />
  36. 36. demo<br />36<br />/ WADT<br />/ azure<br />/ notification service<br />04 Windows Azure Toolkit for WP7<br />
  37. 37. thank you<br />37<br />thank youwww.anytao.com<br />
  38. 38. 38<br />

×