Presentation is loading. Please wait.

Presentation is loading. Please wait.

Move a «classical» asp.net application from on premise to the Cloud, on the Windows Azure Platform. – And understand the benefits of this step.

Similar presentations


Presentation on theme: "Move a «classical» asp.net application from on premise to the Cloud, on the Windows Azure Platform. – And understand the benefits of this step."— Presentation transcript:

1

2 Move a «classical» asp.net application from on premise to the Cloud, on the Windows Azure Platform. – And understand the benefits of this step.

3 Storage Server HW Networking Servers Virtualization Your Provider You manage a smart way of hosting applications and data.

4 Platform as a Service Platform as a Service Storage Server HW Networking Servers Databases Virtualization Runtimes Applications Security & Integration Microsoft You manage a smart way of hosting applications and data.

5 Platform as a Service Platform as a Service Storage Server HW Networking Servers Databases Virtualization Runtimes Applications Security & Integration Microsoft You manage a smart way of hosting applications and data. ComputeStorageManagem ent Relational dataConnectivityAccess control

6 High availability by design Data stored in 3 (geo-)redundant copies 24 x 7, 99.9% reliability Scalability by design Elastic Acquisition (and release) of resources on demand Pay for what you consume (or subscribe) Familiar tools & technologies Staging environment (with instantaneous switch)

7 0 – Setting the stage Web AppSQL DB

8

9 Microsoft® SQL Azure™ Database is a cloud-based relational database service built on SQL Server ® technologies.

10 No physical administration Automatic high availability and fault tolerance Elastic: Easy to provision, deploy, and scale databases up or down based on business needs

11 No physical administration Automatic high availability and fault tolerance Elastic: Easy to provision, deploy, and scale databases up or down based on business needs SQL Azure TDS SQL Azure TDS Your App Connection String Replica 1 Replica 2 Replica 3 DB Single DatabaseMultiple Replicas

12 No physical administration Automatic high availability and fault tolerance Elastic: Easy to provision, deploy, and scale databases up or down based on business needs

13 SQL Server 2008 R2 November CTP Management Studio

14 1 – Move to SQL Azure Web App SQL Azure

15

16 Windows Azure™ is a cloud operating system that provides developers with on-demand compute and storage to host, scale, and manage web applications on the internet through Microsoft® datacenters.

17 AUTOMATED APPLICATION MANAGEMENT AND CONTROL Fabric: The collection of servers 8 VMs per server Each VM runs customized Hypervisor Windows Server 2008 Fabric Controller performs service management You tell it what to do— it figures out how Automatically scale up, scale down, update or roll application back to a previous version Fabric Controler Fabric Controler

18 MASSIVE SCALABILITY Scale “out” – not up – by replicating worker instances as needed. Allow applications to scale user and compute processing independently. Two instance types: Web Role & Worker Role Windows Azure applications are built with web role instances, worker role instances, or a combination of both. Each instance runs on its own VM (virtual machine), replicated as needed

19 Scalable, Scalable, Scalable Easy & fast deployment (and retirement) Self-healing, always up-to-date, performance optimized platform.

20 Visual Studio 2008 or 2010 Windows Azure Tools for Microsoft Visual Studio Free download Works with Visual Web Developer Express 2008 & 2010 Requires IIS7 w. ASP.NET Application Development components installed Development Fabric Development Storage

21 2 – Move to Windows Azure Web Role SQL Azure Web Role Development Fabric & Storage

22

23

24 BlobContainerAccount myaccount images Picture1.jpg Picture2.jpg videos Video1.avi http://.blob.core.windows.net/ / REST and.NET Client Libraries* *Microsoft.WindowsAzure.StorageClient namespace  Windows Azure Managed Library ReferenceWindows Azure Managed Library Reference

25 3 – Use of Blob Storage SQL Azure Web Role Development Fabric & Storage Blob

26 WEB ROLE WORKER ROLE Similar to a Web Page Handles incoming HTTP/HTTPS requests Develop with Microsoft and non-Microsoft tools: ASP.NET, WCF, other.NET tools Java, PHP, etc. Similar to a "batch job" or Windows service Initiates their own requests for data or tasks from the queue Can listen for non http/https Incoming traffic (f.i. smtp)

27 public class WorkerRole : RoleEntryPoint { public override void Run() { // This is a sample worker implementation. Replace with your logic. Trace.WriteLine("WorkerRole1 entry point called", "Information"); while (true) { YOUR LOGIC! Thread.Sleep(10000); Trace.WriteLine("Working", "Information"); } public override bool OnStart() { // Set the maximum number of concurrent connections ServicePointManager.DefaultConnectionLimit = 12; DiagnosticMonitor.Start("DiagnosticsConnectionString"); // For information on handling configuration changes // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357. RoleEnvironment.Changing += RoleEnvironmentChanging; YOUR INITIALILZATION, f.i. to initialize storage access return base.OnStart(); }

28 Loosely Coupled Workflow - Enables workflow between roles Load work in a queue Producer can forget about message once it is in queue Many workers consume the queue Azure Queue Web Role Worker Role

29 SQL Azure Web Role Development Fabric & Storage Worker Role Queue Blob 4 – Use of Worker Role (and Queue)

30 EntityTableAccount myaccount Provides Massively Scalable Structured Storage Table can have billions of entities (rows) and TBs of data customers Name =… Email = … Name =… Email = … Name =… Email = … Name =… Email = … pictures Picture ID =… Date = … Picture ID =… Date = … Picture ID =… Date = … Picture ID =… Date = …

31 Each entity can have up to 255 properties Mandatory Properties for every entity PartitionKey & RowKey Uniquely identifies an entity Defines the sort order Timestamp Optimistic Concurrency No fixed schema for rest of properties Each property is stored as a pair No schema stored for a table Properties can be the standard.NET types String, binary, bool, DateTime, GUID, int, int64, and double

32 Entity Locality Entities in the same partition will be stored together Efficient querying and cache locality Entity Group Transactions Atomically perform multiple Insert/Update/Delete over entities in same partition in a single transaction Table Scalability We monitor the usage patterns of partitions A partition contains all entities in a Table with the same partition key value Automatically load balance partitions Each partition can be served by a different storage node Scale to meet the traffic needs of your table

33 Table Services are really good for highly efficiently storing and retrieving large amount of structured (not relational) data.

34 ActivityEntry public class ActivityEntry : Microsoft.WindowsAzure.StorageClient.TableServiceEntity { public ActivityEntry() { PartitionKey = DateTime.UtcNow.ToString("yyyy-MM"); RowKey = string.Format("{0:10}_{1}", DateTime.MaxValue.Ticks – DateTime.Now.Ticks, Guid.NewGuid()); } public string Sport { get; set; } public string StartTime { get; set; } public string LapStartTime { get; set; } public string LapTotalTime { get; set; } public string LapDistance { get; set; } public string LapMaximumSpeed { get; set; } public string PointTime { get; set; } public DateTime PointTimeDT { get; set; } public string PointLatitude { get; set; } public string PointLongitude { get; set; } public string PointDistance { get; set; } public string PointAltitude { get; set; } } ActivityDataContext public class ActivityDataContext : TableServiceContext { public static void CreateActivityTable() { CloudStorageAccount storageAccount = new ConnectionManager().GetStorageAccount(); CloudTableClient.CreateTablesFromModel( typeof(ActivityDataContext), storageAccount.TableEndpoint.AbsoluteUri, storageAccount.Credentials); } public ActivityDataContext(string baseAddress, StorageCredentials credentials) : base(baseAddress, credentials) { } public IQueryable ActivityEntry { get { return this.CreateQuery ("ActivityEntry"); } Microsoft.WindowsAzure.StorageClient namespace  Windows Azure Managed Library ReferenceWindows Azure Managed Library Reference

35 ActivityEntry public class ActivityEntry : Microsoft.WindowsAzure.StorageClient.TableServiceEntity { public ActivityEntry() { PartitionKey = DateTime.UtcNow.ToString("yyyy-MM"); RowKey = string.Format("{0:10}_{1}", DateTime.MaxValue.Ticks – DateTime.Now.Ticks, Guid.NewGuid()); } public string Sport { get; set; } public string StartTime { get; set; } public string LapStartTime { get; set; } public string LapTotalTime { get; set; } public string LapDistance { get; set; } public string LapMaximumSpeed { get; set; } public string PointTime { get; set; } public DateTime PointTimeDT { get; set; } public string PointLatitude { get; set; } public string PointLongitude { get; set; } public string PointDistance { get; set; } public string PointAltitude { get; set; } } ActivityEntryDataSource public class ActivityEntryDataSource { private ActivityDataContext context = null; public ActivityEntryDataSource() { CloudStorageAccount storageAccount = new ConnectionManager().GetStorageAccount(); this.context = new ActivityDataContext(storageAccount. TableEndpoint.AbsoluteUri, storageAccount.Credentials); this.context.RetryPolicy = RetryPolicies.Retry(3, TimeSpan.FromSeconds(1)); } public List Select() { List results = (from g in this.context.ActivityEntry where g.PartitionKey == DateTime.UtcNow.ToString("yyyy-MM") select g).ToList(); return results; } Microsoft.WindowsAzure.StorageClient namespace  Windows Azure Managed Library ReferenceWindows Azure Managed Library Reference

36 5 – Use of Table Storage SQL Azure Web Role Development Fabric & Storage Worker Role Queue Table Blob

37 "skate to where the puck is going, not to where it has been" www.azure.com

38

39

40 Compute Per Service Hour Starting at Chf 0.132 / service hour + Variable instance sizes Storage Per GB stored & transactions Blob & table Chf 0.165 / GB Storage Access = Chf 0.11 / 100K Transactions Bandwidth Per GB transfer in or out of a datacenter US/EU Bandwidth = Chf 0.11 in / Chf 0.165 out / GB Web Edition Per Service Day 1 GB Database Chf 10.98 / month Business Edition Per Service Day 10 GB Database Chf 109.89 / month

41

42 Virtual Machine - Unit of Compute Defined 1 x 1.6Ghz (moderate IO) 2 x 1.6Ghz (high IO) 4 x 1.6Ghz (high IO) 8 x 1.6Ghz (high IO) Equivalent compute capacity of a 1.6Ghz processor (on 64bit platform) 1.75 GB memory 3.5 GB memory 7.0 GB memory 14 GB memory 250 GB storage (instance storage) 500 GB storage (instance storage) 1000 GB storage (instance storage) 2000 GB (instance storage )

43 You cannot control the physical resources of SQL Azure For example, you cannot specify the physical hard drive or file group where a database or index will reside. Transact-SQL statements with parameters that allows to specify file groups or physical file paths are to be considered partially supported. see Transact-SQL Support (SQL Azure Database)Transact-SQL Support (SQL Azure Database) No Analysis Services, Replication, Reporting Services, and Service Broker. Most data type are supported but: hierarchyid, geography, geometry, and user-defined CLR data types see Data Types (SQL Azure Database)Data Types (SQL Azure Database)


Download ppt "Move a «classical» asp.net application from on premise to the Cloud, on the Windows Azure Platform. – And understand the benefits of this step."

Similar presentations


Ads by Google