SlideShare a Scribd company logo
1 of 18
Download to read offline
How to build
Game Server 2.0
Peter Rybár
Requirements
● Performance
– Fast responses < 0.1 s
● Scalability
– Number of player sessions ~100k
● High Availability
– 24/7 service
● Fault Tolerance
– Minimize outages
Principles
● Linear Scalability
– No manual configuration!
– Automatic upscale, downscale
● IMDG – In Memory Data Grid
– Distributed data – performance
– Replicated IM data – Fault Tolerance (FT)
● Cluster
– High Availability (HA)
– Zones based on application node roles
● Configuration data
– Games, Campaigns… – small volumes
– Central data, cacheable – massive reading
● Players data
– Wallets, Running game sessions – small volumes
– Central data, cacheable – massive reading and writing
● Operation data
– Application specific, easy to change – runtime data
– Optimized for performance (in memory) – massive reading and writing
● Historical data
– Game rounds, sessions – big volumes
– Time based stream of events – massive writing
– Invoicing, Audit, Replay games
– Important for production, not needed for demo / test
Data
● Sharding – Horizontal partitioning
– Way how to scale Big Data volumes
– Way how to scale IO and DB transaction
– Storing rows of a same table in multiple databases
– Use proper database for specific data category
– Some databases are natively sharded – Cassandra,
HBase, HDFS, and MongoDB
Data management
Data sharding
● Algorithmic Sharding
– Uniform distribution of data
– Determine a given partition’s
database without any help
● Dynamic Sharding
– Nonuniform distribution of data
– Clients need to consult the
locator service first
● Entity Groups
– Queries within a single physical
shard (RDBM) are efficient.
– Stronger consistency (ACID)
semantics can be achieved
within a shard.
Game data
● Players data
– Entity groups sharding
– Sharding by player ID
– Partitioning by player, game session
● scalability of sharding while retaining most of its flexibility
● Historical data
– Algorithmic sharding
– Dynamic sharding
● Polyglot Persistence
– using multiple data storage based upon the way data
is being used by application
Game processing – IO
● Separate game processor code from data
● Separate data persistence from game logic
Game Processor
Game input Game Output
Game Conf
Player Wallet Player Wallet
Historical Data
Random No.
Data persistence
Polyglot Persistence – using multiple data storage (RDBMS, NoSql,
IMDG) based upon the way data is being used by applications
Historical Data
- Game sessions
- Game rounds
- Wallet allocations
Payers Data
- Wallets
- Game states
- Settings
Config Data
- Games
- Campaign
- Currencies
Game Server
Operation
Data
Game input Game outputGame processor
CGS
RNG
Architecture – Scaling, FT, HA
Game Server Back Office Alarms
Business
intelligence
Game Server
Game Server
GS zone BO zone A zone BI zone
Back Office
…… … …
Alarms
Business
intelligence
IMDG – in memory data grid
Communication – GS↔Casino
● Game Server ↔ Casino platform
– Money transaction based protocol – not game based!
● Money transactions are only mandatory to operate
– Game specific meta-data – protocol extensions
● Extensions for different types of games – even social gaming
– Casino interaction (IO) strategy – scale casino IO !!!
● Session Wallet – IO once per game session
● Deep Wallet – IO once per game round
● Hybrid Wallet – IO based on casino performance
– Different strategies for casinos, game types, wallet value, …
– Deep Wallet, Session Wallet – only corner cases
– One protocol implementation – not two (DW, SW)
● Hybrid Wallet – Simpler casino platform integration
Technologies
● Java 8 – streams, lambdas, datetime types, …
● IMDG – Apache Ignite
– Clustering – auto cluster discovery
– Cache – decrease IO, increase performance
– Transactions, concurrency
– Memory data replication – FT, HA
● PostgreSQL – best open source RDBMS, JSON support
● Jetty Web server – fast, embedded, lightweight
● DbUtils, Datanucleus – RDMBS persistence
● FasterXML – serializers to JSON, MsgPack, XML
● Signal / Slot pattern – QT like, modularity, reusability
● React – web user interface
…
Project roadmap
● Summarize requirements
– Business and technical requirements
● Technical analysis
– GS core functionality, determine modules
● Technical design – Architecture
– GS core, GS modules and protocols
– Crucial part – Art of SW architecture
● Prototyping of GS 2.0
– Performance tests, Storage tests
● Implementation – build GS 2.0 components
– Game server core
– Back Office
– Alarms
– Business Intelligence
– Demo Casino
Project roadmap
Development – Principles
● KISSS – Keep It
– Small
– Simple
– Scalable
● Incrementally deliver
– long term project
● Iteration cycle
– Build, Prototype
– Measure, Test
– Learn, Tune
– Deliver
Development – Methodology
● Scrum – A fundamental time shift
– Time-boxing doesn't work sometimes
● Kanban – A fundamental incremental improvements
– Can be event-driven instead of time-boxed (scrum)
– Can add new items whenever capacity is available
– Cross-functional teams, specialist teams allowed
=> Kanban
– suitable for our environment
Development – SCM
● Source Code Management
● Human gatekeeper
– Workflow
– Gatekeeper does code review
– Merges the work into the main
branch if it meets the
necessary standards
– Strong source control
– My best experience
● Git
– distributed, offline work
About me – Peter Rybár
●
IT Consultant
●
Project Leader
●
Solutions Architect
●
Technology Leader
●
Senior Developer
●
Certified Scrum Master
●
HR consultant
● RNDr., PhD. In Physics
●
A-Tech s.r.o. CEO, CTO
●
> 20 years of IT experiences
●
Dozens of IT projects
– as leader, architect, developer
● Senior solution architect:
– Softec s.r.o. , Centaur s.r.o.
– Davinci software s.r.o.
– VECTARY
● Customers:
– T-Mobile Slovensko, a.s.
– Telefónica O2, s.r.o.
– Orange a.s.
– Allianz
– OVB
– SPP
– TraviAustria
– …
http://prest-tech.appspot.com/peter-rybar

More Related Content

Viewers also liked

Mining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMaris Elsins
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
Oracle Event Delivery Network (EDN) of SOA Suite 11g
Oracle Event Delivery Network (EDN) of SOA Suite 11gOracle Event Delivery Network (EDN) of SOA Suite 11g
Oracle Event Delivery Network (EDN) of SOA Suite 11gGuido Schmutz
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...ronwarshawsky
 
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...Lucas Jellema
 
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureReview Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureLucas Jellema
 
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...Lucas Jellema
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators iammutex
 
Mobile Database and Service Oriented Architecture
Mobile Database and Service Oriented ArchitectureMobile Database and Service Oriented Architecture
Mobile Database and Service Oriented ArchitectureLucas Jellema
 
Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Lucas Jellema
 
Introducing Oracle Real-Time Integration Business Insight
Introducing Oracle Real-Time Integration Business InsightIntroducing Oracle Real-Time Integration Business Insight
Introducing Oracle Real-Time Integration Business InsightLucas Jellema
 
Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...
Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...
Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...Mark Rittman
 
HMC_Industry_Report_Drone_Technology_160321[1]
HMC_Industry_Report_Drone_Technology_160321[1]HMC_Industry_Report_Drone_Technology_160321[1]
HMC_Industry_Report_Drone_Technology_160321[1]Robert Cheek
 
Oracle Database 12c - Introducing SQL Pattern Recognition through MATCH_RECOG...
Oracle Database 12c - Introducing SQL Pattern Recognition through MATCH_RECOG...Oracle Database 12c - Introducing SQL Pattern Recognition through MATCH_RECOG...
Oracle Database 12c - Introducing SQL Pattern Recognition through MATCH_RECOG...Lucas Jellema
 
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...Lucas Jellema
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)MongoDB
 

Viewers also liked (19)

Mining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMining AWR V2 - Trend Analysis
Mining AWR V2 - Trend Analysis
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
NoSQL and SOA
NoSQL and SOANoSQL and SOA
NoSQL and SOA
 
Oracle Event Delivery Network (EDN) of SOA Suite 11g
Oracle Event Delivery Network (EDN) of SOA Suite 11gOracle Event Delivery Network (EDN) of SOA Suite 11g
Oracle Event Delivery Network (EDN) of SOA Suite 11g
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
 
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
 
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureReview Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
 
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
 
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators
 
Mobile Database and Service Oriented Architecture
Mobile Database and Service Oriented ArchitectureMobile Database and Service Oriented Architecture
Mobile Database and Service Oriented Architecture
 
Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)
 
Introducing Oracle Real-Time Integration Business Insight
Introducing Oracle Real-Time Integration Business InsightIntroducing Oracle Real-Time Integration Business Insight
Introducing Oracle Real-Time Integration Business Insight
 
Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...
Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...
Gluent New World #02 - SQL-on-Hadoop : A bit of History, Current State-of-the...
 
HMC_Industry_Report_Drone_Technology_160321[1]
HMC_Industry_Report_Drone_Technology_160321[1]HMC_Industry_Report_Drone_Technology_160321[1]
HMC_Industry_Report_Drone_Technology_160321[1]
 
Oracle Database 12c - Introducing SQL Pattern Recognition through MATCH_RECOG...
Oracle Database 12c - Introducing SQL Pattern Recognition through MATCH_RECOG...Oracle Database 12c - Introducing SQL Pattern Recognition through MATCH_RECOG...
Oracle Database 12c - Introducing SQL Pattern Recognition through MATCH_RECOG...
 
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
 
SQL Outer Joins for Fun and Profit
SQL Outer Joins for Fun and ProfitSQL Outer Joins for Fun and Profit
SQL Outer Joins for Fun and Profit
 

Similar to How_to_build_GameServer_2

NoSQL meetup July 2011
NoSQL meetup July 2011NoSQL meetup July 2011
NoSQL meetup July 2011Shay Hassidim
 
Tech solutions and tricks in real time mobile multiplayer
Tech solutions and tricks in real time mobile multiplayerTech solutions and tricks in real time mobile multiplayer
Tech solutions and tricks in real time mobile multiplayerDevGAMM Conference
 
How to choose the right web hosting for your business
How to choose the right web hosting for your business How to choose the right web hosting for your business
How to choose the right web hosting for your business Pickaweb
 
In memory grids IMDG
In memory grids IMDGIn memory grids IMDG
In memory grids IMDGPrateek Jain
 
Red Hat Gluster Storage Performance
Red Hat Gluster Storage PerformanceRed Hat Gluster Storage Performance
Red Hat Gluster Storage PerformanceRed_Hat_Storage
 
Aerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike, Inc.
 
(GAM402) Turbine: A Microservice Approach to 3 Billion Game Requests
(GAM402) Turbine: A Microservice Approach to 3 Billion Game Requests(GAM402) Turbine: A Microservice Approach to 3 Billion Game Requests
(GAM402) Turbine: A Microservice Approach to 3 Billion Game RequestsAmazon Web Services
 
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDBEVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDBScott Mansfield
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3 Omid Vahdaty
 
Log aggregation and analysis
Log aggregation and analysisLog aggregation and analysis
Log aggregation and analysisDhaval Mehta
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | EnglishOmid Vahdaty
 
Design Like a Pro: How to Pick the Right System Architecture
Design Like a Pro: How to Pick the Right System ArchitectureDesign Like a Pro: How to Pick the Right System Architecture
Design Like a Pro: How to Pick the Right System ArchitectureInductive Automation
 
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化NVIDIA Taiwan
 
Nagios Conference 2013 - Rodrigue Chakode - Effective Monitoring for Demanding
Nagios Conference 2013 - Rodrigue Chakode - Effective Monitoring for DemandingNagios Conference 2013 - Rodrigue Chakode - Effective Monitoring for Demanding
Nagios Conference 2013 - Rodrigue Chakode - Effective Monitoring for DemandingNagios
 
IBM IoT Architecture and Capabilities at the Edge and Cloud
IBM IoT Architecture and Capabilities at the Edge and Cloud IBM IoT Architecture and Capabilities at the Edge and Cloud
IBM IoT Architecture and Capabilities at the Edge and Cloud Pradeep Natarajan
 
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB plc
 
FootballX - How to make an online game using serverless
FootballX - How to make an online game using serverlessFootballX - How to make an online game using serverless
FootballX - How to make an online game using serverlessSuat Şahin
 
Solr Power FTW: Powering NoSQL the World Over
Solr Power FTW: Powering NoSQL the World OverSolr Power FTW: Powering NoSQL the World Over
Solr Power FTW: Powering NoSQL the World OverAlex Pinkin
 

Similar to How_to_build_GameServer_2 (20)

NoSQL meetup July 2011
NoSQL meetup July 2011NoSQL meetup July 2011
NoSQL meetup July 2011
 
Tech solutions and tricks in real time mobile multiplayer
Tech solutions and tricks in real time mobile multiplayerTech solutions and tricks in real time mobile multiplayer
Tech solutions and tricks in real time mobile multiplayer
 
How to choose the right web hosting for your business
How to choose the right web hosting for your business How to choose the right web hosting for your business
How to choose the right web hosting for your business
 
In memory grids IMDG
In memory grids IMDGIn memory grids IMDG
In memory grids IMDG
 
Red Hat Gluster Storage Performance
Red Hat Gluster Storage PerformanceRed Hat Gluster Storage Performance
Red Hat Gluster Storage Performance
 
Aerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike Hybrid Memory Architecture
Aerospike Hybrid Memory Architecture
 
(GAM402) Turbine: A Microservice Approach to 3 Billion Game Requests
(GAM402) Turbine: A Microservice Approach to 3 Billion Game Requests(GAM402) Turbine: A Microservice Approach to 3 Billion Game Requests
(GAM402) Turbine: A Microservice Approach to 3 Billion Game Requests
 
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDBEVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
 
Log aggregation and analysis
Log aggregation and analysisLog aggregation and analysis
Log aggregation and analysis
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
 
Design Like a Pro: How to Pick the Right System Architecture
Design Like a Pro: How to Pick the Right System ArchitectureDesign Like a Pro: How to Pick the Right System Architecture
Design Like a Pro: How to Pick the Right System Architecture
 
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
GTC Taiwan 2017 在 Google Cloud 當中使用 GPU 進行效能最佳化
 
Nagios Conference 2013 - Rodrigue Chakode - Effective Monitoring for Demanding
Nagios Conference 2013 - Rodrigue Chakode - Effective Monitoring for DemandingNagios Conference 2013 - Rodrigue Chakode - Effective Monitoring for Demanding
Nagios Conference 2013 - Rodrigue Chakode - Effective Monitoring for Demanding
 
IBM IoT Architecture and Capabilities at the Edge and Cloud
IBM IoT Architecture and Capabilities at the Edge and Cloud IBM IoT Architecture and Capabilities at the Edge and Cloud
IBM IoT Architecture and Capabilities at the Edge and Cloud
 
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance Optimization
 
Search and fpga
Search and fpgaSearch and fpga
Search and fpga
 
FootballX - How to make an online game using serverless
FootballX - How to make an online game using serverlessFootballX - How to make an online game using serverless
FootballX - How to make an online game using serverless
 
Secure Your Encryption with HSM
Secure Your Encryption with HSMSecure Your Encryption with HSM
Secure Your Encryption with HSM
 
Solr Power FTW: Powering NoSQL the World Over
Solr Power FTW: Powering NoSQL the World OverSolr Power FTW: Powering NoSQL the World Over
Solr Power FTW: Powering NoSQL the World Over
 

How_to_build_GameServer_2

  • 1. How to build Game Server 2.0 Peter Rybár
  • 2. Requirements ● Performance – Fast responses < 0.1 s ● Scalability – Number of player sessions ~100k ● High Availability – 24/7 service ● Fault Tolerance – Minimize outages
  • 3. Principles ● Linear Scalability – No manual configuration! – Automatic upscale, downscale ● IMDG – In Memory Data Grid – Distributed data – performance – Replicated IM data – Fault Tolerance (FT) ● Cluster – High Availability (HA) – Zones based on application node roles
  • 4. ● Configuration data – Games, Campaigns… – small volumes – Central data, cacheable – massive reading ● Players data – Wallets, Running game sessions – small volumes – Central data, cacheable – massive reading and writing ● Operation data – Application specific, easy to change – runtime data – Optimized for performance (in memory) – massive reading and writing ● Historical data – Game rounds, sessions – big volumes – Time based stream of events – massive writing – Invoicing, Audit, Replay games – Important for production, not needed for demo / test Data
  • 5. ● Sharding – Horizontal partitioning – Way how to scale Big Data volumes – Way how to scale IO and DB transaction – Storing rows of a same table in multiple databases – Use proper database for specific data category – Some databases are natively sharded – Cassandra, HBase, HDFS, and MongoDB Data management
  • 6. Data sharding ● Algorithmic Sharding – Uniform distribution of data – Determine a given partition’s database without any help ● Dynamic Sharding – Nonuniform distribution of data – Clients need to consult the locator service first ● Entity Groups – Queries within a single physical shard (RDBM) are efficient. – Stronger consistency (ACID) semantics can be achieved within a shard.
  • 7. Game data ● Players data – Entity groups sharding – Sharding by player ID – Partitioning by player, game session ● scalability of sharding while retaining most of its flexibility ● Historical data – Algorithmic sharding – Dynamic sharding ● Polyglot Persistence – using multiple data storage based upon the way data is being used by application
  • 8. Game processing – IO ● Separate game processor code from data ● Separate data persistence from game logic Game Processor Game input Game Output Game Conf Player Wallet Player Wallet Historical Data Random No.
  • 9. Data persistence Polyglot Persistence – using multiple data storage (RDBMS, NoSql, IMDG) based upon the way data is being used by applications Historical Data - Game sessions - Game rounds - Wallet allocations Payers Data - Wallets - Game states - Settings Config Data - Games - Campaign - Currencies Game Server Operation Data Game input Game outputGame processor CGS RNG
  • 10. Architecture – Scaling, FT, HA Game Server Back Office Alarms Business intelligence Game Server Game Server GS zone BO zone A zone BI zone Back Office …… … … Alarms Business intelligence IMDG – in memory data grid
  • 11. Communication – GS↔Casino ● Game Server ↔ Casino platform – Money transaction based protocol – not game based! ● Money transactions are only mandatory to operate – Game specific meta-data – protocol extensions ● Extensions for different types of games – even social gaming – Casino interaction (IO) strategy – scale casino IO !!! ● Session Wallet – IO once per game session ● Deep Wallet – IO once per game round ● Hybrid Wallet – IO based on casino performance – Different strategies for casinos, game types, wallet value, … – Deep Wallet, Session Wallet – only corner cases – One protocol implementation – not two (DW, SW) ● Hybrid Wallet – Simpler casino platform integration
  • 12. Technologies ● Java 8 – streams, lambdas, datetime types, … ● IMDG – Apache Ignite – Clustering – auto cluster discovery – Cache – decrease IO, increase performance – Transactions, concurrency – Memory data replication – FT, HA ● PostgreSQL – best open source RDBMS, JSON support ● Jetty Web server – fast, embedded, lightweight ● DbUtils, Datanucleus – RDMBS persistence ● FasterXML – serializers to JSON, MsgPack, XML ● Signal / Slot pattern – QT like, modularity, reusability ● React – web user interface …
  • 13. Project roadmap ● Summarize requirements – Business and technical requirements ● Technical analysis – GS core functionality, determine modules ● Technical design – Architecture – GS core, GS modules and protocols – Crucial part – Art of SW architecture ● Prototyping of GS 2.0 – Performance tests, Storage tests
  • 14. ● Implementation – build GS 2.0 components – Game server core – Back Office – Alarms – Business Intelligence – Demo Casino Project roadmap
  • 15. Development – Principles ● KISSS – Keep It – Small – Simple – Scalable ● Incrementally deliver – long term project ● Iteration cycle – Build, Prototype – Measure, Test – Learn, Tune – Deliver
  • 16. Development – Methodology ● Scrum – A fundamental time shift – Time-boxing doesn't work sometimes ● Kanban – A fundamental incremental improvements – Can be event-driven instead of time-boxed (scrum) – Can add new items whenever capacity is available – Cross-functional teams, specialist teams allowed => Kanban – suitable for our environment
  • 17. Development – SCM ● Source Code Management ● Human gatekeeper – Workflow – Gatekeeper does code review – Merges the work into the main branch if it meets the necessary standards – Strong source control – My best experience ● Git – distributed, offline work
  • 18. About me – Peter Rybár ● IT Consultant ● Project Leader ● Solutions Architect ● Technology Leader ● Senior Developer ● Certified Scrum Master ● HR consultant ● RNDr., PhD. In Physics ● A-Tech s.r.o. CEO, CTO ● > 20 years of IT experiences ● Dozens of IT projects – as leader, architect, developer ● Senior solution architect: – Softec s.r.o. , Centaur s.r.o. – Davinci software s.r.o. – VECTARY ● Customers: – T-Mobile Slovensko, a.s. – Telefónica O2, s.r.o. – Orange a.s. – Allianz – OVB – SPP – TraviAustria – … http://prest-tech.appspot.com/peter-rybar