1 / 43

Migrating Business Apps to Windows Azure

Migrating Business Apps to Windows Azure. Marc Müller Principal Consultant, 4tecture Gmb H www.4tecture.ch www.dotnetacademy.ch mmueller@4tecture.ch. Agenda. Short Introduction to Windows Azure Overview Differences to On-Premise Development Migration Strategies

joie
Download Presentation

Migrating Business Apps to Windows Azure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Migrating Business AppstoWindows Azure Marc Müller Principal Consultant, 4tecture GmbH www.4tecture.ch www.dotnetacademy.ch mmueller@4tecture.ch

  2. Agenda Short Introduction to Windows Azure • Overview • Differences to On-Premise Development Migration Strategies • Logic / Frontend / Storage Cloud Computing Topics • Scale Out / Scale up • Architecture / Cost Oriented Architecture Security Role Management Call to Action Questions

  3. Windows Azure What, Cloud is just computers? – differences to on-premise systems

  4. Demo

  5. Definition ofCloud Computing Infrastructure (as a Service) Platform (as a Service) Packaged Software Software (as a Service) Applications Applications Applications Applications You manage Data Data Data Data You manage Runtime Runtime Runtime Runtime Managed by vendor Infrastructure-as-a-Service Middleware Middleware Middleware Middleware “PaaS” “IaaS” “SaaS” Managed by vendor You manage O/S O/S O/S O/S Platform-as-a-Service Software-as-a-Service Virtualization Virtualization Virtualization Virtualization Managed by vendor Image Source: Windows Azure Training Kit consume build host Servers Servers Servers Servers Storage Storage Storage Storage Networking Networking Networking Networking

  6. The transitiontothecloud • Windows Server • Single Instance • Persistent • File System • Network Shares • Windows Security (AD) • Benefits • Automated Updates • Multi-Instance-Management • Scale-Out • High Availability / Failover • Windows Azure • Multi Instance • Stateles OS • Azure Storage • SQL Azure • ACS (AD  ADFS) • Azure Connect / Service Bus

  7. Standard Cloud Tiers Front end: e.g. load-balanced stateless web servers Middle worker tier: e.g. order processing, encoding Backend storage: e.g. SQL tables or files Multiple instances of each for scalability and availability Front-End Windows Azure Storage,SQL Azure Front-End Middle-Tier Load Balancer HTTP/HTTPS Image Source: Windows Azure Training Kit Cloud Application

  8. Top migrationeffortpoints StatefulvsStateless Scheduled Jobs Complex Business Logic in Database File Handling

  9. Migration StrategiesAzureCompute Howtomigrateyourprocessinglogic

  10. WindwosAzureRoles VM Role Worker Role Web Role • “Move” applications to Windows Azure • Full control over OS Image • VHD Image • Designed for long or non-automated installs • Image must be Windos Server 2008 R2 Enterprise • Role is hosted on IIS • HTTP/HTTPS • ASP.NET • Fast CGI + PHP • Role is an executable • Create your own web server, host a database, etc. • Inbound on • Any TCP Port • HTTP/HTTPS

  11. Azure Package and Endpoints Configuration • Service Definition (*.csdef) • Service Configuration (*.cscfg) Deployment Package • Encrypted(Zipped(Code + *.csdef)) • *.cspkg file Deplyoment • (*.cspkg + *.cscfg) Endpoints • Input • Internal • Windows Azure Connect

  12. Startup Tasks Enables short, unattended setups on role startup • Silent MSIs, COM Components, Registry Keys, Configuring Windows Server, etc. Configured in the .csdef Task Type • Simple – System waits for the task to exit • Background – System does not wait for the task to exit • Foreground – Same as background, but blocks role restart until tasks exit <WebRolename=“FabrikamShipping.App.Web"> <Startup> <Taskcommandline="relative\path\ToSetupExecutable" executionContext="limited|elevated" taskType=“simple|foreground|background"/> </Startup> </WebRole>

  13. Workflow (simplified) Defineyour Endpoints DefineRolesand Instance Count Create a deploymentpackage (applicationbinaries) Provide additional InstallersandBinariesfor Startup Tasks Deploy! … but therearesomeimportantpointstoconsider!

  14. Migration StrategiesAzure Storage Howtohanldefiles in thecloud…

  15. Storage Challange Don’tthink in termsof «filesystemaccess» Think RESTful • 4 HTTP Verbs for CRUD • Ressources Localfilesystemshouldbeusedfor «localcache» only Create logicalstoragestorageinterfaces / abstractions CreateAzure Storage adapters in yourapplication

  16. Migrateyourlocalfilesystem Blobs - Simple named files along with metadata for the file • Two level hierarchy – container / file • Security on container / file – policy or signature • Two Types • Block BLOB (streaming workload [“file”], blocks, max 200GB) • Page BLOB (random read / write, pages, max 1TB) Drives - Durable NTFS volumes • Page BLOB formatted as a NTFS single volume VHD • one instance read/write, read-only snapshot for multiple instances • Drive API, not REST Calls – NTFS API for read/write

  17. Access BLOB Files RESTful URL Can include ‘/‘ or other delimeterin name • e.g. /<container>/f1/blob1.jpg • e.g. /<container>/f1/blob2.jpg • http://.../<container>?comp=list&prefix=f1&delimiter=/  f1/blob1.jpg, f1/blob2.jpg Image Source: Windows Azure Training Kit

  18. BLOB Security Client Control the access to your files Fine grain access rights to blobs and containers Sign URL with storage key – permit elevated rights Revocation • Use short time periods and re-issue • Use container level policy that can be deleted Two broad approaches • Ad-hoc • Policy based Create Shared Access Keys by • Tool • API Request Shared Access Key URL Signed URL Web App Blob Storage

  19. Demo

  20. Tools Windows Azure Storage Explorer http://azurestorageexplorer.codeplex.com

  21. New Concepts Azure Table Storage • Not a RDBMS! • TablesandEntities • CRUD • NofixedSchema (exceptPartition Key, RowKey, Timestamp) • Upto 255 properties per Entitytype (standard .NET Types) Azure Queue Storage • Usedforinstancesynchronization • Messages (max. 8kb) • ReliableDelivery / Poisonous Message detection Image Source: Windows Azure Training Kit

  22. Migration StrategiesDatabase SQL Database in thecloud

  23. SQL Azure • SQL Server Engine • Sharedinfrastructure • Request routing, security, isolation • Scalable / high availability • Automaticreplicationandfailover • Working with SQL Azure • TDS Protocol (Firewall rules!) • Useexistingclintlibraries: ADO.NT, ODBC, PHP, … • Cannotswitchbetween DBs (no USE command) • Only SSL connectionsaresupported (encrypt = true) • Standard SQL Auth Logins (username + password)

  24. Challenge SQL Azurefocusses on logicaladministration Schema creationandmanagement Query optimization Securiymanagement Nophysicalmanagementneeded / possible Restrictions Not supported: Sparse Columns, Filestreams, Partitions, Full-Text-indexes, SQL-CLR Tablesrequireclusteredindexes New features SQL AzureFederations

  25. How do I migratemydatabase? TSQL Management Studio – Script databaseas… Size restrictions (data)!  use BCP TSQL with BCP (BulkCopy Utility) SQL Azure Migration Wizard (http://sqlazuremw.codeplex.com) SQL AzureFederation Data Migration Wizard (http://sqlazurefedmw.codeplex.com) SQL Server Data-Tier Applications (DAC) DACPAC / BACPAC Sync Framework 2.1

  26. How do I backupbydatabase? Import / Export (DAC) Not transactionalconsistent!  create a copyfirst! CREATE DATABASE destination_database_name AS COPY OF [source_server_name.]source_database_name Nojobscheduler! Syncwith on-premisedatabase SQL AzureDatasync Fullbackupfunctionality on on-premisedatabase BCP (bulkcopyutility) bcp AdventureWorksLTAZ2008R2.SalesLT.Customer out C:\Users\user\Documents\GetDataFromSQLAzure.txt -c -U username@servername -S tcp:servername.database.windows.net -P password SQL Azure Backup Tools Quest Spotlight for SQL Azure, Enzo Backup for SQL Azure, Redgate SQL Azure Backup Tool, SQLAzureBackup

  27. Restriction Workarounds Job Scheduler Use an on-premisedatabase (sync) andrunthejobslocally On-premisejobschedulerwithconnectionto SQL Azure (TSQL) Local SQL Server Integration Services withconnectiontocloud Use an Azure Worker Rolewith a scheduler Full Text Search Lucene.net Unique identifierClustered Indexes NEWSEQUANTIALID() ist not supported! Don’tuseuniqueidentifiersforclusteredindexesor providecustomindexgenerator (App Tier)

  28. Migration StrategiesCloud Features Design yourapplicationforthecloud!

  29. Scale-Out Architecture The Internet The Internet via TCP or HTTP Tables LB LB LB Storage Queues Web Site (ASPX, ASMX, WCF) Worker Service Web Site (ASPX, ASMX, WCF) Worker Service Web Role IIS as Host Worker Role Managed Interface Call Image Source: Windows Azure Training Kit Blobs Windows Azure Data Center

  30. Scale-Out Architecture Intelligent Network Load Balancer Network Activation Stateless Web and/or Application Servers Stateless ‘Worker’ Machines Async Activation State Tier Queues Key/ValueDatastores Partitioned RDBMS Blob Storage

  31. Role Patterns Worker Role • Web Role • IIS Web Application / Web Farm • Worker Role • Queue Polling Worker • Poll and Pop Messages (i.e. map/reduce pattern) • Listening Worker Role • TcpListener / WCF (i.e. run a .NET SMTP) • External Process Worker Role • Start process from application or startup task • E.g. Run a database server, web server, distributed cache • Web / Worker Hybrid Role • Web Application and Background Worker in same Instance Web Role Hybrid Role

  32. AsynchronousProgramming Usequeuemessagesfortasks A messageshouldbesmall, use BLOB or Table storageforthepayload Storage Web Role Worker Role Web Role Worker Role Worker Role Worker Role Blob Container LB LB Queue Table

  33. MapReduce Images Processedin Worker Instances Slices Pulled from Blob Storage Final ImageSaved as BLOBReady for Use Processed Slices Pushed Back to Blob Storage Image Uploaded Reduce Worker Role Upload Web Role SlicesSaved ToBlob Storage Image Split Splits ReducedBack to Full Image Map Worker Role

  34. Queue Best Practices Ensurethat messagesareidempotent [f(x) = f(f(x))] andhavea compensationmechanism youimplementpoisondetection To do so, youhaveto • Check the «dequeuecount» of a message • Use Transaction with Rollback / Comit • Use an Action-Log torecover last state • Move poisonousmessageto a separate queueordeletethem

  35. Data Partitioning Whyshouldwepartitionthedata? Data volume (too large) Work load (toomanytransactions) Costs (COA – CostOrientedArchitecture) Elasticity (JIT Partitioningduring high loadperiods) Horizontal Partitioning: VerticalPartitioning:

  36. Migration StrategiesSecurity Howtoauthenticate in yourcloudapplication

  37. Authentication & Authorization Security Token Trust • We do not wantto • implementanothersecuritysystem • integratethecloudserverintoourdomain • Wewantto • integrateintoourexistingsecuritysystem (AD) • integratepartnersandcustomers • use open an flexible standards Integrate in company’s AD

  38. Migration StrategiesRole Management Scale Out / ScaleUp

  39. Cloud Computing Patterns Optimizeyourinstanceusage Save money Haveresponsiveapps Manage Instances Manuallythroughmanagementportal Manuellythroughmanagementservice Automatically • Tracdiagnosticinformation • Modify instancecountautomatically • (i.e. EntLib 5 Autoscaling Block)

  40. Let’sgetstarted MSDN Benefits

  41. MSDN Benefits http://www.windowsazure.com/en-us/pricing/member-offers/msdn-benefits/

  42. Special Training Offer http://www.4tecture.ch/Media/Default/Flyer/AzureQuickstartFlyer.pdf

  43. Questions?

More Related