750 likes | 858 Views
LightSwitch 2011 with Azure. Andrew Butenko http://andrewbutenko.wordpress.com @ andrew_butenko. Intermediate level. Objectives and Takeaways. Session Objectives You will understand the existing and upcoming capabilities of Microsoft Azure cloud and LightSwitcn 2011
E N D
LightSwitch 2011 with Azure Andrew Butenko http://andrewbutenko.wordpress.com @andrew_butenko Intermediate level
Objectives and Takeaways Session Objectives • You will understand the existing and upcoming capabilities of Microsoft Azure cloud and LightSwitcn 2011 • Know how to choose you architecture blocks • Restrictions • LightSwitcncombined with Azure benefits Goals • Understand at the end the existing and upcoming deployment aspects of Lightswitcn and Azure • Learn how to optimize your design. • Do it as simple as possible
Windows Azure Service Model • A windows Azure application is called a “service” • Definition information • Configuration information • At least one “role” • Roles are like DLLs in the service “process” • Collection of code with an entry point that runs in its own virtual machine • Windows Azure compute SLA requires two instances of each role • 99.95$ for connectivity to two instances • Achieved with update and fault domain Data Centre’s Node Virtual Machine Windows Azure Roles
Multi-Instance approach • Automated, consistent application update • Automated, consistent configuration changes • Multi-instant management • Scale out • High availability • Automated, consistent OS security
Application Security • Session Management • Cryptography • Parameter Manipulation • Exception Management • Auditing and Logging • Input Validation • Authentication • Configuration Management • Sensitive Data
AppFabric Access Control Service • Provides rules-driven, claim-based authorization • Web application • REST Web service • SOAP Web service • Key features • Broad identity providers support • AD Federation Services v2.0 • Live ID, Facebook, Google, Yahoo • Private Identity Store • WS-Trust and WS-Federation protocol support • Full integration with Windows Identity Foundation (WIF) • Configurable through new management web portal
Access to data Transfer: • BCP • SSIS • SQL Azure Migration Wizard • SQL Server Migration Assistant Connect: • Windows Azure Connect (*) • Windows Azure AppFabric Access Control Service (ACS)
Windows Azure Queues • Provide reliable message delivery • Simple, asynchronous work dispatch • Programming semantics ensure that a message can be processed at least once • Queues are highly available, durable and performance efficient • Maximum size is 64K • FIFO in general, but not guaranteed (compare with SQL Broker and MSMQ) • Pulling an item from the queue doesn’t delete it • It becomes invisible for a visibility timeout • Item must be deleted before timeout or else it becomes visible
Deployment • VS publishing • Deploy DB wizard • PowerShell
PowerShell Tasks • Deploy new hosted services • Upgrade services. Swap VIP between staging and production. • Remove Hosted Services .Automatically stop services and stop the billing cycle. • Manage Storage Accounts. Retrieve or recreate storage keys • Manage Certificates. Deploy certificates • Configure Diagnostics. Configure event sources to monitor (Event Logs, Tracing, IIS Logs and Performance Counters) • Transfer Diagnostic Information. Schedule diagnostics transfers or have them execute on demand. New-Deployment -serviceName <servicename> -subscriptionId <subscriptionid> -certificate <certificate> -slot staging -package <packagefile> -configuration <configfile> -label <servicelabel> | Get-OperationStatus –WaitToComplete
Windows Azure changes Feb 2012 Pay-As-You-Go rates: • Windows Azure • Compute • Extra small instance: $0.02 per hour • Small instance (default): $0.12 per hour • Medium instance: $0.24 per hour • Large instance: $0.48 per hour • Extra large instance: $0.96 per hour • Storage • $0.125 per GB stored per month • $0.01 per 10,000 storage transactions • Content Delivery Network (CDN) • $0.12 per GB for data transfers under Zone 1 • $0.19 per GB for data transfers under Zone 2 • $0.01 per 10,000 transactions • Virtual Network • Windows Azure Connect - No charge during CTP • Access Control • $1.99 per 100,000 transactions • Service Bus • $0.10 per 100 relay hours • $0.01 per 10,000 messages • Caching • 128 MB cache for $45.00 • 256 MB cache for $55.00 • 512 MB cache for $75.00 • 1 GB cache for $110.00 • 2 GB cache for $180.00 • 4 GB cache for $325.00
Azure Pricing • What we are paying for? • How to minimize cost? • How to avoid over limiting? • Hidden costs • Extension prices • What is on special? • Current price policy
SQL and Transfer Pricing • SQL Azure • Database Size Price Per Database Per Month 0 to 100 MB Flat $4.995 Greater than 100 MB to 1 GB Flat $9.99 Greater than 1 GB to 10 GB $9.99 for first GB, $3.996 for each additional GB Greater than 10 GB to 50 GB $45.954 for first 10 GB, $1.998 for each additional GB Great than 50 GB to 150 GB $125.874 for first 50 GB, $0.999 for each additional GB • Data Transfers • Zone 1 • $0.12 per GB out • Zone 2 • $0.19 per GB out • All inbound data transfers are at no charge. • 1 Compute hours are calculated based on the number of hours that your application is deployed. Details on different compute sizes are summarized in the table below
Billing • Pay as you go • Pay as you grow • Pay as you here
Ready to cloud? • Check restrictions • Run script directly • Deploy from VS2010/11 • Compare schemas in VS11 SQL Database project
Keep in mind • No *nix/Android/IOs support. Moonlight plans to support SilverLight 4.0 but not 5.0 yet. • Migration LightSwitch project from VS 2010 to VS 11 is not straightforward. • Windows XP is not compatible with VS 11. • LS Extensions in VS 2010/11 and Desktop/Web are different • Excessive memory usage when you debug in VS (memory leaks) • Disable Export to Excel feature to improve performance • Table relationships in VS2010 are not allowed in external datasource (fixed in VS 11). Views are not editable (without PK) • Linqdoes not always pick up external datasource. Use iterators • For security purposes, you can’t buy a certificate mapping to the yourapp.cloudapp.net. Only Microsoft can issue certificates for cloudapp.net, though you can create your own self-signed certificate for development purposes. • Computed fields are not directly available in queries and relationships • No deny, only allow permissions - User.HasPermission()
Development aspects • LightSwitchproject architecture (logical vs physical) • Customisation and extension (grab-and-go) • Logical /physical structure of project (Client, Common, Server) • Relationships(1-1|0; 1|0-*; *-*) • Adding pages with parameters (binary encoding) • Localisation. Display names, Money symbols, Languages • Accessing security data (from API or external datasource) • Desktop (works good) -> Web (partially) -> Azure (does not work) • Validation (check input data, prevent big pictures, etc) • Audit, exception handling • Permissions as an application security blocks, User.HasPermission() • Screen navigation
Demo1 • LS application anatomy