PLAYER CUSTOMIZATIONWITH COUCHBASE
CLINTON VAN BLOMMESTEIN
Agenda
• What are we solving?
• What we ended up with.
• Why Couchbase?
About Me
• Clinton van Blommestein
• Derivco• 16 years
• Senior Developer, Horizon Team
• Views are my own
Derivco
CAPE TOWN
JOHANNESBURG
DURBAN
Derivco
• Started in 1994
• Software provider
• Casino, Poker, Mobile, Sportsbook, Bingo, etc.
What are we solving?
• Player customization
• Player segmentation
• Player settings
Player Segmentation
• Logical grouping of players
• Events and Attributes• Game history, deposits, etc.
• Extremely granular
• Grouping, ungrouping
• Targeting
Player Settings
• Retrieve settings for a game
• Validate settings before transaction
• Up to 120 settings per game per user
Player Settings Stack
DEFAULT
Player Settings Stack
DEFAULT
CURRENCY
SEGMENT
Player Settings Stack
DEFAULT
CURRENCY
REGULATED MARKET
SEGMENT
Player Settings Stack
• Around 10 levels
• Multiple stacks
Current Implementation
Goals
• Better utilization of hardware
• Elastic scale
• Make everything real time
Targets
• Hundreds of millions of players
• Unlimited attributes per player (Deposits, game history, etc)
• Zero downtime
• Modern software architecture
Technologies
Microsoft Service Fabric Microsoft Orleans
Microsoft Service Fabric
• Extensively used in Azure
• Application, container and services host
• Handles upgrades, failures, scale out
• On-premise and/or cloud
Microsoft Orleans
• Virtual “Actor”
• Extremely performant
• Xbox, Skype, Halo, Gears of War 4
What is a virtual actor?
• Contains data and logic
• Can be created and/or destroyed
• Activation also based on timer events
• Extremely high read/write requirements
Hundreds of millions
Couchbase Connect 2016
• Met with Couchbase Architects, Product Managers and Developers
• Excited, passionate
• Really willing to help
Couchbase
• Strong consistency
• CAS
• Sub-Document operations
• N1QL
• DCP
Architecture
Service Fabric
Orleans
Couchbase
Orleans Couchbase Storage Provider
Feature - Consistency
• Strong
• Replica reads
• Extremely high throughput
Feature - CAS
• Keeps grains in check
2 2
Feature - CAS
• Keeps grains in check
2 2
2
Feature - CAS
• Keeps grains in check
2 3
3
Feature - CAS
• Keeps grains in check
2 3
3
Feature – Sub-Document operations
• No need for full document processing
Feature - N1QL
• Familiar, easy to use
• Very performant for most use cases
• Allows hot vs cold split
Reporting
Reporting
?
RabbitMQ
ReportingRABBITMQ SUBSCRIBER
DCP
• Couchbase protocol
DCP
COUCHBASE COUCHBASE COUCHBASE
DCP
COUCHBASE COUCHBASE COUCHBASE
DCP
COUCHBASE COUCHBASE COUCHBASE
ReportingDOT NET
DCP CLIENT
Performance Stats
> 1 million player setting requests per second
Sub-millisecond Couchbase reads
Realtime event processing
Cloud burstable
Couchbase and 9th Bit
• Implementation review
• Infrastructure review
• Onsite training