SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Service Dispatcher: The MySpace
Implementation of Service Broker
       Speaker: Christa Stelzmuller
      MySpace Chief Data Architect

      San Francisco SQL Server User Group
              September 14, 2009




         Mark Ginnebaugh, User Group Leader
                www.bayareasql.org
Christa Stelzmuller

  Chief Data Architect at MySpace since Oct 2006
  Formerly at Yahoo!
    Engineering Manager
    Data Architect for the Yahoo! Music Team
  Specializes in very large databases with high volumes
  of transactions

Tonight’s Topic: Service Dispatcher: The MySpace
Implementation of Service Broker
What is Service Broker?

Message Queue
  Asynchronous
  Unicast
  Intra- and Inter-database, instance, and server
Integrated into the database engine
  Instance level
  DML extensions
Why Service Broker?

Flexible
  Atomic transactions can be split across synchronous and
  asynchronous work items
  Work items can occur in parallel
Predictable
  Asynchronous work items are processed at a constant rate
  leveling peaks and valleys
Transactional
In-Database
  Common administration
Challenges with Service Broker

Unicast
  Communication is from a single sender to a single target
  Excessive message transmission
Routing
  Requires a physical route between each service
  Unmanageable number of routes
Non-Intuitive
  Four object types must be implemented for each service,
  and up to seven understood
  High learning curve for average database developer
Introducing Service Dispatcher
Core Features
 Simulated Multicast
   Communication is from a single sender to a specified set of
   targets
   Wildcard targets support simulated broadcast
 Route Management
   Routes to all dispatcher client enabled databases are
   managed centrally
 Abstraction
   API for “SEND”
   Friendly database names are used instead of service
   broker instances
Advanced Features
 Dialog Management
   Technique of dialog reuse abstracted
   Pooling based on spid, service, and group
 Route Receipts
   Used in simulated broadcast scenarios to return information
   on all servers from which acknowledgement should be
   expected
 Extensible
   Publish/Subscribe (target agnostic messages)
   Notifications
Major Use Cases
  Broker Gateway
    Asynchronous message
    delivery APIs
    Load balanced farm
    Abstracted data destination
  Example Usage
    Activities Stream
Major Use Cases

Backend Initiated
Processing
  Foreign keys and
  relationships spread across
  many databases
  Coordinated messaging
Example Usage
  Profile management
  Content take-downs
Major Use Cases

List Broadcast
  Local data used to broadcast
  updates to lists
  Two views of the relationship
  represented
Example Usage
  Photo Tags
  Friend Categories
Developer Highlights

Message Types
  No need for explicit service broker message types
  If needed, application message types are supported as
  part of the message body
  Standard set of message types, system and dispatcher
Contracts
  No need for explicit service broker contracts
  Each application service must contain a reference to at
  least one dispatcher contract
Developer Highlights

Conversation Group Locking
  Alternative to GET CONVERSATION GROUP
  Dialog consolidation for performance
  Requires explicit conversation group lock release
Conversation Ending
  Dispatcher specific state tables
  Error handling
Administrator Highlights

Build
  Central catalog
  Common client code deployed
  Automated services
    Dispatcher route creation
    Client route creation
Database Configuration
  GET CONVERSATION GROUP
  Maximum valid groups
  Dialog pool size
  Dialog timeout settings
Administrator Highlights

Health & Monitoring
  Reports
    Scheduled
    Ad-Hoc
  Notifications
  Automated queue reactivation
  Quarantine
  Ping
Unsupported Broker Features

Message Ordering
  Farm of servers, random access
  Dialog death & resend
  Abstracted conversation management
Fire & Forget
  Conversation management is tightly controlled by
  dispatcher, and logic to properly handle conversation ends
  and errors is built in.
Begin/End Conversation
  Applications cannot control dialog state, this is entirely
  managed by dispatcher
Upcoming Features

Dialog Emulation
  Introducing the concept of circuits
  Message sequence number
  Message ordering becomes possible
  Applications can control circuit state
Abstracted activation logic
  RECEIVE logic abstracted
  Internal broker message type handling
Service Broker Stats
                     Average        Average Peak          Max          Peak Farm Total
    MySpace DB   Sends/Sec/Server Sends/Sec/Server Sends/Sec/Server      Sends/Sec
Dispatcher             45                229               816              9,164
Profile                90                258               925             130,290
Mail                   40               2,397             8,546           1,210,485
Shared                 264               540                -                 -
Features               21                36                37                720


                     Average        Average Peak          Max          Peak Farm Total
    MySpace DB   Rcvs/Sec/Server   Rcvs/Sec/Server   Rcvs/Sec/Server    Receives/Sec
Dispatcher             10                33                48               1,328
Profile                60                303               432             153,015
Mail                   38               3,186             4,980           1,608,930
Shared                 218               351                -                 -
Features               18                92                119              1,840
When not to use Dispatcher

Local asynchronous messages
One-to-one messaging
When an unsupported feature is required
Alternatives to Dispatcher

Abstracted SEND logic (same as dispatcher without the
router component)
Dynamic route management (Microsoft’s solution
More Information

Case Study
  http://www.microsoft.com/casestudies/Case_Study_Detail.
  aspx?CaseStudyID=4000004532


Codeplex
  Soon to come!
Credits

Creator & Original Concept, Mikhail Berlyant
Principal Dispatcher Architect, Mark Lovretovich
Contributors, Kevin Stephenson & Justin Engelman
To learn more or inquire about speaking opportunities, please
                           contact:

Mark Ginnebaugh, User Group Leader mark@designmind.com

Weitere ähnliche Inhalte

Was ist angesagt?

NTXISSACSC4 - Identity as a Threat Plane Leveraging UEBA and IdA
NTXISSACSC4 - Identity as a Threat Plane Leveraging UEBA and IdANTXISSACSC4 - Identity as a Threat Plane Leveraging UEBA and IdA
NTXISSACSC4 - Identity as a Threat Plane Leveraging UEBA and IdA
North Texas Chapter of the ISSA
 

Was ist angesagt? (20)

IoT security is a nightmare. But what is the real risk?
IoT security is a nightmare. But what is the real risk?IoT security is a nightmare. But what is the real risk?
IoT security is a nightmare. But what is the real risk?
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
Gain more freedom when migrating from Camunda 7 to 8.pdf
Gain more freedom when migrating from Camunda 7 to 8.pdfGain more freedom when migrating from Camunda 7 to 8.pdf
Gain more freedom when migrating from Camunda 7 to 8.pdf
 
SplunkLive! Customer Presentation--ServiceNow
SplunkLive! Customer Presentation--ServiceNowSplunkLive! Customer Presentation--ServiceNow
SplunkLive! Customer Presentation--ServiceNow
 
CLOUD NATIVE SECURITY
CLOUD NATIVE SECURITYCLOUD NATIVE SECURITY
CLOUD NATIVE SECURITY
 
AWS Aurora 운영사례 (by 배은미)
AWS Aurora 운영사례 (by 배은미)AWS Aurora 운영사례 (by 배은미)
AWS Aurora 운영사례 (by 배은미)
 
AWS re:Invent 2016: Deep Dive on Amazon Aurora (DAT303)
AWS re:Invent 2016: Deep Dive on Amazon Aurora (DAT303)AWS re:Invent 2016: Deep Dive on Amazon Aurora (DAT303)
AWS re:Invent 2016: Deep Dive on Amazon Aurora (DAT303)
 
20명 규모의 팀에서 Vault 사용하기
20명 규모의 팀에서 Vault 사용하기20명 규모의 팀에서 Vault 사용하기
20명 규모의 팀에서 Vault 사용하기
 
Building an Analytics Enables SOC
Building an Analytics Enables SOCBuilding an Analytics Enables SOC
Building an Analytics Enables SOC
 
High-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using RedisHigh-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using Redis
 
Empower Your Security Practitioners with Elastic SIEM
Empower Your Security Practitioners with Elastic SIEMEmpower Your Security Practitioners with Elastic SIEM
Empower Your Security Practitioners with Elastic SIEM
 
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018
Deep Dive on PostgreSQL Databases on Amazon RDS (DAT324) - AWS re:Invent 2018
 
Solving Enterprise Data Challenges with Apache Arrow
Solving Enterprise Data Challenges with Apache ArrowSolving Enterprise Data Challenges with Apache Arrow
Solving Enterprise Data Challenges with Apache Arrow
 
The Complete MariaDB Server tutorial
The Complete MariaDB Server tutorialThe Complete MariaDB Server tutorial
The Complete MariaDB Server tutorial
 
Sumo Logic Cert Jam - Security Analytics
Sumo Logic Cert Jam - Security AnalyticsSumo Logic Cert Jam - Security Analytics
Sumo Logic Cert Jam - Security Analytics
 
Diving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction LogDiving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction Log
 
Privileged identity management
Privileged identity managementPrivileged identity management
Privileged identity management
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 
Extending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured InformationExtending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured Information
 
NTXISSACSC4 - Identity as a Threat Plane Leveraging UEBA and IdA
NTXISSACSC4 - Identity as a Threat Plane Leveraging UEBA and IdANTXISSACSC4 - Identity as a Threat Plane Leveraging UEBA and IdA
NTXISSACSC4 - Identity as a Threat Plane Leveraging UEBA and IdA
 

Andere mochten auch

Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
Reza Gh
 

Andere mochten auch (7)

MySpace Data Architecture June 2009
MySpace Data Architecture June 2009MySpace Data Architecture June 2009
MySpace Data Architecture June 2009
 
SQL Server -Service Broker - Reliable Messaging
SQL Server -Service Broker - Reliable MessagingSQL Server -Service Broker - Reliable Messaging
SQL Server -Service Broker - Reliable Messaging
 
Widget Summit 2008: Powering Your Site with Data Availability
Widget Summit 2008: Powering Your Site with Data AvailabilityWidget Summit 2008: Powering Your Site with Data Availability
Widget Summit 2008: Powering Your Site with Data Availability
 
Myspace: Growth, Collapse, and Reinvention
Myspace: Growth, Collapse, and ReinventionMyspace: Growth, Collapse, and Reinvention
Myspace: Growth, Collapse, and Reinvention
 
SQL Server Service Brokers
SQL Server Service BrokersSQL Server Service Brokers
SQL Server Service Brokers
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
 
Social Networking Project (website) full documentation
Social Networking Project (website) full documentation Social Networking Project (website) full documentation
Social Networking Project (website) full documentation
 

Ähnlich wie MySpace SQL Server Service Broker

MMS Profile for Web Services
MMS Profile for Web ServicesMMS Profile for Web Services
MMS Profile for Web Services
Abhijeet Ranadive
 
MOSS 2007 Deployment Fundamentals -Part2
MOSS 2007 Deployment Fundamentals -Part2MOSS 2007 Deployment Fundamentals -Part2
MOSS 2007 Deployment Fundamentals -Part2
Information Technology
 
NaradaBrokering Grid Messaging and Applications as Web Services
NaradaBrokering Grid Messaging and Applications as Web ServicesNaradaBrokering Grid Messaging and Applications as Web Services
NaradaBrokering Grid Messaging and Applications as Web Services
Videoguy
 
NaradaBrokering Grid Messaging and Applications as Web Services
NaradaBrokering Grid Messaging and Applications as Web ServicesNaradaBrokering Grid Messaging and Applications as Web Services
NaradaBrokering Grid Messaging and Applications as Web Services
Videoguy
 
Part 1 network computing
Part 1 network computingPart 1 network computing
Part 1 network computing
Linh Nguyen
 

Ähnlich wie MySpace SQL Server Service Broker (20)

High volume real time contiguous etl and audit
High volume real time contiguous etl and auditHigh volume real time contiguous etl and audit
High volume real time contiguous etl and audit
 
Running a Megasite on Microsoft Technologies
Running a Megasite on Microsoft TechnologiesRunning a Megasite on Microsoft Technologies
Running a Megasite on Microsoft Technologies
 
Handling Data in Mega Scale Systems
Handling Data in Mega Scale SystemsHandling Data in Mega Scale Systems
Handling Data in Mega Scale Systems
 
Gib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorGib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk Migrator
 
Evolution of Big Data Messaging
Evolution of Big Data Messaging Evolution of Big Data Messaging
Evolution of Big Data Messaging
 
MMS Profile for Web Services
MMS Profile for Web ServicesMMS Profile for Web Services
MMS Profile for Web Services
 
SharePoint 2010 Global Deployment
SharePoint 2010 Global DeploymentSharePoint 2010 Global Deployment
SharePoint 2010 Global Deployment
 
SOA patterns
SOA patterns SOA patterns
SOA patterns
 
Introduction To Cloud Computing
Introduction To Cloud ComputingIntroduction To Cloud Computing
Introduction To Cloud Computing
 
MOSS 2007 Deployment Fundamentals -Part2
MOSS 2007 Deployment Fundamentals -Part2MOSS 2007 Deployment Fundamentals -Part2
MOSS 2007 Deployment Fundamentals -Part2
 
Messaging for IoT
Messaging for IoTMessaging for IoT
Messaging for IoT
 
NaradaBrokering Grid Messaging and Applications as Web Services
NaradaBrokering Grid Messaging and Applications as Web ServicesNaradaBrokering Grid Messaging and Applications as Web Services
NaradaBrokering Grid Messaging and Applications as Web Services
 
NaradaBrokering Grid Messaging and Applications as Web Services
NaradaBrokering Grid Messaging and Applications as Web ServicesNaradaBrokering Grid Messaging and Applications as Web Services
NaradaBrokering Grid Messaging and Applications as Web Services
 
IoT, connecting apps, devices and services
IoT, connecting apps, devices and servicesIoT, connecting apps, devices and services
IoT, connecting apps, devices and services
 
MPLS ppt
MPLS pptMPLS ppt
MPLS ppt
 
Part 1 network computing
Part 1 network computingPart 1 network computing
Part 1 network computing
 
Implementing Domain Events with Kafka
Implementing Domain Events with KafkaImplementing Domain Events with Kafka
Implementing Domain Events with Kafka
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
 
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
 
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...
Transforming a Large Mission-Critical E-Commerce Platform from a Relational A...
 

Mehr von Mark Ginnebaugh

Mehr von Mark Ginnebaugh (20)

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big Data
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary Keys
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL Server
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetings
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & Hadoop
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join Operators
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best Practices
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud Ready
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data Services
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivot
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

MySpace SQL Server Service Broker

  • 1. Service Dispatcher: The MySpace Implementation of Service Broker Speaker: Christa Stelzmuller MySpace Chief Data Architect San Francisco SQL Server User Group September 14, 2009 Mark Ginnebaugh, User Group Leader www.bayareasql.org
  • 2. Christa Stelzmuller Chief Data Architect at MySpace since Oct 2006 Formerly at Yahoo! Engineering Manager Data Architect for the Yahoo! Music Team Specializes in very large databases with high volumes of transactions Tonight’s Topic: Service Dispatcher: The MySpace Implementation of Service Broker
  • 3. What is Service Broker? Message Queue Asynchronous Unicast Intra- and Inter-database, instance, and server Integrated into the database engine Instance level DML extensions
  • 4. Why Service Broker? Flexible Atomic transactions can be split across synchronous and asynchronous work items Work items can occur in parallel Predictable Asynchronous work items are processed at a constant rate leveling peaks and valleys Transactional In-Database Common administration
  • 5. Challenges with Service Broker Unicast Communication is from a single sender to a single target Excessive message transmission Routing Requires a physical route between each service Unmanageable number of routes Non-Intuitive Four object types must be implemented for each service, and up to seven understood High learning curve for average database developer
  • 7. Core Features Simulated Multicast Communication is from a single sender to a specified set of targets Wildcard targets support simulated broadcast Route Management Routes to all dispatcher client enabled databases are managed centrally Abstraction API for “SEND” Friendly database names are used instead of service broker instances
  • 8. Advanced Features Dialog Management Technique of dialog reuse abstracted Pooling based on spid, service, and group Route Receipts Used in simulated broadcast scenarios to return information on all servers from which acknowledgement should be expected Extensible Publish/Subscribe (target agnostic messages) Notifications
  • 9. Major Use Cases Broker Gateway Asynchronous message delivery APIs Load balanced farm Abstracted data destination Example Usage Activities Stream
  • 10. Major Use Cases Backend Initiated Processing Foreign keys and relationships spread across many databases Coordinated messaging Example Usage Profile management Content take-downs
  • 11. Major Use Cases List Broadcast Local data used to broadcast updates to lists Two views of the relationship represented Example Usage Photo Tags Friend Categories
  • 12. Developer Highlights Message Types No need for explicit service broker message types If needed, application message types are supported as part of the message body Standard set of message types, system and dispatcher Contracts No need for explicit service broker contracts Each application service must contain a reference to at least one dispatcher contract
  • 13. Developer Highlights Conversation Group Locking Alternative to GET CONVERSATION GROUP Dialog consolidation for performance Requires explicit conversation group lock release Conversation Ending Dispatcher specific state tables Error handling
  • 14. Administrator Highlights Build Central catalog Common client code deployed Automated services Dispatcher route creation Client route creation Database Configuration GET CONVERSATION GROUP Maximum valid groups Dialog pool size Dialog timeout settings
  • 15. Administrator Highlights Health & Monitoring Reports Scheduled Ad-Hoc Notifications Automated queue reactivation Quarantine Ping
  • 16. Unsupported Broker Features Message Ordering Farm of servers, random access Dialog death & resend Abstracted conversation management Fire & Forget Conversation management is tightly controlled by dispatcher, and logic to properly handle conversation ends and errors is built in. Begin/End Conversation Applications cannot control dialog state, this is entirely managed by dispatcher
  • 17. Upcoming Features Dialog Emulation Introducing the concept of circuits Message sequence number Message ordering becomes possible Applications can control circuit state Abstracted activation logic RECEIVE logic abstracted Internal broker message type handling
  • 18. Service Broker Stats Average Average Peak Max Peak Farm Total MySpace DB Sends/Sec/Server Sends/Sec/Server Sends/Sec/Server Sends/Sec Dispatcher 45 229 816 9,164 Profile 90 258 925 130,290 Mail 40 2,397 8,546 1,210,485 Shared 264 540 - - Features 21 36 37 720 Average Average Peak Max Peak Farm Total MySpace DB Rcvs/Sec/Server Rcvs/Sec/Server Rcvs/Sec/Server Receives/Sec Dispatcher 10 33 48 1,328 Profile 60 303 432 153,015 Mail 38 3,186 4,980 1,608,930 Shared 218 351 - - Features 18 92 119 1,840
  • 19. When not to use Dispatcher Local asynchronous messages One-to-one messaging When an unsupported feature is required
  • 20. Alternatives to Dispatcher Abstracted SEND logic (same as dispatcher without the router component) Dynamic route management (Microsoft’s solution
  • 21. More Information Case Study http://www.microsoft.com/casestudies/Case_Study_Detail. aspx?CaseStudyID=4000004532 Codeplex Soon to come!
  • 22. Credits Creator & Original Concept, Mikhail Berlyant Principal Dispatcher Architect, Mark Lovretovich Contributors, Kevin Stephenson & Justin Engelman
  • 23. To learn more or inquire about speaking opportunities, please contact: Mark Ginnebaugh, User Group Leader mark@designmind.com