SlideShare a Scribd company logo
9th July 2015
An introduction to Redis
by Romain Francez
9th July 2015
Redis
“An in memory non relational database”
“Memcached but better”
“A data structure server”
9th July 2015
Redis is Simple
● Works out of the box
○ No schema
○ No user
○ Default config works just fine
9th July 2015
Redis is Simple
● Key/Value Store
● Simple operations
○ Usually get/set with variations
9th July 2015
Redis is Flexible
● Data types
○ Bitmaps
○ Hashes
○ HyperLogLogs
■ Probabilistic data structure to estimate the cardinality of a set
■ Memory efficient
○ Keys
■ Yes, also a type
■ Anything binary safe (like the content of an image)
○ Lists
○ Sets
○ Sorted Sets
○ Strings
9th July 2015
Redis is Flexible
● Configuration
○ Store denormalised data you can afford to lose?
■ By default in memory + snapshot on the disk
■ Disable the disk writes
○ Use it as a cache?
■ Use a LRU (Least Recently Used) memory policy
9th July 2015
Redis is Flexible
● Custom functions with lua
● Transactions
○ If you need them
● Pub/Sub
○ Isn’t even related to the key space
9th July 2015
Redis is Scalable
● High Availability with Sentinel
○ Configuration based
● Most operations are O(1)
○ But some have high constant time (See some Hyperloglogs commands)
● Non relational database
○ No problems related to scaling relations across servers
● Partitioning
○ With limitations
9th July 2015
Redis Use Cases
“So basically I can do everything and anything
with Redis?”
9th July 2015
Widely adopted
● GitHub
○ Routing, queue, config management
● Instagram
○ Mapping photos with the user that created them
○ Needs the persistence of data on disk
○ Advanced usage of hashes
● StackOverflow
○ Cache
● Twitter
○ Timeline (tweets ordered by ids), ads
○ On disk features not used
○ Added custom data types
● Your favorite video site
○ Hint: not YouTube
○ Sorted sets and hashes
○ Kept MySQL, but no reads from it: use it to populate Redis
9th July 2015
Other Usages
● Autocomplete
● Search engine
● Distributed locking
● Session management
● Leaderboards
9th July 2015
Leaderboard Example
> ZADD leaderboard 13 "Cold" 22 "Cindy" 7 "mymo" 20 "herrrox" 15
"Dreaty" 4 "cqnqr"
(integer) 6
> ZREVRANGE leaderboard 0 2 WITHSCORES
1) "Cindy"
2) "22"
3) "herrrox"
4) "20"
5) "Dreaty"
6) "15"
> ZRANGE leaderboard 0 0 WITHSCORES
1) "cqnqr"
2) "4"
9th July 2015
Leaderboard Example
> ZINCRBY leaderboard 20 "cqnqr"
"24"
> ZREVRANK leaderboard "cqnqr"
(integer) 0
9th July 2015
Leaderboard Example
> ZCARD leaderboard
(integer) 6
> ZADD leaderboard 7 "BaDy"
(integer) 1
> ZCARD leaderboard
(integer) 7
> ZREM leaderboard "mymo"
(integer) 1
> ZCARD leaderboard
(integer) 6
9th July 2015
Conclusion
● Redis can be used for any of your needs
○ You might have to get into advanced stuff though
● Handles well lots of data
9th July 2015
Thanks
Any questions ?
9th July 2015
Join the community !
(in Paris)
Social networks :
● Follow us on Twitter : https://twitter.com/steamlearn
● Like us on Facebook : https://www.facebook.com/steamlearn
SteamLearn is an Inovia initiative : inovia.fr
You wish to be in the audience ? Join the meetup group!
http://www.meetup.com/Steam-Learn/

More Related Content

What's hot

Xldb2011 tue 1120_youtube_datawarehouse
Xldb2011 tue 1120_youtube_datawarehouseXldb2011 tue 1120_youtube_datawarehouse
Xldb2011 tue 1120_youtube_datawarehouse
liqiang xu
 
Nosql databases for the .net developer
Nosql databases for the .net developerNosql databases for the .net developer
Nosql databases for the .net developer
Jesus Rodriguez
 
Ruby for soul of BigData Nerds
Ruby for soul of BigData NerdsRuby for soul of BigData Nerds
Ruby for soul of BigData Nerds
Abhishek Parolkar
 

What's hot (20)

JCDL 2016 Doctoral Consortium - Web Archive Profiling
JCDL 2016 Doctoral Consortium - Web Archive ProfilingJCDL 2016 Doctoral Consortium - Web Archive Profiling
JCDL 2016 Doctoral Consortium - Web Archive Profiling
 
Xldb2011 tue 1120_youtube_datawarehouse
Xldb2011 tue 1120_youtube_datawarehouseXldb2011 tue 1120_youtube_datawarehouse
Xldb2011 tue 1120_youtube_datawarehouse
 
Nosql databases for the .net developer
Nosql databases for the .net developerNosql databases for the .net developer
Nosql databases for the .net developer
 
Drupal and the Semantic Web
Drupal and the Semantic WebDrupal and the Semantic Web
Drupal and the Semantic Web
 
Redis - Your Magical superfast database
Redis - Your Magical superfast databaseRedis - Your Magical superfast database
Redis - Your Magical superfast database
 
Введение в Apache Cassandra
Введение в Apache CassandraВведение в Apache Cassandra
Введение в Apache Cassandra
 
Mongo db cluster administration and Shredded Databases
Mongo db cluster administration and Shredded DatabasesMongo db cluster administration and Shredded Databases
Mongo db cluster administration and Shredded Databases
 
Davraz - A graph visualization and exploration software.
Davraz - A graph visualization and exploration software.Davraz - A graph visualization and exploration software.
Davraz - A graph visualization and exploration software.
 
Ruby for soul of BigData Nerds
Ruby for soul of BigData NerdsRuby for soul of BigData Nerds
Ruby for soul of BigData Nerds
 
Mongo db intro new
Mongo db intro newMongo db intro new
Mongo db intro new
 
shark attack on sql-on-hadoop Talk at BerlinBuzzwords 2014
shark attack on sql-on-hadoop Talk at BerlinBuzzwords 2014shark attack on sql-on-hadoop Talk at BerlinBuzzwords 2014
shark attack on sql-on-hadoop Talk at BerlinBuzzwords 2014
 
Introduction to new high performance storage engines in mongodb 3.0
Introduction to new high performance storage engines in mongodb 3.0Introduction to new high performance storage engines in mongodb 3.0
Introduction to new high performance storage engines in mongodb 3.0
 
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQLFirst steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
 
Austin bdug 2011_01_27_small_and_big_data
Austin bdug 2011_01_27_small_and_big_dataAustin bdug 2011_01_27_small_and_big_data
Austin bdug 2011_01_27_small_and_big_data
 
MongoDB World 2019: Polyglot Persistence with MongoDB: What You Need to Know ...
MongoDB World 2019: Polyglot Persistence with MongoDB: What You Need to Know ...MongoDB World 2019: Polyglot Persistence with MongoDB: What You Need to Know ...
MongoDB World 2019: Polyglot Persistence with MongoDB: What You Need to Know ...
 
Lt2013 glusterfs.talk
Lt2013 glusterfs.talkLt2013 glusterfs.talk
Lt2013 glusterfs.talk
 
Cloud Optimized GeotTIFFs: enabling efficient cloud workflows
Cloud Optimized GeotTIFFs: enabling efficient cloud workflows Cloud Optimized GeotTIFFs: enabling efficient cloud workflows
Cloud Optimized GeotTIFFs: enabling efficient cloud workflows
 
anticorrp
anticorrpanticorrp
anticorrp
 
DBpedia+ / DBpedia meeting in Dublin
DBpedia+ / DBpedia meeting in DublinDBpedia+ / DBpedia meeting in Dublin
DBpedia+ / DBpedia meeting in Dublin
 
Cloud talk
Cloud talkCloud talk
Cloud talk
 

Viewers also liked

Valve corporation
Valve corporationValve corporation
Valve corporation
繼仁 苗
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
Sumit Jain
 

Viewers also liked (16)

Mike Rose: How well do games sell in 2015?
Mike Rose: How well do games sell in 2015?Mike Rose: How well do games sell in 2015?
Mike Rose: How well do games sell in 2015?
 
Getting Started with STEAM
Getting Started with STEAMGetting Started with STEAM
Getting Started with STEAM
 
Steam presentation
Steam presentationSteam presentation
Steam presentation
 
Introduction to Game (Paper) Prototyping and Research
Introduction to Game (Paper) Prototyping and ResearchIntroduction to Game (Paper) Prototyping and Research
Introduction to Game (Paper) Prototyping and Research
 
The History of The Steam Engine
The History of The Steam EngineThe History of The Steam Engine
The History of The Steam Engine
 
Valve corporation
Valve corporationValve corporation
Valve corporation
 
Hazelcast - In-Memory DataGrid
Hazelcast - In-Memory DataGridHazelcast - In-Memory DataGrid
Hazelcast - In-Memory DataGrid
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Steam and its properties
Steam and its propertiesSteam and its properties
Steam and its properties
 
Ppt of properties of steam
Ppt of properties of steamPpt of properties of steam
Ppt of properties of steam
 
Steam Basics
Steam BasicsSteam Basics
Steam Basics
 
Steam engine
Steam engineSteam engine
Steam engine
 
You probably don't need microservices
You probably don't need microservicesYou probably don't need microservices
You probably don't need microservices
 
Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?
 
Valves presentation
Valves presentationValves presentation
Valves presentation
 
Steam turbine
Steam turbineSteam turbine
Steam turbine
 

Similar to Steam Learn: An introduction to Redis

MySQL 5.6 Performance
MySQL 5.6 PerformanceMySQL 5.6 Performance
MySQL 5.6 Performance
MYXPLAIN
 

Similar to Steam Learn: An introduction to Redis (20)

Mongo nyc nyt + mongodb
Mongo nyc nyt + mongodbMongo nyc nyt + mongodb
Mongo nyc nyt + mongodb
 
Piano Media - approach to data gathering and processing
Piano Media - approach to data gathering and processingPiano Media - approach to data gathering and processing
Piano Media - approach to data gathering and processing
 
Identifying Web Attacks Via Data Analysis
Identifying Web Attacks Via Data AnalysisIdentifying Web Attacks Via Data Analysis
Identifying Web Attacks Via Data Analysis
 
TRHUG 2015 - Veloxity Big Data Migration Use Case
TRHUG 2015 - Veloxity Big Data Migration Use CaseTRHUG 2015 - Veloxity Big Data Migration Use Case
TRHUG 2015 - Veloxity Big Data Migration Use Case
 
The Internet in Database: A Cassandra Use Case
The Internet in Database: A Cassandra Use CaseThe Internet in Database: A Cassandra Use Case
The Internet in Database: A Cassandra Use Case
 
Scaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQLScaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQL
 
Scalable, good, cheap
Scalable, good, cheapScalable, good, cheap
Scalable, good, cheap
 
MySQL 5.6 Performance
MySQL 5.6 PerformanceMySQL 5.6 Performance
MySQL 5.6 Performance
 
Dirty data? Clean it up! - Datapalooza Denver 2016
Dirty data? Clean it up! - Datapalooza Denver 2016Dirty data? Clean it up! - Datapalooza Denver 2016
Dirty data? Clean it up! - Datapalooza Denver 2016
 
LITA Forum 2014 - Using Islandora for Digital Content Delivery
LITA Forum 2014 - Using Islandora for Digital Content DeliveryLITA Forum 2014 - Using Islandora for Digital Content Delivery
LITA Forum 2014 - Using Islandora for Digital Content Delivery
 
Tools and libraries for common problems (Early Draft)
Tools and libraries for common problems (Early Draft)Tools and libraries for common problems (Early Draft)
Tools and libraries for common problems (Early Draft)
 
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
 
Near Real-Time Netflix Recommendations Using Apache Spark Streaming with Nit...
 Near Real-Time Netflix Recommendations Using Apache Spark Streaming with Nit... Near Real-Time Netflix Recommendations Using Apache Spark Streaming with Nit...
Near Real-Time Netflix Recommendations Using Apache Spark Streaming with Nit...
 
RealTime Recommendations @Netflix - Spark
RealTime Recommendations @Netflix - SparkRealTime Recommendations @Netflix - Spark
RealTime Recommendations @Netflix - Spark
 
Near Real-Time Netflix Recommendations Using Apache Spark Streaming
Near Real-Time Netflix Recommendations Using Apache Spark Streaming Near Real-Time Netflix Recommendations Using Apache Spark Streaming
Near Real-Time Netflix Recommendations Using Apache Spark Streaming
 
Data analysis in JavaScript
Data analysis in JavaScriptData analysis in JavaScript
Data analysis in JavaScript
 
MongoDB Schema Design Tips & Tricks
MongoDB Schema Design Tips & TricksMongoDB Schema Design Tips & Tricks
MongoDB Schema Design Tips & Tricks
 
(some) Drupal Theming by Ryan Price
(some) Drupal Theming by Ryan Price(some) Drupal Theming by Ryan Price
(some) Drupal Theming by Ryan Price
 
A cautionary tale of agile project management
A cautionary tale of agile project managementA cautionary tale of agile project management
A cautionary tale of agile project management
 
Digibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalableDigibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalable
 

More from inovia

Steam Learn: Faster php testing process with Atoum
Steam Learn: Faster php testing process with AtoumSteam Learn: Faster php testing process with Atoum
Steam Learn: Faster php testing process with Atoum
inovia
 

More from inovia (20)

10 tips for Redux at scale
10 tips for Redux at scale10 tips for Redux at scale
10 tips for Redux at scale
 
10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services
 
Redux at scale
Redux at scaleRedux at scale
Redux at scale
 
DocuSign's Road to react
DocuSign's Road to reactDocuSign's Road to react
DocuSign's Road to react
 
API Gateway: Nginx way
API Gateway: Nginx wayAPI Gateway: Nginx way
API Gateway: Nginx way
 
Kafka: meetup microservice
Kafka: meetup microserviceKafka: meetup microservice
Kafka: meetup microservice
 
Microservice: starting point
Microservice:  starting pointMicroservice:  starting point
Microservice: starting point
 
Correlation id (tid)
Correlation id (tid)Correlation id (tid)
Correlation id (tid)
 
Meetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservicesMeetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservices
 
Security in microservices architectures
Security in microservices architecturesSecurity in microservices architectures
Security in microservices architectures
 
Building a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice ApplicationsBuilding a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice Applications
 
Microservices vs SOA
Microservices vs SOAMicroservices vs SOA
Microservices vs SOA
 
CQRS, an introduction by JC Bohin
CQRS, an introduction by JC BohinCQRS, an introduction by JC Bohin
CQRS, an introduction by JC Bohin
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Oauth2, open-id connect with microservices
Oauth2, open-id connect with microservicesOauth2, open-id connect with microservices
Oauth2, open-id connect with microservices
 
Steam Learn: Speedrun et TAS
Steam Learn: Speedrun et TASSteam Learn: Speedrun et TAS
Steam Learn: Speedrun et TAS
 
Steam Learn: Asynchronous Javascript
Steam Learn: Asynchronous JavascriptSteam Learn: Asynchronous Javascript
Steam Learn: Asynchronous Javascript
 
Steam Learn: Cheat sheet for Vim
Steam Learn: Cheat sheet for VimSteam Learn: Cheat sheet for Vim
Steam Learn: Cheat sheet for Vim
 
Steam Learn: REST Good practices
Steam Learn: REST Good practicesSteam Learn: REST Good practices
Steam Learn: REST Good practices
 
Steam Learn: Faster php testing process with Atoum
Steam Learn: Faster php testing process with AtoumSteam Learn: Faster php testing process with Atoum
Steam Learn: Faster php testing process with Atoum
 

Recently uploaded

Recently uploaded (20)

How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 

Steam Learn: An introduction to Redis

  • 1. 9th July 2015 An introduction to Redis by Romain Francez
  • 2. 9th July 2015 Redis “An in memory non relational database” “Memcached but better” “A data structure server”
  • 3. 9th July 2015 Redis is Simple ● Works out of the box ○ No schema ○ No user ○ Default config works just fine
  • 4. 9th July 2015 Redis is Simple ● Key/Value Store ● Simple operations ○ Usually get/set with variations
  • 5. 9th July 2015 Redis is Flexible ● Data types ○ Bitmaps ○ Hashes ○ HyperLogLogs ■ Probabilistic data structure to estimate the cardinality of a set ■ Memory efficient ○ Keys ■ Yes, also a type ■ Anything binary safe (like the content of an image) ○ Lists ○ Sets ○ Sorted Sets ○ Strings
  • 6. 9th July 2015 Redis is Flexible ● Configuration ○ Store denormalised data you can afford to lose? ■ By default in memory + snapshot on the disk ■ Disable the disk writes ○ Use it as a cache? ■ Use a LRU (Least Recently Used) memory policy
  • 7. 9th July 2015 Redis is Flexible ● Custom functions with lua ● Transactions ○ If you need them ● Pub/Sub ○ Isn’t even related to the key space
  • 8. 9th July 2015 Redis is Scalable ● High Availability with Sentinel ○ Configuration based ● Most operations are O(1) ○ But some have high constant time (See some Hyperloglogs commands) ● Non relational database ○ No problems related to scaling relations across servers ● Partitioning ○ With limitations
  • 9. 9th July 2015 Redis Use Cases “So basically I can do everything and anything with Redis?”
  • 10. 9th July 2015 Widely adopted ● GitHub ○ Routing, queue, config management ● Instagram ○ Mapping photos with the user that created them ○ Needs the persistence of data on disk ○ Advanced usage of hashes ● StackOverflow ○ Cache ● Twitter ○ Timeline (tweets ordered by ids), ads ○ On disk features not used ○ Added custom data types ● Your favorite video site ○ Hint: not YouTube ○ Sorted sets and hashes ○ Kept MySQL, but no reads from it: use it to populate Redis
  • 11. 9th July 2015 Other Usages ● Autocomplete ● Search engine ● Distributed locking ● Session management ● Leaderboards
  • 12. 9th July 2015 Leaderboard Example > ZADD leaderboard 13 "Cold" 22 "Cindy" 7 "mymo" 20 "herrrox" 15 "Dreaty" 4 "cqnqr" (integer) 6 > ZREVRANGE leaderboard 0 2 WITHSCORES 1) "Cindy" 2) "22" 3) "herrrox" 4) "20" 5) "Dreaty" 6) "15" > ZRANGE leaderboard 0 0 WITHSCORES 1) "cqnqr" 2) "4"
  • 13. 9th July 2015 Leaderboard Example > ZINCRBY leaderboard 20 "cqnqr" "24" > ZREVRANK leaderboard "cqnqr" (integer) 0
  • 14. 9th July 2015 Leaderboard Example > ZCARD leaderboard (integer) 6 > ZADD leaderboard 7 "BaDy" (integer) 1 > ZCARD leaderboard (integer) 7 > ZREM leaderboard "mymo" (integer) 1 > ZCARD leaderboard (integer) 6
  • 15. 9th July 2015 Conclusion ● Redis can be used for any of your needs ○ You might have to get into advanced stuff though ● Handles well lots of data
  • 17. 9th July 2015 Join the community ! (in Paris) Social networks : ● Follow us on Twitter : https://twitter.com/steamlearn ● Like us on Facebook : https://www.facebook.com/steamlearn SteamLearn is an Inovia initiative : inovia.fr You wish to be in the audience ? Join the meetup group! http://www.meetup.com/Steam-Learn/