SlideShare uma empresa Scribd logo
1 de 10
Creating Gaming Leaderboards
Using Redis
Ronny López
Technical Lead Backend
Ronny.lopez@socialpoint.es
Leaderboards
• Effective way to show where a user stands within a gamified
system
• Absolute leaderboards – incentivize
• Relative leaderboards – avoid disengagement of players at
lower end of rankings
• Several type of rankings (weekly, monthly, friends, …)

2
3
4
5
Requirements
•
•
•
•
•
•
•

Add member
Remove member
Update member score
Find member score
Find member rank
Associate data to members (Name, Alliance, etc…)
Get slices of the ranking (for pagination)
6
Architecture
 Scalable to serve several million active users
 Performance is a must

7
Implementation
•
•
•
•
•
•

Redis data structure server
Sorted set data structure
Different sorted sets for different kinds of rankings
Redis hash data structure for member associated data
Lua scripting for aggregating in-memory data
(Sorted) Sets operations (union, intersection, etc…)

8
Challenges
• Horizontal scaling
• It is not possible to shard a dataset with a single huge key like a
very big sorted set
• Two-phase commits if you want to execute a transaction
among different data stores

9
Summary
• Redis is the right tool for the job, but datasets can not be bigger
than memory
• Exceptional performance (more than 8K leaderboard ops per
second in a single instance)
• Easy to use and understand technology
• Mature and open source

10

Mais conteúdo relacionado

Mais procurados

RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
Redis Labs
 

Mais procurados (20)

MongoDB Administration 101
MongoDB Administration 101MongoDB Administration 101
MongoDB Administration 101
 
Netezza online training at GoLogica
Netezza online training at GoLogicaNetezza online training at GoLogica
Netezza online training at GoLogica
 
SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.
 
An Introduction to Druid
An Introduction to DruidAn Introduction to Druid
An Introduction to Druid
 
Koha System Architecture
Koha System ArchitectureKoha System Architecture
Koha System Architecture
 
CosmosDb for beginners
CosmosDb for beginnersCosmosDb for beginners
CosmosDb for beginners
 
Introduction to Total Library Solution- TLS
Introduction to Total Library Solution- TLSIntroduction to Total Library Solution- TLS
Introduction to Total Library Solution- TLS
 
Build an Intelligent Bot
Build an Intelligent BotBuild an Intelligent Bot
Build an Intelligent Bot
 
Nashville analytics summit aug9 no sql mike king dell v1.5
Nashville analytics summit aug9 no sql mike king dell v1.5Nashville analytics summit aug9 no sql mike king dell v1.5
Nashville analytics summit aug9 no sql mike king dell v1.5
 
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
 
Azure CosmosDB
Azure CosmosDBAzure CosmosDB
Azure CosmosDB
 
Aruman Cassandra database
Aruman Cassandra databaseAruman Cassandra database
Aruman Cassandra database
 
Writing Space and the Cassandra NoSQL DBMS
Writing Space and the Cassandra NoSQL DBMSWriting Space and the Cassandra NoSQL DBMS
Writing Space and the Cassandra NoSQL DBMS
 
Maria DBMS
Maria DBMSMaria DBMS
Maria DBMS
 
SQL vs NoSQL: Big Data Adoption & Success in the Enterprise
SQL vs NoSQL: Big Data Adoption & Success in the EnterpriseSQL vs NoSQL: Big Data Adoption & Success in the Enterprise
SQL vs NoSQL: Big Data Adoption & Success in the Enterprise
 
Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010
 
Lessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companiesLessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companies
 
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
 
Sql server 2017_editions_datasheet
Sql server 2017_editions_datasheetSql server 2017_editions_datasheet
Sql server 2017_editions_datasheet
 
MS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for DevelopersMS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for Developers
 

Semelhante a Creating Game Leaderboards with Redis

Data Privacy at Scale
Data Privacy at ScaleData Privacy at Scale
Data Privacy at Scale
DataWorks Summit
 
High Performance data mining platforms-Things to consider
High Performance data mining platforms-Things to considerHigh Performance data mining platforms-Things to consider
High Performance data mining platforms-Things to consider
Ashish Jain
 
Presentation 1 - SSRS (1)
Presentation 1 - SSRS (1)Presentation 1 - SSRS (1)
Presentation 1 - SSRS (1)
Anurag Rana
 
Database development progress(database)
Database development progress(database)Database development progress(database)
Database development progress(database)
welcometofacebook
 
Office365 Governance Is Changing!!
Office365 Governance Is Changing!!Office365 Governance Is Changing!!
Office365 Governance Is Changing!!
Stacy Deere
 

Semelhante a Creating Game Leaderboards with Redis (20)

Redis data structure and Performance Optimization
Redis data structure and Performance OptimizationRedis data structure and Performance Optimization
Redis data structure and Performance Optimization
 
RowanDay4.pptx
RowanDay4.pptxRowanDay4.pptx
RowanDay4.pptx
 
Data Driving Yahoo Mail Growth and Evolution with a 50 PB Hadoop Warehouse
Data Driving Yahoo Mail Growth and Evolution with a 50 PB Hadoop WarehouseData Driving Yahoo Mail Growth and Evolution with a 50 PB Hadoop Warehouse
Data Driving Yahoo Mail Growth and Evolution with a 50 PB Hadoop Warehouse
 
Redis - Your Magical superfast database
Redis - Your Magical superfast databaseRedis - Your Magical superfast database
Redis - Your Magical superfast database
 
Data Privacy at Scale
Data Privacy at ScaleData Privacy at Scale
Data Privacy at Scale
 
High Performance data mining platforms-Things to consider
High Performance data mining platforms-Things to considerHigh Performance data mining platforms-Things to consider
High Performance data mining platforms-Things to consider
 
Neo4j GraphDay Seattle- Sept19- in the enterprise
Neo4j GraphDay Seattle- Sept19-  in the enterpriseNeo4j GraphDay Seattle- Sept19-  in the enterprise
Neo4j GraphDay Seattle- Sept19- in the enterprise
 
11 Strategic Considerations for SharePoint Migration presented by Christian B...
11 Strategic Considerations for SharePoint Migration presented by Christian B...11 Strategic Considerations for SharePoint Migration presented by Christian B...
11 Strategic Considerations for SharePoint Migration presented by Christian B...
 
1 Information Systems Analysis & Design,.pptx
1 Information Systems Analysis & Design,.pptx1 Information Systems Analysis & Design,.pptx
1 Information Systems Analysis & Design,.pptx
 
MongoDB Europe 2016 - The Rise of the Data Lake
MongoDB Europe 2016 - The Rise of the Data LakeMongoDB Europe 2016 - The Rise of the Data Lake
MongoDB Europe 2016 - The Rise of the Data Lake
 
MongoDB Revised Sharding Guidelines MongoDB 3.x_Kimberly_Wilkins
MongoDB Revised Sharding Guidelines MongoDB 3.x_Kimberly_WilkinsMongoDB Revised Sharding Guidelines MongoDB 3.x_Kimberly_Wilkins
MongoDB Revised Sharding Guidelines MongoDB 3.x_Kimberly_Wilkins
 
Power BI Overview
Power BI OverviewPower BI Overview
Power BI Overview
 
SharePoint Custom Development
SharePoint Custom DevelopmentSharePoint Custom Development
SharePoint Custom Development
 
Building a Modern Data Architecture by Ben Sharma at Strata + Hadoop World Sa...
Building a Modern Data Architecture by Ben Sharma at Strata + Hadoop World Sa...Building a Modern Data Architecture by Ben Sharma at Strata + Hadoop World Sa...
Building a Modern Data Architecture by Ben Sharma at Strata + Hadoop World Sa...
 
Foundations of business intelligence databases and information management
Foundations of business intelligence databases and information managementFoundations of business intelligence databases and information management
Foundations of business intelligence databases and information management
 
Presentation 1 - SSRS (1)
Presentation 1 - SSRS (1)Presentation 1 - SSRS (1)
Presentation 1 - SSRS (1)
 
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
 
Tips and tricks for complex migrations to SharePoint Online
Tips and tricks for complex migrations to SharePoint OnlineTips and tricks for complex migrations to SharePoint Online
Tips and tricks for complex migrations to SharePoint Online
 
Database development progress(database)
Database development progress(database)Database development progress(database)
Database development progress(database)
 
Office365 Governance Is Changing!!
Office365 Governance Is Changing!!Office365 Governance Is Changing!!
Office365 Governance Is Changing!!
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Creating Game Leaderboards with Redis

  • 1. Creating Gaming Leaderboards Using Redis Ronny López Technical Lead Backend Ronny.lopez@socialpoint.es
  • 2. Leaderboards • Effective way to show where a user stands within a gamified system • Absolute leaderboards – incentivize • Relative leaderboards – avoid disengagement of players at lower end of rankings • Several type of rankings (weekly, monthly, friends, …) 2
  • 3. 3
  • 4. 4
  • 5. 5
  • 6. Requirements • • • • • • • Add member Remove member Update member score Find member score Find member rank Associate data to members (Name, Alliance, etc…) Get slices of the ranking (for pagination) 6
  • 7. Architecture  Scalable to serve several million active users  Performance is a must 7
  • 8. Implementation • • • • • • Redis data structure server Sorted set data structure Different sorted sets for different kinds of rankings Redis hash data structure for member associated data Lua scripting for aggregating in-memory data (Sorted) Sets operations (union, intersection, etc…) 8
  • 9. Challenges • Horizontal scaling • It is not possible to shard a dataset with a single huge key like a very big sorted set • Two-phase commits if you want to execute a transaction among different data stores 9
  • 10. Summary • Redis is the right tool for the job, but datasets can not be bigger than memory • Exceptional performance (more than 8K leaderboard ops per second in a single instance) • Easy to use and understand technology • Mature and open source 10