Change the Rules



Lap around SQL Azure
      Anko Duizer
Change the Rules

                      Introduction
• Anko Duizer
   – Chief Software Architect
   – Blog: http://www.ankoduizer.nl
   – Twitter: ankoduizer
• TellUs
   –   Lead generation
   –   > 5000 sites
   –   World wide
   –   Microsoft platform
Change the Rules




INTRODUCTION
Change the Rules

   Data platform: device to cloud
                                      RDBMS
              Caching Protection     Load Mining       Sync                      Reporting
Service            Analysis   Query          Integration                          Search
                                    Backup



Type          In           Multi       Relational          XML         File
            Memory         Dim           BLOB




Place
          Mobile/Desktop           Desktop      Server   Mega-server          Data Services
Change the Rules




              Reporting          Business Analytics        Data sync




•   The power of the SQL Data Platform in the cloud

•   Leverages existing skills and rich tooling ecosystem

•   Enables database applications with new, “cloud” capabilities
Change the Rules




  Cloud       Data in the
application
                cloud




              On-premises
               application
Change the Rules

                                                                             Value Props:




Dedicated       Value Props:
                                                                On-premise
    Resources




                                             Hosted
                                                Value Props:


                               SQL Azure        Roll-your-own HA/scale

 Shared
                Low                        Control                             High
Change the Rules




SQL AZURE
Change the Rules

            SQL Azure
• Mangebility
• Scalability
• Developer empowerment
Change the Rules

        Application        Browser        Application
                          application                   ODBC, OLEDB,
        REST Client                       SQL Client*
                                                        ADO.Net PHP,
                                                        Ruby, …


                         Cloud




          HTTP+REST




                            HTTP




                                             TDS
                 Windows Azure
         REST (Astoria)      Web App
         ADO.Net + EF       SQL Client*
Cloud


                      TDS + TSQL Model

                      SQL Azure
Change the Rules



                                            Account
Server=server1.data.database.windows.net
Database=testDB
Login=nigele[@server1] (maps to testuser)
                                            Server


                                            Database
Change the Rules

 Logical vs. Physical administration
• SQL Azure focus on logical administration
  – Schema creation and management
  – Query optimization
  – Security management (Logins, Users, Roles)
• Service handles physical management
  – Automatically replicated with HA “out of box”
  – Transparent failover in case of failure
Change the Rules

                                     Architecture
                      Provisioning (databases, accounts, roles, …, metering, and billing

        Machine 4                                     Machine 5                                  Machine 6
       SQL Instance                                  SQL Instance                               SQL Instance
          SQL DB                                        SQL DB                                     SQL DB
User   User    User       User               User    User    User    User               User    User     User   User
DB1    DB2     DB3        DB4                DB1     DB2     DB3     DB4                DB1     DB2      DB3    DB4




                   scalability and availability: fabric, failover, replication, and load balancing Load balancing
                                          Scalability and Availability: Fabric, Failover, Replication, and
Change the Rules

               Deployment
• Support for basic deployment options
  – SQL scripts work (but not attach database)
• Geo-location of Windows Azure compute
  and SQL Azure databases
• Cloud or on-premise is a deployment time
  choice
Change the Rules

               SQL Azure deployment
         Web Portal
           (API)



 DB                   SQL Azure
Script
                        TDS
Change the Rules

    SQL Azure - Accessing databases
          Web Portal
            (API)



   Your                SQL Azure

   App                   TDS




Change connection string
Change the Rules

Database replicas
            Replica 1



            Replica 2
    DB

            Replica 3
Change the Rules

Database monitoring & recovery
       Web Portal
         (API)




Your
App                         !
                    SQL Azure
                      TDS
Change the Rules

Failure Scenario
                                 Database Backups
                                       Solution                                              When      Responsible Party




  X
                HW and Media           Multiple replicas of all databases with automatic     Today     SQL Azure - Built-in to
                failures               failover. System backups for additional protection              the base service



                                       Use BCP, SSIS or other custom tools to backup data    Today     Customer
Customer application or
administrator errors leading to data   Database clone to create on-demand, backups of
loss                                   databases in the local or remote SQL Azure region
                                         • Cloning is done with transactional consistency    1H 2010   Customer
                                         • When clone operation is complete the replica is
                                           accessible as a normal database
                                       Continuous backup option with point-in-time restore
                                       capabilities                                                    1.   Customer enables
                                                                                                            and configures it.
                                         • Configurable retention and lag period             2H 2010
                                                                                                       2.   Service will
                                         • Backups available for read operations
                                                                                                            maintain it
                                         • Local or remote region
Change the Rules
                   Database clone
 xyz.database.windows.net             efg.database.windows.net
  Master   prod1   Prod2               prod2
                                                  DR1   Master
                                       clone

                   prod2
                   clone


 abc.database.windows.net
                   prod2
  Master   Dev1
                   clone


     South central US                    North central US

CREATE DATABASE efg.prod2clone
                abc.prod2clone
                xyz.prod2clone   AS CLONE OF xyz.prod2
Change the Rules




PROGRAMMING SQL AZURE
Change the Rules

        Programming model
• Small data sets
  – Use a single database
  – Same model as on premise SQL Server
• Large data sets and/or massive throughput
  – Partition data across many databases
  – Use parallel fan-out queries to fetch the data
  – Application code must be partition aware in v1
Change the Rules

          Connection model
• Use existing client libraries
  – ADO.NET, ODBC, PHP
• Client libraries pre-installed in Azure roles
• Support for ASP.NET controls
• Clients connect directly to a database
Change the Rules

            Compatibility goals
•   Support common application patterns
•   Logical/policy based administration
•   Patterns work from SQL Server to SQL Azure
•   Multi-tenancy considerations
    – Throttling
    – Limits on DB size, transaction duration, …
Change the Rules

   Sample of SQL compatibility
v1                           vNext
• Tables, indexes and        • Distributed transactions
  views                      • Distributed query
• Stored procedures          • CLR
• Triggers                   • Service broker
• Constraints                • Spatial
• Table variables,           • Physical server or
  session temp tables (#t)     catalog DDL and views
Change the Rules

             Security model
• Uses regular SQL security model
  – Authenticate logins, map to users and roles
  – Authorize users and roles to SQL objects
• Limited to standard SQL Auth logins
  – Username + password
• Future AD Federation, WLID, etc as alternate
  authentication protocols
Change the Rules




FUTURE
Change the Rules

                  Planned
•   Partitioned databases
•   Spatial data
•   Security AD, WLID, etc
•   Increased database size
Change the Rules

                 Requests…
•   Add support for profiler, DMVs …
•   Full-text search support
•   Change tracking support
•   Support for CLR
•   Cloud based Business Intelligence (BI)
    solutions
Change the Rules




USEFUL?
Change the Rules

                       Scenarios for V1
•   Departmental applications
     – Simple application built by individual or department
     – Need simple deployment, self-management, IT: “Empowerment and governance”
•   Web Applications
     – Small business or startup that uses the cloud as their IT
     – Simple deployment, self-management, scale on demand
•   ISV
     – ISV hosting software on behalf of customer
     – Multi-tenant support for billing and isolation
•   Data hub
     – Sharing and aggregating of data across tiers and across enterprises
     – Centralized place for data, high scale, sync with existing data sources
Change the Rules


Application/
 Browser




App Code




  Azure
Change the Rules

                       Application/
                        Browser




How much                   App Code
   data is
transfered?   On premise




                            Azure
Change the Rules

             Source




              SSIS

On premise




             backup


         Azure
Change the Rules


    Application/
     Browser




    App Code




                   Z
X        Y


     Azure
Change the Rules



                                     Azure
                    Sync framework
                                      Data
         Source                       hub




                                               Sync framework
On-premise/ department




                                      Source



                                     Laptop
Change the Rules




NOT USEFUL!
Change the Rules

                       Application/
                        Browser




 Too much                  App Code
   data
transferred   On premise




                            Azure
Change the Rules



                   SSIS



         On
         premise




Source                    destination

Azure                     Azure
Change the Rules




Is it cheaper?
Change the Rules




•   1GB Database            •   10GB Database
•   $9.99 / month           •   $99.99 / month
•   Bandwidth               •   Bandwidth
     – $0.10 /GB inbound         – $0.10 /GB inbound
     – $0.15 /GB outbound        – $0.15 /GB outbound
Change the Rules




Question?

Lap Around Sql Azure

  • 1.
    Change the Rules Laparound SQL Azure Anko Duizer
  • 2.
    Change the Rules Introduction • Anko Duizer – Chief Software Architect – Blog: http://www.ankoduizer.nl – Twitter: ankoduizer • TellUs – Lead generation – > 5000 sites – World wide – Microsoft platform
  • 3.
  • 4.
    Change the Rules Data platform: device to cloud RDBMS Caching Protection Load Mining Sync Reporting Service Analysis Query Integration Search Backup Type In Multi Relational XML File Memory Dim BLOB Place Mobile/Desktop Desktop Server Mega-server Data Services
  • 5.
    Change the Rules Reporting Business Analytics Data sync • The power of the SQL Data Platform in the cloud • Leverages existing skills and rich tooling ecosystem • Enables database applications with new, “cloud” capabilities
  • 6.
    Change the Rules Cloud Data in the application cloud On-premises application
  • 7.
    Change the Rules Value Props: Dedicated Value Props: On-premise Resources Hosted Value Props: SQL Azure Roll-your-own HA/scale Shared Low Control High
  • 8.
  • 9.
    Change the Rules SQL Azure • Mangebility • Scalability • Developer empowerment
  • 10.
    Change the Rules Application Browser Application application ODBC, OLEDB, REST Client SQL Client* ADO.Net PHP, Ruby, … Cloud HTTP+REST HTTP TDS Windows Azure REST (Astoria) Web App ADO.Net + EF SQL Client* Cloud TDS + TSQL Model SQL Azure
  • 11.
    Change the Rules Account Server=server1.data.database.windows.net Database=testDB Login=nigele[@server1] (maps to testuser) Server Database
  • 12.
    Change the Rules Logical vs. Physical administration • SQL Azure focus on logical administration – Schema creation and management – Query optimization – Security management (Logins, Users, Roles) • Service handles physical management – Automatically replicated with HA “out of box” – Transparent failover in case of failure
  • 13.
    Change the Rules Architecture Provisioning (databases, accounts, roles, …, metering, and billing Machine 4 Machine 5 Machine 6 SQL Instance SQL Instance SQL Instance SQL DB SQL DB SQL DB User User User User User User User User User User User User DB1 DB2 DB3 DB4 DB1 DB2 DB3 DB4 DB1 DB2 DB3 DB4 scalability and availability: fabric, failover, replication, and load balancing Load balancing Scalability and Availability: Fabric, Failover, Replication, and
  • 14.
    Change the Rules Deployment • Support for basic deployment options – SQL scripts work (but not attach database) • Geo-location of Windows Azure compute and SQL Azure databases • Cloud or on-premise is a deployment time choice
  • 15.
    Change the Rules SQL Azure deployment Web Portal (API) DB SQL Azure Script TDS
  • 16.
    Change the Rules SQL Azure - Accessing databases Web Portal (API) Your SQL Azure App TDS Change connection string
  • 17.
    Change the Rules Databasereplicas Replica 1 Replica 2 DB Replica 3
  • 18.
    Change the Rules Databasemonitoring & recovery Web Portal (API) Your App ! SQL Azure TDS
  • 19.
    Change the Rules FailureScenario Database Backups Solution When Responsible Party X HW and Media Multiple replicas of all databases with automatic Today SQL Azure - Built-in to failures failover. System backups for additional protection the base service Use BCP, SSIS or other custom tools to backup data Today Customer Customer application or administrator errors leading to data Database clone to create on-demand, backups of loss databases in the local or remote SQL Azure region • Cloning is done with transactional consistency 1H 2010 Customer • When clone operation is complete the replica is accessible as a normal database Continuous backup option with point-in-time restore capabilities 1. Customer enables and configures it. • Configurable retention and lag period 2H 2010 2. Service will • Backups available for read operations maintain it • Local or remote region
  • 20.
    Change the Rules Database clone xyz.database.windows.net efg.database.windows.net Master prod1 Prod2 prod2 DR1 Master clone prod2 clone abc.database.windows.net prod2 Master Dev1 clone South central US North central US CREATE DATABASE efg.prod2clone abc.prod2clone xyz.prod2clone AS CLONE OF xyz.prod2
  • 21.
  • 22.
    Change the Rules Programming model • Small data sets – Use a single database – Same model as on premise SQL Server • Large data sets and/or massive throughput – Partition data across many databases – Use parallel fan-out queries to fetch the data – Application code must be partition aware in v1
  • 23.
    Change the Rules Connection model • Use existing client libraries – ADO.NET, ODBC, PHP • Client libraries pre-installed in Azure roles • Support for ASP.NET controls • Clients connect directly to a database
  • 24.
    Change the Rules Compatibility goals • Support common application patterns • Logical/policy based administration • Patterns work from SQL Server to SQL Azure • Multi-tenancy considerations – Throttling – Limits on DB size, transaction duration, …
  • 25.
    Change the Rules Sample of SQL compatibility v1 vNext • Tables, indexes and • Distributed transactions views • Distributed query • Stored procedures • CLR • Triggers • Service broker • Constraints • Spatial • Table variables, • Physical server or session temp tables (#t) catalog DDL and views
  • 26.
    Change the Rules Security model • Uses regular SQL security model – Authenticate logins, map to users and roles – Authorize users and roles to SQL objects • Limited to standard SQL Auth logins – Username + password • Future AD Federation, WLID, etc as alternate authentication protocols
  • 27.
  • 28.
    Change the Rules Planned • Partitioned databases • Spatial data • Security AD, WLID, etc • Increased database size
  • 29.
    Change the Rules Requests… • Add support for profiler, DMVs … • Full-text search support • Change tracking support • Support for CLR • Cloud based Business Intelligence (BI) solutions
  • 30.
  • 31.
    Change the Rules Scenarios for V1 • Departmental applications – Simple application built by individual or department – Need simple deployment, self-management, IT: “Empowerment and governance” • Web Applications – Small business or startup that uses the cloud as their IT – Simple deployment, self-management, scale on demand • ISV – ISV hosting software on behalf of customer – Multi-tenant support for billing and isolation • Data hub – Sharing and aggregating of data across tiers and across enterprises – Centralized place for data, high scale, sync with existing data sources
  • 32.
    Change the Rules Application/ Browser App Code Azure
  • 33.
    Change the Rules Application/ Browser How much App Code data is transfered? On premise Azure
  • 34.
    Change the Rules Source SSIS On premise backup Azure
  • 35.
    Change the Rules Application/ Browser App Code Z X Y Azure
  • 36.
    Change the Rules Azure Sync framework Data Source hub Sync framework On-premise/ department Source Laptop
  • 37.
  • 38.
    Change the Rules Application/ Browser Too much App Code data transferred On premise Azure
  • 39.
    Change the Rules SSIS On premise Source destination Azure Azure
  • 40.
  • 41.
    Change the Rules • 1GB Database • 10GB Database • $9.99 / month • $99.99 / month • Bandwidth • Bandwidth – $0.10 /GB inbound – $0.10 /GB inbound – $0.15 /GB outbound – $0.15 /GB outbound
  • 42.