Porting ASP.NET applications to Windows Azure

Post on 27-Jan-2015

118 views 0 download

Tags:

description

Hosting applications on Windows Azure is simple but there are things to change when cloud-enabling existing web applications because cloud is conceptually different than on-premises or shared hosting environment. This sessions goes through main issues one will face when moving applications to cloud. Real-life examples provide elegant solutions to problems and through demos the audience will see how to deploy applications to cloud and how to test and run cloud and hybrid applications on your development machine.

Transcript of Porting ASP.NET applications to Windows Azure

Porting ASP.NET applications to Windows AzureGunnar PeipmanASP.NET/IIS MVP

About me

• Name: Gunnar Peipman • Job: Chief Everything Officer• Company: Peipman Consult • Hobbies: Coding, reading,

travelling, cooking, beers, heavy metal music

• MS: ASP.NET MVP (since 2008)

• Community: ENETA• Blog: gunnarpeipman.com • E-mail:

me@gunnarpeipman.com

Agenda

• Windows Azure services• Problems with classic web applications• Think different• Sample solutions• Demo• Q&A

Windows Azure services

Windows Azure services

Web Sites

Virtual Machines

Mobile Services

Cloud Services SQL DB Storage

Media Services

Service Bus Cache

Application types

• In-premises: we host everything on our servers• Cloud: everything is hosted on Windows Azure• Hybrid: mix of cloud and in-premises

Problems in classic web applications

Local files

• Direct use of local directories to keep files• File system support is hardcoded to application• Not proper use of temporary files• Using folders above web application root

Local database

• Systems of developed and tested using SQL Server on development machine

• Database is located in network but not much test data is available

In-proc and local data

• Session data is kept in server memory• Cache data is kept in server memory• Some shared data is kept in static variables

Think different

Change in mindset

• Your code must work in multi-server environment• There will always be network• Instead of modules there are pluggable

components• Everything can be service

Breaking dependencies

• Most of the work you do is breaking dependencies• While breaking dependencies you make

generalizations• You move to modularized code• You make it easier to test your code

Sample solutions

Generalizing file storage

• Local file system: paths up to 248 chars• Blob Storage: account -> container -> blob• Other services:

o Amazono OneDriveo Google Driveo SharePoint

• Considering all those limits try to get things done

IFileClient interface

IFileClient interface

ILogger interface

ILogger interface

Sessions and cache

• Stop using in-proc session and cache• Use SQL Server or some distributed cache

• Test for performance and monitor traffic• If needed ask session values once per request

Demo: Hybrid applications

Upcoming eventsUXify Bulgaria,  June 7Sessions, training day and more http://uxify.org/

SQLSaturday #311 in October!http://www.sqlsaturday.com/311/

jQuery Bulgaria, November 22http://www.jquerybulgaria.com/

Thanks to our Sponsors:

Global Sponsor:

Gold Sponsors:

Swag Sponsors: Media Partners:

More Global Sponsors:

Silver Sponsors: