Top Banner
Introduction to my Introduction to my Windows Azure Windows Azure Application Application Wallace B. McClure Wallace B. McClure www.scalabledevelopment.com www.scalabledevelopment.com http://www.aspnetpodcast.com http://www.aspnetpodcast.com http://www.morewally.com http://www.morewally.com Twitter: @wbm Twitter: @wbm
40

Introduction to my Windows Azure Application

May 13, 2015

Download

Documents

Sampetruda
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to my Windows Azure Application

Introduction to my Introduction to my Windows Azure Windows Azure ApplicationApplication

Wallace B. McClureWallace B. McClurewww.scalabledevelopment.comwww.scalabledevelopment.comhttp://www.aspnetpodcast.comhttp://www.aspnetpodcast.comhttp://www.morewally.comhttp://www.morewally.comTwitter: @wbmTwitter: @wbm

Page 2: Introduction to my Windows Azure Application

Who the heck am I?Who the heck am I?

““Beginning AJAX with ASP.NET”Beginning AJAX with ASP.NET” ““Beginning ASP.NET 2.0 AJAX”Beginning ASP.NET 2.0 AJAX” ““Professional ASP.NET 3.5 Service Pack Professional ASP.NET 3.5 Service Pack

1”1” ““Building iPhone Apps for the .NET Building iPhone Apps for the .NET

Developer”Developer” MVP – ASP.NET.MVP – ASP.NET. ASPInsider.ASPInsider. ASP.NET Podcast.ASP.NET Podcast. INETA Speaker’s Bureau.INETA Speaker’s Bureau.

Page 3: Introduction to my Windows Azure Application

INETAINETA

International .NET Association.International .NET Association. Approximately 90 NA Speaker’s Approximately 90 NA Speaker’s

Bureau Members.Bureau Members. Regional Speaker’s Bureau.Regional Speaker’s Bureau. Webcasts.Webcasts.

Page 4: Introduction to my Windows Azure Application

Disclaimer:Disclaimer:

Detail look at my application. I’m Detail look at my application. I’m learning everyday.learning everyday.

Overview of additional features Overview of additional features that I think are important.that I think are important.

Most of the code and code ideas Most of the code and code ideas are on my blog or ASP.NET are on my blog or ASP.NET Podcast.Podcast.

My app is changing.My app is changing.

Page 5: Introduction to my Windows Azure Application

(part of) My App(part of) My App

Scheduling tweets.Scheduling tweets. Multiple twitter ids per user id.Multiple twitter ids per user id. User -> TwitterId -> TwitterEntry.User -> TwitterId -> TwitterEntry.

Page 6: Introduction to my Windows Azure Application

What the heck is CC?What the heck is CC?

Applications that provide some or all Applications that provide some or all of their processing through a service of their processing through a service over common http protocols.over common http protocols.

Some ability to use additional Some ability to use additional processing as needed.processing as needed.

Some ability to process data Some ability to process data (events, messages, table data, (events, messages, table data, something) outside of user input.something) outside of user input.

Page 7: Introduction to my Windows Azure Application

What is Windows What is Windows Azure?Azure? Introduced at the Microsoft PDC (October, 2008).Introduced at the Microsoft PDC (October, 2008). Cloud Services Operating Environment from Microsoft.Cloud Services Operating Environment from Microsoft. Scale Out is the key.Scale Out is the key. Web.Web. Data.Data. Internal Processing.Internal Processing. Supports:Supports:

– .NET..NET.– Java.Java.– Ruby.Ruby.– SOAP/REST access.SOAP/REST access.

Page 8: Introduction to my Windows Azure Application

Other offeringsOther offerings

AmazonAmazon– VM based.VM based.– Scale out to multiple VM Servers.Scale out to multiple VM Servers.– Consumable Web services.Consumable Web services.

Google App EngineGoogle App Engine– Similar to Microsoft Azure.Similar to Microsoft Azure.– Java/Python languages.Java/Python languages.

VMWareVMWare

Page 9: Introduction to my Windows Azure Application

What is Azure What is Azure Programmatically?Programmatically? Web Role (Web UI).Web Role (Web UI). Worker Role (similar to a windows Worker Role (similar to a windows

service).service). Storage.Storage.

– Blobs.Blobs.– Data.Data.– Queues. – key to scalability.Queues. – key to scalability.

Page 10: Introduction to my Windows Azure Application

Web Role

AzureStorag

e

Browser

Browser

Browser

Browser

Browser

Web Role

Web Role

N L B

Worker Role

Worker Role

Worker Role

N L B

p1 p2 p3

Page 11: Introduction to my Windows Azure Application

ToolsTools

Develop locally.Develop locally. Visual Studio 2008/2010 Project Visual Studio 2008/2010 Project

Plugin.Plugin. Development Storage.Development Storage. Development Fabric.Development Fabric. Sql Server Express running Sql Server Express running

locally.locally.

Page 12: Introduction to my Windows Azure Application

Services ProvidedServices Provided

Web Applications.Web Applications. Storage – File, Blobs, and Tables.Storage – File, Blobs, and Tables. Queues.Queues. Timed Processing.Timed Processing.

Page 13: Introduction to my Windows Azure Application

Features / Languages Features / Languages SupportedSupported Server Side.Server Side.

– C#.C#.– VB.VB.– PHP.PHP.

Web:Web:– Client side javascript.Client side javascript.– AJAX.AJAX.– WCF.WCF.– Webforms/MVC.Webforms/MVC.

Worker Role.Worker Role.

Page 14: Introduction to my Windows Azure Application

APIsAPIs

REST based.REST based. High level library.High level library. ASP.NET Providers.ASP.NET Providers.

Page 15: Introduction to my Windows Azure Application

DataData

Azure Storage.Azure Storage. Azure Sql.Azure Sql.

Page 16: Introduction to my Windows Azure Application

Azure TablesAzure Tables

Not a standard database.Not a standard database. Class/entity definitions. (key – object)Class/entity definitions. (key – object) Azure Tables are simple.Azure Tables are simple. No relationships.No relationships. Azure SQL for “more” database Azure SQL for “more” database

services.services. NoSql type datastore. NoSql type datastore. Designed for billions of records.Designed for billions of records.

Page 17: Introduction to my Windows Azure Application

Azure SqlAzure Sql

1/10 gigs.1/10 gigs. Ports.Ports. Sql Server in the clouds without:Sql Server in the clouds without:

– FTS.FTS.– CLR.CLR.– Bulk Upload.Bulk Upload.

Page 18: Introduction to my Windows Azure Application

Local vs. HostedLocal vs. Hosted

Local uses Sql Server Express.Local uses Sql Server Express.– Sql Server Manager.Sql Server Manager.– Rows/Columns.Rows/Columns.– Create Tables with the dev tool.Create Tables with the dev tool.

Hosted Azure.Hosted Azure.– Create Tables.Create Tables.– Objects can have different versions.Objects can have different versions.

Page 19: Introduction to my Windows Azure Application

Azure Storage Class Azure Storage Class DefinitionsDefinitions Classes inherit from Classes inherit from

TableStorage.TableStorage. DataServicesDataServices

– CRUD stuff.CRUD stuff.– LINQ-lite.LINQ-lite.– .ToList<T> seems to be everywhere..ToList<T> seems to be everywhere.

Page 20: Introduction to my Windows Azure Application

Indexing StrategiesIndexing Strategies

Not simple.Not simple. PartitionKey / RowKey.PartitionKey / RowKey. No secondary indexing support at this No secondary indexing support at this

time. Support has been announced.time. Support has been announced. Partitions – spread out data and Partitions – spread out data and

processing.processing. Partitions/RowKeys are a good place Partitions/RowKeys are a good place

to put indexes.to put indexes.

Page 21: Introduction to my Windows Azure Application

Changing data schemaChanging data schema

What is a schema in Azure vs. Sql What is a schema in Azure vs. Sql Server?Server?– Not fixed.Not fixed.– XML.XML.

How do you handle changes?How do you handle changes?– Old objects.Old objects.– Code.Code.

Page 22: Introduction to my Windows Azure Application

How do you handle How do you handle Relationships?Relationships? Natural Keys?Natural Keys? Surrogate Keys?Surrogate Keys? No foreign key relationships at No foreign key relationships at

this time.this time.

Page 23: Introduction to my Windows Azure Application

How do you bulk load How do you bulk load data?data? Apps rarely start with no data.Apps rarely start with no data. I wrote a custom app.I wrote a custom app. Mike Amundsen resources online.Mike Amundsen resources online.

Page 24: Introduction to my Windows Azure Application

TransactionsTransactions

Partitions and Table must match.Partitions and Table must match. 100 CUD operations.100 CUD operations. 4megs max size.4megs max size.

Page 25: Introduction to my Windows Azure Application

My data strategyMy data strategy

User – TwitterID – TwitterEntry.User – TwitterID – TwitterEntry. TwitterID - PartitionKey: TwitterID - PartitionKey:

UserName.UserName. TwitterEntry – Partitionkey: TwitterEntry – Partitionkey:

UserName / TwitterID.UserName / TwitterID. Relationships?!?Relationships?!?

– Surrogate Key?Surrogate Key?– Natural Key?Natural Key?

Page 26: Introduction to my Windows Azure Application

Remote DataRemote Data

REST.REST. WSDLWSDL

– Basic Authentication.Basic Authentication.– WS Auth, under certain WS Auth, under certain

circumstances.circumstances.– Painful……………….Painful……………….

Page 27: Introduction to my Windows Azure Application

Examples……..Examples……..

Table Storage.Table Storage. DataData TwtMstr.TwtMstr.

Page 28: Introduction to my Windows Azure Application

QueueingQueueing

Queueing is GOOD! – Key to Queueing is GOOD! – Key to scaling out to multiple worker scaling out to multiple worker roles.roles.

Queue messages are returned to Queue messages are returned to the queue after 30 seconds of not the queue after 30 seconds of not being deleted.being deleted.

Example (not in my app, yet).Example (not in my app, yet).

Page 29: Introduction to my Windows Azure Application

What should your app What should your app have in it?have in it? Globalization / Localization.Globalization / Localization. Services.Services. AJAX.AJAX.

Page 30: Introduction to my Windows Azure Application

DebuggingDebugging

Local app – Local data.Local app – Local data.– Initial development.Initial development.– Visual Studio.Visual Studio.

Local app – Hosted data.Local app – Hosted data.– Visual Studio.Visual Studio.

Hosted app – Hosted data.Hosted app – Hosted data.

Page 31: Introduction to my Windows Azure Application

DeploymentDeployment

Staging.Staging. Production.Production.

Page 32: Introduction to my Windows Azure Application

GotchasGotchas

Changes to data schema.Changes to data schema. Query for a record that does not Query for a record that does not

exist.exist. FullTrust.FullTrust. DateTime.DateTime. Configuring WCF/Membership.Configuring WCF/Membership.

– REST (Silverlight support).REST (Silverlight support).– SOAP/WSDL.SOAP/WSDL.

Page 33: Introduction to my Windows Azure Application

Azure Programming Azure Programming EnvironmentEnvironment ASP.NET 3.5 Service Pack 1.ASP.NET 3.5 Service Pack 1. Approximately medium trust.Approximately medium trust. Web based applications.Web based applications. Client applications can integrate Client applications can integrate

by calling SOAP or REST web by calling SOAP or REST web services.services.

Tools for Visual Studio 2008.Tools for Visual Studio 2008.

Page 34: Introduction to my Windows Azure Application

StatusStatus

REST APIs.REST APIs. StorageClient.StorageClient. ASP.NET Providers.ASP.NET Providers. Table Data.Table Data.

Page 35: Introduction to my Windows Azure Application

I want to take an I want to take an existing app and run it existing app and run it in Azure.in Azure. You can, within limits.You can, within limits. Sql Azure is required.Sql Azure is required.

– Relatively small db.Relatively small db.– No CLR.No CLR.– No FTS.No FTS.

Page 36: Introduction to my Windows Azure Application

What does Azure What does Azure physically look like?physically look like?

Page 37: Introduction to my Windows Azure Application

Pricing / AvailabilityPricing / Availability

November, 2008 – PDC.November, 2008 – PDC. November, 2009 – PDC.November, 2009 – PDC. Pricing is rather complex.Pricing is rather complex.

– Traffic.Traffic.– CPU utilization.CPU utilization.

Page 38: Introduction to my Windows Azure Application

Additional Sources of Additional Sources of InformationInformation Azure Training Kit.Azure Training Kit. AZURE Forums on MSDN.AZURE Forums on MSDN. http://www.windowsazure.com/http://www.windowsazure.com/ http://blogs.msdn.com/http://blogs.msdn.com/ http://www.morewally.com/http://www.morewally.com/ http://www.aspnetpodcast.com/http://www.aspnetpodcast.com/

Page 39: Introduction to my Windows Azure Application

ApplicationApplication

@twtmstr.@twtmstr. http://www.twtmstr.com/.http://www.twtmstr.com/. Sign up for an account and send Sign up for an account and send

me your feedback!me your feedback!

Page 40: Introduction to my Windows Azure Application

http://http://www.scalabledevelopment.comwww.scalabledevelopment.com– Training.Training.– Mentoring.Mentoring.– Business Process Automation.Business Process Automation.– Software Development.Software Development.

Questions/Comments: Questions/Comments: [email protected]@scalabledevelopment.com