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.

MSDN - Converting an existing ASP.NET application to Windows Azure


Published on

Put your stuff in the cloud! Windows Azure allows you to take advantage of cloud computing infranstructure for hosting, computing, and storage of your applications. In this demo filled session we take an existing ASP.Net Application and move it to be hosted in Windows Azure, while taking advantage of Windows Azure storage.

Published in: Technology
  • Be the first to comment

MSDN - Converting an existing ASP.NET application to Windows Azure

  1. 1. Converting an existing ASP.NET application to Windows Azure<br />Maarten Balliauw – RealDolmenBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw<br />
  2. 2. Whoam I?<br />Maarten Balliauw<br />Antwerp, Belgium<br /><br />Focus on web<br />ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, …<br />MVP ASP.NET<br /><br /><br />
  3. 3. Agenda<br />Windows Azure?<br />An existing application…<br />Migration paths<br />Considerations<br />Q&A<br />
  4. 4. What’s in the cloud?<br />Windows Azure<br />
  5. 5. The Windows Azure Platform<br />Windows Azure<br />SQL Azure<br />Windows Azure platform AppFabric<br />Developer tools<br />Microsoft Codename “Dallas”<br />
  6. 6. Windows Azure<br />Flexible application hosting<br />Lights-out service management<br />Provide code & service model, hit ENTER<br />Storage at massive scale<br />Compute<br />Storage<br />Management<br />
  7. 7. SQL Azure<br />Relational database as a service<br />Highly available, automatically maintained<br />Extension of the SQL Server Data Platform<br />Business Analytics<br />Reporting<br />Data Sync<br />Database<br />
  8. 8. SQL Azure<br />Relational database, provided as a service<br />Highly symmetrical development and tooling experience (use TDS protocol and T-SQL)<br />Highly scaled out, on commodity hardware<br />Built on the SQL Server technology foundation<br />Beyond “hosted database”<br />High availability, DB provisioning, and DB management are provided by the service<br />Pay for what you use<br />
  9. 9. Windows Azure AppFabric<br />Secure connections between services<br />Across organizational boundaries<br />Claims-based access control<br />ServiceBus<br />AccessControl<br />
  10. 10. Windows Azure AppFabric - Service Bus<br />Securely connect applications<br />Over the internet<br />Across any network topology<br />Across organizational boundaries<br />Primary application patterns<br />Eventing: <br />Notify applications and/or devices<br />Service Remoting: <br />Securely project on-premises services out to the cloud<br />Tunneling: <br />App-to-app communication with NAT/Firewall traversal<br />
  11. 11. Windows Azure AppFabric - Access Control<br />Provides outsourcing of claims-based access control for REST web services<br />Key capabilities:<br />Usable from any platform<br />Low friction way to onboard new clients<br />Integrates with AD FS v2<br />Supports WRAP / SWT<br />Enables simple delegation<br />Used today by Service Bus and “Dallas”<br />
  12. 12. Microsoft Codename “Dallas”<br />Content brokerage and discovery platform <br />Available as a CTP at commercial launch<br />Microsoft Codename “Dallas”Information Services<br />
  13. 13. Introducing “Dallas”<br />Content Brokerage and Discovery platform <br />Discover, Explore, and Use any type of content (blobs, structured, real-time web services)<br />Tap into an ecosystem of global content providers<br />Process & analyze data<br />Empowers developers of all sizes<br />Built on Windows Azure and SQL Azure<br />
  14. 14.
  15. 15.
  16. 16. Windows Azure<br />
  17. 17. Blob<br /> Container<br />Entities<br />Account<br />Table<br />http://&lt;account&gt;;container&gt;<br />http://&lt;account&gt;;table&gt;<br />Messages<br />Queue<br />Windows Azure Storage Concepts<br />http://&lt;account&gt;;queue&gt;<br />
  18. 18. Blob Storage<br />Store sets of binary data<br />Text files, images, …<br />Highly Available<br />Automatically scales to multiple servers and locations<br />Durable<br />Data is replicated at least 3 times<br />
  19. 19. Table Storage<br />Store sets of structured data<br />Not bound to schema!<br />Billions of entities (rows) and TBs of data<br />Automatically scales to thousands of servers as traffic grows<br />Highly Available<br />Can always access your data<br />Durable<br />Data is replicated at least 3 times<br />
  20. 20. Table Storage Capabilities<br />What tables don’t do<br />What tables can do<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Not relational<br />No Referential Integrity<br />No Joins<br />Limited Queries<br />No Group by<br />No Aggregations<br />Transactions (limited)<br />Very Scalable<br />Flexible<br />Durable<br />Store LOTS of stuff <br />Cheap<br />If these are important to you, use SQL Azure<br />
  21. 21. Queue Service<br />Store a queue of messages<br />FIFO<br />Can be used by multiple worker roles<br />
  22. 22. Windows Azure Summary<br />Many is better than one<br />Let Microsoft worry about this<br />Loose coupling<br />Web Role and Worker Role<br />Storage choice<br />Azure Storage: Simple stores scale<br />Table, Blob, Queue<br />SQL Azure: Full RDBMS<br />Stored Procedures, Schema, Transactions, Views etc<br />
  23. 23. Let’s have a look at…<br />an existing application…<br />
  24. 24. Existing ASP.NET application<br />ASP.NET Webforms<br />“Repository pattern”<br />Entity framework<br />Database<br />File storage on server<br />Built with no need for scale<br />
  25. 25. An existing application<br />DEMO<br />
  26. 26. The shortest way to the cloud<br />Migration paths<br />
  27. 27. First things first…<br />Tools:<br />Windows Azure SDK<br />Windows Azure Visual Studio Tools<br /><br />New solution:<br />Blank “cloud service”<br />Add existing projects<br />Promote to “web role”<br />
  28. 28. Migration paths: hosting & file storage<br />Windows Azure Web Role<br />Hosting the web application<br />Windows Azure Blob Storage<br />Hosting “user uploaded content”<br />Option 1: HttpHandler<br />+ Abstraction and migration freedom<br />- Traffic & related costs<br />Option 2: public blob container + Azure CDN<br />+ Traffic & related costs+ Pretty download URL<br />+ Fast! Nearby!<br />- Abstraction and migration freedom<br />
  29. 29. Migration paths: data<br />Option 1: SQL Azure<br />Easiest migration path for data<br />More powerful RDBMS<br />Sync Framework Power Pack:<br />SQL Azure Migration Wizard:<br />Option 2: Table storage<br />Will be cheaper in operating costs for small applications<br />Will probably require some rework<br />
  30. 30. Migrating the application<br />DEMO<br />
  31. 31. Think before you go cloudy…<br />Considerations<br />
  32. 32. Hosting<br />Migration<br />Will be an easy migration<br />Remember to use the providers from the SDK<br />Keep the “multiple roles” idea in mind!<br />Considerations to make<br />Store all content in the application?<br />Requires a re-deployment quite often…<br />Better: store more dynamic content on blob storage<br />Background processing<br />Try moving heavy CPU tasks to worker role where appropriate<br />One web role?<br />Will be cheaper…<br />But will have your application down during upgrade…<br />Better: always &gt; 1 web role (at least 2)<br />
  33. 33. Database<br />Working with EF / NHibernate / (insert ORM here)?<br />SQL Azure wil be easiest path, but is more expensive<br />Table storage…<br />Will get you frustrated if your application design is bad!(like mine in the demo)<br />Use simple data structures for table storage<br />Map these to whatever you want in your application<br />
  34. 34. Architecture<br />Quote: “Some architectures will require rework” All of them will require rework to do it right…<br />Current application architecture not suited for large scale!<br />I can go for multiple web roles<br />But not for unlimited web roles…<br />Think in “multiple roles”<br />Web roles<br />Backedbyworkerroleswhereneeded<br />Architecture will be one of the challenges<br />
  35. 35. Typical Architecture<br />Service Unavailable<br />VIP<br />Worker Role<br />Web Role<br />Windows Azure Storage <br />(Blob, Table, Queue)<br />
  36. 36. Web + Worker Role Service Model<br />Worker Role<br />Service Still Available<br />Worker Role<br />Web Role<br />VIP<br />Worker Role<br />Web Role<br />Worker Role<br />Worker Role<br />Windows Azure Storage <br />(Blob, Table, Queue)<br />
  37. 37. Windows Azure - Coming soon…<br />Programming model<br />Administrator privileges in the VM<br />Deployment of pre-configured VM images<br />Still obtain the benefits of the WA service model<br />Storage<br />User-selectable geo-locations for replicas<br />Secondary indices on tables<br />Service management<br />Remote terminal server access to VMs<br />
  38. 38. Resources<br />Windows Azure<br />Steve Marx<br />Clemens Vasters<br />Simon Guest<br />PDC<br />My blog<br />RealDolmen blogs is running on Azure!<br />
  39. 39. AZUG.BE – Azure User Group Belgium<br />Focus on the Azure Services Platform<br />Community-driven<br />Focus on architecture<br />And development<br />And the business value of Azure<br /><br />
  40. 40. Questions, possibly Answers…<br />?<br />Maarten Balliauw – RealDolmenBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw<br />
  41. 41. © 2008 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 />