SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
mrys@microsoft.com
Social
                                                          Social
                                                       Networks
                                                         Network
                     Management                             s
 Ops                   Services


                                  Data Backend
                                    Data Backend
                                    Services
                                      Data iBackend
                                       Services
                                       S
                                         Services
          MSN
 MSN     Games
Games         l
        Web Portal


                                  Front Door
                      GameBar       Router
          WLM                      Services
 WLM     Games
                        Host
Games   Web P t l
        W b Portal




          Bing
 Bing
    g                   Auth
         Games
         G                           STS
                                      STS
Games         l
        Web Portal


                                  Azure Data Centers
•

•
•
Partitioned over 100 SQL Azure DBs
                                                                                  Find Friends’ Profiles
                                                                Social            Get my Profile
                                                                  Social
                                                               Services
     User     …     DB                                           Service          Publish feed, read feed
                                 Find Friends’ Profiles
                                 Fi d F i d ’ P fil


                                     Get Friends highscores

                                                                Gamer             Last Played
                                                                  Gamer
                                                               Services           Favorites
            STS                                                  Services         Game Preferences
              STS
                             Leaderb                                              Social Leaderboards
                                          …     DB
                               oard

                         Partitioned over 298 SQL Azure DBs         Game
                                                                      Game        Disable/Enable
                                                                  Ingestion       Games from
       Front Door             Write user specific game infos        Ingestion
                                                                                  accessing services
                                                                                          g
         Router
         R t
        Services

                                                                   Game
                                                                                  Game binaries
                              User       …     DB                 Catalog
                                                                                  Game metadata
        250 i
            instances

                         Partitioned over 100 SQL Azure DBs       250 instances
• Fanout: Parallel calls to
   multiple database
   partitions

• Q
  Quorum: Abl t
          Able to
   tolerate a percentage of
   request failures during
   Fanout
   F     t

• Retry: Retry on database
   requests error
Statistics per game
Federation
                                                           Azure DB with Federation Root
 −   Represents the data being sharded
Federation Root
                                                          Federation Directories, Federation Users,
 −   Database that logically houses federations,
     contains federation meta data                        Federation Distributions, …
                                                                     Distributions
Federation Key
 −   Value that determines the routing of a piece
     of data (defines a Federation Distribution)
Federation Member (aka Shard)
                                                           Federation “Orders_Fed”
 −   A physical container f a set of federated
        h i l       t i     for    t ff d t d             (Federation Key: CustomerID)
     tables for a specific key range and reference
     tables
                                                                 Member: PK [min, 100)
Federated Table
 −   Table that contains only atomic units for the             AU           AU           AU
     member s
     member’s key range                                       PK=5         PK=25        PK=35
Reference Table
 −   Non-sharded table
Atomic Unit                                                       Member: PK [100, 488)
 −   All rows with the same federation
     key value: always together!                                AU           AU           AU
                                             Connectio



                                                              PK=105       PK=235       PK=365
                                              Gateway




                                                                 Member: PK [488, max)
                                                     on
                                                     y




                                                                AU          AU            AU
                          Sharded                             PK=555      PK=2545       PK=3565

                         Application                                               17
•
•

•
http://www.microsoft.com/casestudies/Case_Study Detail.aspx?CaseSt
   p //                 /           /         y_         p
udyID=4000008310

                       http://cacm.acm.org/magazines/2011/6/108663-
   scalable-sql
      l bl    l

   http://download.microsoft.com/download/9/E/9/9E9F240D-0EB6-472E-
   B4DE-
   6D9FCBB505DD/Windows%20Azure%20No%20SQL%20White%20Paper.p
   df

   http://blogs.msdn.com/b/cbiyikoglu/archive/2011/03/03/nosql genes in
   http://blogs msdn com/b/cbiyikoglu/archive/2011/03/03/nosql-genes-in-
   sql-azure-federations.aspx

   mrys@microsoft.com
     y

   http://sqlblog.com/blogs/michael_rys/default.aspx
Connection:
     Server=az1cl
                l321.db.wind
                           dows.net;
     Database=MyD
                DB;
     User=AppUser
                r;
     Passwd=****;
                ;



                                    Gatew
                                        way
                                                                                              CREATE FEDERATION
                                                                                 g
                                                                          Existing Database



                                              (customer_id bi i
                                              CREATE FEDERATION sales
                                                        i bigint RANGE)




22
Federation with a Single Shard
                                                     Existing Database
                                                            g

                                                                            CREATE FEDERATION sales
                                                                            (customer_id bigint RANGE)

                                                                            Database root contains:
                                                               sales
                                                                            • Federation root = DB level object 
                                                                              containing federation scheme
                                               way




                                                                            • Federation users
                                           Gatew




                                                                            • Federation metadata incl. federation 
                             Connection:




                                                                              map
                           net;
    er=az1cl321.db.windows.n




                                                         Range: Min...Max
    base=MyDB;
    =AppUser;
    wd=****;
Serve
Datab
User=
Passw




                                                     Federation Member
                                                                                                             23
Introducing Two Connection Modes

 • Filtered Connection
    – Guarantees that any queries or DML will produce the 
      same results independent of changes to the physical 
      layout of the federation members
    –SScoped to an “Atomic Unit”
            d       “A     i U i”
 • Unfiltered Connection
    – Scoped to a Federation Member
    – Management Connection




                                                       24
Create Schema on Member: Management Connection
                                                                              Existing Database
                                                                                     g




                                                                                               sales
                                               way
                                           Gatew
                             Connection:




                                                     USE FEDEDERATION sales (customer_id=0)
                                                     WITH FILTERING=OFF, RESET;
                           net;




                                                         CREATE TABLE …
    er=az1cl321.db.windows.n




                                                                                                       Range: Min...Max


                                                                                  Customer                     Order       Product
    base=MyDB;
    =AppUser;
    wd=****;
Serve
Datab
User=
Passw




                                                                                                       Federation Member
                                                                 © 2011 Microsoft Corporation.   Microsoft Materials 
                                                                      ‐ Confidential.  All rights reserved. CITA #                   25
                                                                                   MSFT101120_A
DDL
 CREATE TABLE customer (
   c_id bigint PRIMARY KEY,
   …
   )
   FEDERATED ON (customer_id=c_id);
                (                )

 CREATE TABLE order (
   item_num int,
   customer_id bigint,
   date_sold datetime2,
   …,
   CONSTRAINT PK_Order PRIMARY KEY (item_num, customer_id, date_sold),
   CONSTRAINT FK_Cust FOREIGN KEY customer_id REFERENCES
   customer (customer id)
            (customer_id)
   )
   FEDERATED ON (customer_id=customer_id);

 CREATE TABLE product (
   product_name varchar(100) NOT NULL,
   unit_price money,
   item_num int PRIMARY KEY,
   …
   );

                                                                         26
More Detail
 •   Supported data types for federation key : bigint, int, GUID,  and varbinary
     Supported data types for federation key : bigint int GUID and varbinary
     (900)
      – Only range partitioning
 •   Federation key must be part of unique index
 •   Foreign key constraints only allowed between federated tables and from 
     federated table to reference table
 •   Not all Azure programmability features supported
      – Sequence timestamp
        Sequence, timestamp
 •   Additional surface area restrictions
      – Indexed views, drop database (members)
 •   Schemas are allowed to diverge over time
                                 g
      – Furthermore, in v1, schema updates to existing members must be done in each 
        member (where the change is needed)
 •   USE FEDERATION “rewires a connection”
      – Connection is reestablished
        Connection is reestablished
      – All existing settings and context of the connection is lost (sp_reset_connection)
      – Must be in a batch by itself



                                                                                            27
Connect to Atomic Unit: Filtered
                                                                        Existing Database
                                                                               g



                                                                                                           When using into a specific key 
                                                                                                           value, SELECT will only return 
                                                                                        sales
                                                                                                           records from federated tables that 
                                                                                                           match that value. It will still return 
                                               way




                                                                                                           all records from non‐federated 
                                           Gatew




                                                                                                           tables.
                             Connection:




                                                     USE FEDEDERATION sales (customer_id=3)                Inserts and UPDATES operating 
                                                     WITH FILTERING=ON, RESET;
                                                                                                           outside of the value will fail.
                           net;
    er=az1cl321.db.windows.n




                                                                                  Range: Min...Max

                                                                        customer        order    product

                                                                                         3
    base=MyDB;




                                                                              3
    =AppUser;




                                             SELECT * from customer
    wd=****;




                                                                                                                   SELECT * from product

                                                        SELECT * from order
Serve
Datab
User=
Passw




                                                                        Federation Member
                                                                                                                                           28
More on Connection Filtering 

 • Most operations behave differently in filtered vs
   unfiltered connections
 • C
   Connection filtering is a property of the session
           ti filt i i             t f th        i
    – Filter injected dynamically at runtime
    – Cannot inspect source code to determine how it behaves
      Cannot inspect source code to determine how it behaves
       • E.g., running stored proc written for filtered mode on unfiltered 
         connection could lead to unintended results
 • There are several operations that will not work in
   There are several operations that will not work in 
   filtered connection in v1
    – DDL, DML on reference tables, …
 • Fan‐out, bulk operations not efficient in filtered mode
    – For now, filter=off is our best offer


                                                                              29
Support Matrix

                    Connection Type Filtered Unfiltered Named 
              Operation                                (unfiltered)
                    Dynamic SELECT 
           DML (federated tables)
           DML* (federated tables) 
           DML* (reference tables)      X
                                 DDL    X
                Views (not indexed) 
                      UDF ‐ activate
              Stored Proc ‐ activate
       Trigger (all modes) ‐ activate
             CREATE/UPDATE Stats
             CREATE/UPDATE Stats        X
   Bulk Ops
        openrowset bulk, bcp, bulk 
                               insert   X




   *  not including SELECT & modules
    ^ autostats will work on all connections
   System stored procs, intrinsics will be unaffected (run unfiltered)


                                                                         30
Splitting a Member
                                                                            Existing Database
                                                                                   g



                                                                                                       ALTER FEDERATION sales
                                                                                                                          l
                                                                                         sales         SPLIT AT (customer_id=50)
                                               way
                                           Gatew




                                                     USE FEDERATION ROOT
                             Connection:




                                                     WITH RESET

                                                     Using to the 
                           net;




                                                     federation ROOT 
    er=az1cl321.db.windows.n




                                                     will pop you out of 
                                                     a member back                 Range: Min...Max
                                                     into the database 
                                                     that hosts the         customer     order    product

                                                     federation                3          3
    base=MyDB;
    =AppUser;
    wd=****;




                                                                              40          58
                                                                              58          58
Serve
Datab
User=
Passw




                                                                            Federation Member
                                                                                                                               31
Two New Members
                                                                               Existing Database
                                                                                      g



                                                                                                       ALTER FEDERATION sales
                                                                                                                          l
                                                                                               sales   SPLIT AT (customer_id=50)
                                               way
                                           Gatew




                                                     USE FEDEDERATION ROOT
                                                     WITH RESET
                             Connection:
                           net;
    er=az1cl321.db.windows.n




                                                                   Range: Min...50                                 Range: 51...Max

                                                            customer     order       product                customer     order       product

                                                                           3
    base=MyDB;




                                                               3
    =AppUser;
    wd=****;




                                                                                                                          58
                                                              40                                              58          58
Serve
Datab
User=
Passw




                                                             Federation Member                              Federation Member
                                                                                                                                         32
Two New Members
                                                                                 Existing Database
                                                                                        g




                                                                                                 sales
                                                 way
                                             Gatew




                                                       USE FEDEDERATION sales (customer_id=40)
                             Connection:




                                                       WITH FILTERING=ON, RESET;
                           net;
    er=az1cl321.db.windows.n




                                                                     Range: Min...50                            Range: 51...Max

                                                              customer     order       product           customer     order       product
    base=MyDB;




                                           SELECT *
    =AppUser;
    wd=****;




                                           from customer                                                               58
                                                                            40
                                                                40                                         58          58

                                                 SELECT * from order
Serve
Datab
User=
Passw




                                                                                                                                      33

Mais conteúdo relacionado

Destaque

Modern database management jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,  Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management jeffrey a. hoffer, mary b. prescott, BlackIce86
 
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your BusinessData-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your BusinessDATAVERSITY
 
Data-Ed Slides: Exorcising the Seven Deadly Data Sins
Data-Ed Slides: Exorcising the Seven Deadly Data SinsData-Ed Slides: Exorcising the Seven Deadly Data Sins
Data-Ed Slides: Exorcising the Seven Deadly Data SinsDATAVERSITY
 
DI&A Slides: Data Insights and Analytics Frameworks
DI&A Slides: Data Insights and Analytics FrameworksDI&A Slides: Data Insights and Analytics Frameworks
DI&A Slides: Data Insights and Analytics FrameworksDATAVERSITY
 
RWDG Slides: Three Approaches to Data Stewardship
RWDG Slides: Three Approaches to Data StewardshipRWDG Slides: Three Approaches to Data Stewardship
RWDG Slides: Three Approaches to Data StewardshipDATAVERSITY
 
Smart Data Slides: Modern AI and Cognitive Computing - Boundaries and Opportu...
Smart Data Slides: Modern AI and Cognitive Computing - Boundaries and Opportu...Smart Data Slides: Modern AI and Cognitive Computing - Boundaries and Opportu...
Smart Data Slides: Modern AI and Cognitive Computing - Boundaries and Opportu...DATAVERSITY
 
LDM Slides: How Data Modeling Fits into an Overall Enterprise Architecture
LDM Slides: How Data Modeling Fits into an Overall Enterprise ArchitectureLDM Slides: How Data Modeling Fits into an Overall Enterprise Architecture
LDM Slides: How Data Modeling Fits into an Overall Enterprise ArchitectureDATAVERSITY
 
DI&A Slides: Data Lake vs. Data Warehouse
DI&A Slides: Data Lake vs. Data WarehouseDI&A Slides: Data Lake vs. Data Warehouse
DI&A Slides: Data Lake vs. Data WarehouseDATAVERSITY
 
RWDG Slides: Using Agile to Justify Data Governance
RWDG Slides: Using Agile to Justify Data GovernanceRWDG Slides: Using Agile to Justify Data Governance
RWDG Slides: Using Agile to Justify Data GovernanceDATAVERSITY
 

Destaque (9)

Modern database management jeffrey a. hoffer, mary b. prescott,
Modern database management   jeffrey a. hoffer, mary b. prescott,  Modern database management   jeffrey a. hoffer, mary b. prescott,
Modern database management jeffrey a. hoffer, mary b. prescott,
 
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your BusinessData-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
 
Data-Ed Slides: Exorcising the Seven Deadly Data Sins
Data-Ed Slides: Exorcising the Seven Deadly Data SinsData-Ed Slides: Exorcising the Seven Deadly Data Sins
Data-Ed Slides: Exorcising the Seven Deadly Data Sins
 
DI&A Slides: Data Insights and Analytics Frameworks
DI&A Slides: Data Insights and Analytics FrameworksDI&A Slides: Data Insights and Analytics Frameworks
DI&A Slides: Data Insights and Analytics Frameworks
 
RWDG Slides: Three Approaches to Data Stewardship
RWDG Slides: Three Approaches to Data StewardshipRWDG Slides: Three Approaches to Data Stewardship
RWDG Slides: Three Approaches to Data Stewardship
 
Smart Data Slides: Modern AI and Cognitive Computing - Boundaries and Opportu...
Smart Data Slides: Modern AI and Cognitive Computing - Boundaries and Opportu...Smart Data Slides: Modern AI and Cognitive Computing - Boundaries and Opportu...
Smart Data Slides: Modern AI and Cognitive Computing - Boundaries and Opportu...
 
LDM Slides: How Data Modeling Fits into an Overall Enterprise Architecture
LDM Slides: How Data Modeling Fits into an Overall Enterprise ArchitectureLDM Slides: How Data Modeling Fits into an Overall Enterprise Architecture
LDM Slides: How Data Modeling Fits into an Overall Enterprise Architecture
 
DI&A Slides: Data Lake vs. Data Warehouse
DI&A Slides: Data Lake vs. Data WarehouseDI&A Slides: Data Lake vs. Data Warehouse
DI&A Slides: Data Lake vs. Data Warehouse
 
RWDG Slides: Using Agile to Justify Data Governance
RWDG Slides: Using Agile to Justify Data GovernanceRWDG Slides: Using Agile to Justify Data Governance
RWDG Slides: Using Agile to Justify Data Governance
 

Semelhante a Building Applications Using NoSQL Architectures on top of SQL Azure: How MSN Casual Games Scales-Out

SQLBits X Scaling out with SQL Azure Federations
SQLBits X Scaling out with SQL Azure FederationsSQLBits X Scaling out with SQL Azure Federations
SQLBits X Scaling out with SQL Azure FederationsMichael Rys
 
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo ThaiOGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo ThaiBuff Nguyen
 
A Practical Architecture Design for MMO Casual Game
A Practical Architecture Design for MMO Casual GameA Practical Architecture Design for MMO Casual Game
A Practical Architecture Design for MMO Casual Gameaction.vn
 
PKI in today's landscape (Mauritius - Siddick)
PKI in today's landscape (Mauritius - Siddick)PKI in today's landscape (Mauritius - Siddick)
PKI in today's landscape (Mauritius - Siddick)Siddick Elaheebocus
 
Take the spaghetti out of windows azure – an insight for it pro techies part 1
Take the spaghetti out of windows azure – an insight for it pro techies part 1Take the spaghetti out of windows azure – an insight for it pro techies part 1
Take the spaghetti out of windows azure – an insight for it pro techies part 1Microsoft TechNet - Belgium and Luxembourg
 
Clojure at BackType
Clojure at BackTypeClojure at BackType
Clojure at BackTypenathanmarz
 
Xldb2011 tue 1005_linked_in
Xldb2011 tue 1005_linked_inXldb2011 tue 1005_linked_in
Xldb2011 tue 1005_linked_inliqiang xu
 
Arquitectura dos Serviços da plataforma Windows Azure
Arquitectura dos Serviços da plataforma Windows AzureArquitectura dos Serviços da plataforma Windows Azure
Arquitectura dos Serviços da plataforma Windows AzureComunidade NetPonto
 
Databases for Storage Engineers
Databases for Storage EngineersDatabases for Storage Engineers
Databases for Storage EngineersThomas Kejser
 
Sql azure federations
Sql azure federations Sql azure federations
Sql azure federations Pavel Tsukanov
 
[NetPonto] Arquitectura dos Serviços da plataforma Windows Azure
[NetPonto] Arquitectura dos Serviços da plataforma Windows Azure[NetPonto] Arquitectura dos Serviços da plataforma Windows Azure
[NetPonto] Arquitectura dos Serviços da plataforma Windows AzureVitor Tomaz
 
NYC Amazon Web Services Meetup: How Glue uses AWS
NYC Amazon Web Services Meetup: How Glue uses AWSNYC Amazon Web Services Meetup: How Glue uses AWS
NYC Amazon Web Services Meetup: How Glue uses AWSAlex Iskold
 
Identity management
Identity managementIdentity management
Identity managementkamalikamj
 
GMG203 Meteor Entertainment’s Lessons Learned and Best Practices for Game Dev...
GMG203 Meteor Entertainment’s Lessons Learned and Best Practices for Game Dev...GMG203 Meteor Entertainment’s Lessons Learned and Best Practices for Game Dev...
GMG203 Meteor Entertainment’s Lessons Learned and Best Practices for Game Dev...Amazon Web Services
 
Integration SharePoint 2010 with CRM 2010 by Mai Omar Desouki
Integration SharePoint 2010 with CRM 2010 by Mai Omar DesoukiIntegration SharePoint 2010 with CRM 2010 by Mai Omar Desouki
Integration SharePoint 2010 with CRM 2010 by Mai Omar DesoukiMai Omar Desouki
 
End-to-End Integrated Management with System Center 2012
End-to-End Integrated Management with System Center 2012End-to-End Integrated Management with System Center 2012
End-to-End Integrated Management with System Center 2012wwwally
 
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)Spiffy
 
[AzurePT] Desenvolvimento para o Windows Azure: Diferença para o developer
[AzurePT] Desenvolvimento para o Windows Azure: Diferença para o developer[AzurePT] Desenvolvimento para o Windows Azure: Diferença para o developer
[AzurePT] Desenvolvimento para o Windows Azure: Diferença para o developerVitor Tomaz
 

Semelhante a Building Applications Using NoSQL Architectures on top of SQL Azure: How MSN Casual Games Scales-Out (20)

SQLBits X Scaling out with SQL Azure Federations
SQLBits X Scaling out with SQL Azure FederationsSQLBits X Scaling out with SQL Azure Federations
SQLBits X Scaling out with SQL Azure Federations
 
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo ThaiOGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
 
A Practical Architecture Design for MMO Casual Game
A Practical Architecture Design for MMO Casual GameA Practical Architecture Design for MMO Casual Game
A Practical Architecture Design for MMO Casual Game
 
PKI in today's landscape (Mauritius - Siddick)
PKI in today's landscape (Mauritius - Siddick)PKI in today's landscape (Mauritius - Siddick)
PKI in today's landscape (Mauritius - Siddick)
 
Take the spaghetti out of windows azure – an insight for it pro techies part 1
Take the spaghetti out of windows azure – an insight for it pro techies part 1Take the spaghetti out of windows azure – an insight for it pro techies part 1
Take the spaghetti out of windows azure – an insight for it pro techies part 1
 
Clojure at BackType
Clojure at BackTypeClojure at BackType
Clojure at BackType
 
Xldb2011 tue 1005_linked_in
Xldb2011 tue 1005_linked_inXldb2011 tue 1005_linked_in
Xldb2011 tue 1005_linked_in
 
Arquitectura dos Serviços da plataforma Windows Azure
Arquitectura dos Serviços da plataforma Windows AzureArquitectura dos Serviços da plataforma Windows Azure
Arquitectura dos Serviços da plataforma Windows Azure
 
Databases for Storage Engineers
Databases for Storage EngineersDatabases for Storage Engineers
Databases for Storage Engineers
 
Sql azure federations
Sql azure federations Sql azure federations
Sql azure federations
 
[NetPonto] Arquitectura dos Serviços da plataforma Windows Azure
[NetPonto] Arquitectura dos Serviços da plataforma Windows Azure[NetPonto] Arquitectura dos Serviços da plataforma Windows Azure
[NetPonto] Arquitectura dos Serviços da plataforma Windows Azure
 
Introduction to AWS tools
Introduction to AWS toolsIntroduction to AWS tools
Introduction to AWS tools
 
NYC Amazon Web Services Meetup: How Glue uses AWS
NYC Amazon Web Services Meetup: How Glue uses AWSNYC Amazon Web Services Meetup: How Glue uses AWS
NYC Amazon Web Services Meetup: How Glue uses AWS
 
Identity management
Identity managementIdentity management
Identity management
 
Architecting Multi-Org Solutions
Architecting Multi-Org SolutionsArchitecting Multi-Org Solutions
Architecting Multi-Org Solutions
 
GMG203 Meteor Entertainment’s Lessons Learned and Best Practices for Game Dev...
GMG203 Meteor Entertainment’s Lessons Learned and Best Practices for Game Dev...GMG203 Meteor Entertainment’s Lessons Learned and Best Practices for Game Dev...
GMG203 Meteor Entertainment’s Lessons Learned and Best Practices for Game Dev...
 
Integration SharePoint 2010 with CRM 2010 by Mai Omar Desouki
Integration SharePoint 2010 with CRM 2010 by Mai Omar DesoukiIntegration SharePoint 2010 with CRM 2010 by Mai Omar Desouki
Integration SharePoint 2010 with CRM 2010 by Mai Omar Desouki
 
End-to-End Integrated Management with System Center 2012
End-to-End Integrated Management with System Center 2012End-to-End Integrated Management with System Center 2012
End-to-End Integrated Management with System Center 2012
 
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
 
[AzurePT] Desenvolvimento para o Windows Azure: Diferença para o developer
[AzurePT] Desenvolvimento para o Windows Azure: Diferença para o developer[AzurePT] Desenvolvimento para o Windows Azure: Diferença para o developer
[AzurePT] Desenvolvimento para o Windows Azure: Diferença para o developer
 

Mais de DATAVERSITY

Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...DATAVERSITY
 
Data at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and GovernanceData at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and GovernanceDATAVERSITY
 
Exploring Levels of Data Literacy
Exploring Levels of Data LiteracyExploring Levels of Data Literacy
Exploring Levels of Data LiteracyDATAVERSITY
 
Building a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business GoalsBuilding a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business GoalsDATAVERSITY
 
Make Data Work for You
Make Data Work for YouMake Data Work for You
Make Data Work for YouDATAVERSITY
 
Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?DATAVERSITY
 
Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?DATAVERSITY
 
Data Modeling Fundamentals
Data Modeling FundamentalsData Modeling Fundamentals
Data Modeling FundamentalsDATAVERSITY
 
Showing ROI for Your Analytic Project
Showing ROI for Your Analytic ProjectShowing ROI for Your Analytic Project
Showing ROI for Your Analytic ProjectDATAVERSITY
 
How a Semantic Layer Makes Data Mesh Work at Scale
How a Semantic Layer Makes  Data Mesh Work at ScaleHow a Semantic Layer Makes  Data Mesh Work at Scale
How a Semantic Layer Makes Data Mesh Work at ScaleDATAVERSITY
 
Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?DATAVERSITY
 
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...DATAVERSITY
 
Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?DATAVERSITY
 
Data Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and ForwardsData Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and ForwardsDATAVERSITY
 
Data Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement TodayData Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement TodayDATAVERSITY
 
2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics2023 Trends in Enterprise Analytics
2023 Trends in Enterprise AnalyticsDATAVERSITY
 
Data Strategy Best Practices
Data Strategy Best PracticesData Strategy Best Practices
Data Strategy Best PracticesDATAVERSITY
 
Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?DATAVERSITY
 
Data Management Best Practices
Data Management Best PracticesData Management Best Practices
Data Management Best PracticesDATAVERSITY
 
MLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageMLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageDATAVERSITY
 

Mais de DATAVERSITY (20)

Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
 
Data at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and GovernanceData at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and Governance
 
Exploring Levels of Data Literacy
Exploring Levels of Data LiteracyExploring Levels of Data Literacy
Exploring Levels of Data Literacy
 
Building a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business GoalsBuilding a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business Goals
 
Make Data Work for You
Make Data Work for YouMake Data Work for You
Make Data Work for You
 
Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?
 
Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?
 
Data Modeling Fundamentals
Data Modeling FundamentalsData Modeling Fundamentals
Data Modeling Fundamentals
 
Showing ROI for Your Analytic Project
Showing ROI for Your Analytic ProjectShowing ROI for Your Analytic Project
Showing ROI for Your Analytic Project
 
How a Semantic Layer Makes Data Mesh Work at Scale
How a Semantic Layer Makes  Data Mesh Work at ScaleHow a Semantic Layer Makes  Data Mesh Work at Scale
How a Semantic Layer Makes Data Mesh Work at Scale
 
Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?
 
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
 
Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?
 
Data Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and ForwardsData Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and Forwards
 
Data Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement TodayData Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement Today
 
2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics
 
Data Strategy Best Practices
Data Strategy Best PracticesData Strategy Best Practices
Data Strategy Best Practices
 
Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?
 
Data Management Best Practices
Data Management Best PracticesData Management Best Practices
Data Management Best Practices
 
MLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageMLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive Advantage
 

Último

Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 

Último (20)

Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 

Building Applications Using NoSQL Architectures on top of SQL Azure: How MSN Casual Games Scales-Out

  • 2.
  • 3.
  • 4. Social Social Networks Network Management s Ops Services Data Backend Data Backend Services Data iBackend Services S Services MSN MSN Games Games l Web Portal Front Door GameBar Router WLM Services WLM Games Host Games Web P t l W b Portal Bing Bing g Auth Games G STS STS Games l Web Portal Azure Data Centers
  • 5.
  • 6.
  • 8. Partitioned over 100 SQL Azure DBs Find Friends’ Profiles Social Get my Profile Social Services User … DB Service Publish feed, read feed Find Friends’ Profiles Fi d F i d ’ P fil Get Friends highscores Gamer Last Played Gamer Services Favorites STS Services Game Preferences STS Leaderb Social Leaderboards … DB oard Partitioned over 298 SQL Azure DBs Game Game Disable/Enable Ingestion Games from Front Door Write user specific game infos Ingestion accessing services g Router R t Services Game Game binaries User … DB Catalog Game metadata 250 i instances Partitioned over 100 SQL Azure DBs 250 instances
  • 9. • Fanout: Parallel calls to multiple database partitions • Q Quorum: Abl t Able to tolerate a percentage of request failures during Fanout F t • Retry: Retry on database requests error
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Federation Azure DB with Federation Root − Represents the data being sharded Federation Root Federation Directories, Federation Users, − Database that logically houses federations, contains federation meta data Federation Distributions, … Distributions Federation Key − Value that determines the routing of a piece of data (defines a Federation Distribution) Federation Member (aka Shard) Federation “Orders_Fed” − A physical container f a set of federated h i l t i for t ff d t d (Federation Key: CustomerID) tables for a specific key range and reference tables Member: PK [min, 100) Federated Table − Table that contains only atomic units for the AU AU AU member s member’s key range PK=5 PK=25 PK=35 Reference Table − Non-sharded table Atomic Unit Member: PK [100, 488) − All rows with the same federation key value: always together! AU AU AU Connectio PK=105 PK=235 PK=365 Gateway Member: PK [488, max) on y AU AU AU Sharded PK=555 PK=2545 PK=3565 Application 17
  • 19.
  • 20. http://www.microsoft.com/casestudies/Case_Study Detail.aspx?CaseSt p // / / y_ p udyID=4000008310 http://cacm.acm.org/magazines/2011/6/108663- scalable-sql l bl l http://download.microsoft.com/download/9/E/9/9E9F240D-0EB6-472E- B4DE- 6D9FCBB505DD/Windows%20Azure%20No%20SQL%20White%20Paper.p df http://blogs.msdn.com/b/cbiyikoglu/archive/2011/03/03/nosql genes in http://blogs msdn com/b/cbiyikoglu/archive/2011/03/03/nosql-genes-in- sql-azure-federations.aspx mrys@microsoft.com y http://sqlblog.com/blogs/michael_rys/default.aspx
  • 21.
  • 22. Connection: Server=az1cl l321.db.wind dows.net; Database=MyD DB; User=AppUser r; Passwd=****; ; Gatew way CREATE FEDERATION g Existing Database (customer_id bi i CREATE FEDERATION sales i bigint RANGE) 22
  • 23. Federation with a Single Shard Existing Database g CREATE FEDERATION sales (customer_id bigint RANGE) Database root contains: sales • Federation root = DB level object  containing federation scheme way • Federation users Gatew • Federation metadata incl. federation  Connection: map net; er=az1cl321.db.windows.n Range: Min...Max base=MyDB; =AppUser; wd=****; Serve Datab User= Passw Federation Member 23
  • 24. Introducing Two Connection Modes • Filtered Connection – Guarantees that any queries or DML will produce the  same results independent of changes to the physical  layout of the federation members –SScoped to an “Atomic Unit” d “A i U i” • Unfiltered Connection – Scoped to a Federation Member – Management Connection 24
  • 25. Create Schema on Member: Management Connection Existing Database g sales way Gatew Connection: USE FEDEDERATION sales (customer_id=0) WITH FILTERING=OFF, RESET; net; CREATE TABLE … er=az1cl321.db.windows.n Range: Min...Max Customer Order Product base=MyDB; =AppUser; wd=****; Serve Datab User= Passw Federation Member © 2011 Microsoft Corporation.   Microsoft Materials  ‐ Confidential.  All rights reserved. CITA #  25 MSFT101120_A
  • 26. DDL CREATE TABLE customer ( c_id bigint PRIMARY KEY, … ) FEDERATED ON (customer_id=c_id); ( ) CREATE TABLE order ( item_num int, customer_id bigint, date_sold datetime2, …, CONSTRAINT PK_Order PRIMARY KEY (item_num, customer_id, date_sold), CONSTRAINT FK_Cust FOREIGN KEY customer_id REFERENCES customer (customer id) (customer_id) ) FEDERATED ON (customer_id=customer_id); CREATE TABLE product ( product_name varchar(100) NOT NULL, unit_price money, item_num int PRIMARY KEY, … ); 26
  • 27. More Detail • Supported data types for federation key : bigint, int, GUID,  and varbinary Supported data types for federation key : bigint int GUID and varbinary (900) – Only range partitioning • Federation key must be part of unique index • Foreign key constraints only allowed between federated tables and from  federated table to reference table • Not all Azure programmability features supported – Sequence timestamp Sequence, timestamp • Additional surface area restrictions – Indexed views, drop database (members) • Schemas are allowed to diverge over time g – Furthermore, in v1, schema updates to existing members must be done in each  member (where the change is needed) • USE FEDERATION “rewires a connection” – Connection is reestablished Connection is reestablished – All existing settings and context of the connection is lost (sp_reset_connection) – Must be in a batch by itself 27
  • 28. Connect to Atomic Unit: Filtered Existing Database g When using into a specific key  value, SELECT will only return  sales records from federated tables that  match that value. It will still return  way all records from non‐federated  Gatew tables. Connection: USE FEDEDERATION sales (customer_id=3) Inserts and UPDATES operating  WITH FILTERING=ON, RESET; outside of the value will fail. net; er=az1cl321.db.windows.n Range: Min...Max customer order product 3 base=MyDB; 3 =AppUser; SELECT * from customer wd=****; SELECT * from product SELECT * from order Serve Datab User= Passw Federation Member 28
  • 29. More on Connection Filtering  • Most operations behave differently in filtered vs unfiltered connections • C Connection filtering is a property of the session ti filt i i t f th i – Filter injected dynamically at runtime – Cannot inspect source code to determine how it behaves Cannot inspect source code to determine how it behaves • E.g., running stored proc written for filtered mode on unfiltered  connection could lead to unintended results • There are several operations that will not work in There are several operations that will not work in  filtered connection in v1 – DDL, DML on reference tables, … • Fan‐out, bulk operations not efficient in filtered mode – For now, filter=off is our best offer 29
  • 30. Support Matrix Connection Type Filtered Unfiltered Named  Operation (unfiltered) Dynamic SELECT  DML (federated tables) DML* (federated tables)  DML* (reference tables)  X DDL  X Views (not indexed)  UDF ‐ activate Stored Proc ‐ activate Trigger (all modes) ‐ activate CREATE/UPDATE Stats CREATE/UPDATE Stats X Bulk Ops openrowset bulk, bcp, bulk  insert X *  not including SELECT & modules ^ autostats will work on all connections System stored procs, intrinsics will be unaffected (run unfiltered) 30
  • 31. Splitting a Member Existing Database g ALTER FEDERATION sales l sales SPLIT AT (customer_id=50) way Gatew USE FEDERATION ROOT Connection: WITH RESET Using to the  net; federation ROOT  er=az1cl321.db.windows.n will pop you out of  a member back  Range: Min...Max into the database  that hosts the  customer order product federation 3 3 base=MyDB; =AppUser; wd=****; 40 58 58 58 Serve Datab User= Passw Federation Member 31
  • 32. Two New Members Existing Database g ALTER FEDERATION sales l sales SPLIT AT (customer_id=50) way Gatew USE FEDEDERATION ROOT WITH RESET Connection: net; er=az1cl321.db.windows.n Range: Min...50 Range: 51...Max customer order product customer order product 3 base=MyDB; 3 =AppUser; wd=****; 58 40 58 58 Serve Datab User= Passw Federation Member Federation Member 32
  • 33. Two New Members Existing Database g sales way Gatew USE FEDEDERATION sales (customer_id=40) Connection: WITH FILTERING=ON, RESET; net; er=az1cl321.db.windows.n Range: Min...50 Range: 51...Max customer order product customer order product base=MyDB; SELECT * =AppUser; wd=****; from customer 58 40 40 58 58 SELECT * from order Serve Datab User= Passw 33