SlideShare a Scribd company logo
By: Vishal Sahu
Agenda
What is Redis?
History
Installation
Sample commands
Redis with Grails
Demo
Case Studies
What is Redis?
Redis means REmote DIrectory Server.
Redis is an advanced key-value NoSQL data store.
It is similar to memcached except the dataset is not volatile. Like memcached,
Redis can store string values, but it can also store lists, sets, and ordered sets.
All these data types can be manipulated with atomic operations that push,
pop, add and remove elements, perform server side union, intersection,
difference between sets, and more.
Redis also supports different kinds of sorting.
History
Early 2009 - Salvatore Sanfilippo, an Italian developer, started the Redis project
He was working on a real-time web analytics solution and found that MySQL could not
provide the necessary performance.
June 2009 - Redis was deployed in production for the LLOOGG real-time web analytics
website
March 2010 - VMWare hired Sanfilippo to work full-time on Redis (remains BSD licensed)
Subsequently, VMWare hired Pieter Noordhuis, a major Redis contributor, to assist on
the project.
Who’s using Redis?
Twitter
GitHub
Weibo
Pinterest
Snapchat
Craigslist
Digg
StackOverflow
Installation
sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server
Start/Stop:
sudo service redis-server start
sudo service redis-server stop
redis-benchmark
Sample Commands
Command Line : redis-cli
SET users:GeorgeWashington "job: President, born:1732, dislikes: cherry trees"
GET users:GeorgeWashington
> SET population 6
OK
> INCRBY population 10
(integer) 16
> INCR population
(integer) 17
Data Model
Redis with Grails
Plugin: https://grails.org/plugin/redis
The Redis plugin provides integration with a Redis datastore.
This plugin gives grails apps a pooled connection to a Redis instance and provides a number
of helper methods and caching/memoization methods that can greatly speed up your
application performance.
Redis with Grails
def redisService
The redisService bean wraps the pool connection. It has a number of
caching/memoization helper functions, template methods, and basic Redis
commands, it will be your primary interface to Redis.
redisService.foo = "bar"
assert "bar" == redisService.foo
redisService.sadd("months", "february")
assert true == redisService.sismember("months", "february")
Demo
Memoization
Memoization is a write-through caching technique. The plugin gives a number of methods that take a key
name, and a closure as parameters. These methods first check Redis to see if the key exists. If it does, it
returns the value of the key and does not execute the closure. If it does not exist in Redis, it executes the
closure and saves the result in Redis under the key. Subsequent calls will then be served the cached value
from Redis rather than recalculating.
This technique is very useful for caching values that are frequently requested but expensive to calculate.
Demo
Redis Taglib
The redis:memoize TagLib lets you leverage memoization within your GSP files. Wrap it
around any expensive to generate text and it will cache it and quickly serve it from Redis.
<redis:memoize key="mykey" expire="3600">
<!--
insert expensive to generate GSP content here
taglib body will be executed once, subsequent calls
will pull from redis till the key expires
-->
<div id='header'>
... expensive header stuff here that can be cached ...
</div>
</redis:memoize>
Demo
Redis Session Plugin
Stores HTTP sessions in a Redis data store.
This plugin lets you store HTTP session data in a redis store using Database
Session Plugin.
https://grails.org/plugin/redis-database-session
Redis Persistence
#Snapshotting (RDB) : Snapshots at predefined intervals, which may also
depend on the number of changes. Any changes between these intervals will be
lost at a power failure or crash.
# Append-Only files (AOF): Writing a kind of change log at every data change.
You can fine-tune how often this is physically written to the disk, but if you chose to
always write immediately (which will cost you some performance), then there will be
no data loss caused by the in-memory nature of Redis
Redis @ Twitter
Redis on Twitter supports over 30 billion timeline updates per day based on
5000 tweets per second or 400,000,000 tweets per day.
There is no doubt, Twitter’s infrastructure deals with extremely high scale
demands. So, next time you get a Tweet from Katy Perry, remember 39 million
inserts just occurred on Redis.
While there might be 5000 tweets per second on average and peaks up to
12,000, views are actually what keeps the datastore busy. There are over
300,000 queries per second on home timelines and 30,000 on search-based
timelines.
Redis @ Pinterest
Things which Redis stores for a Pinterest Profile.
A list of users who you follow
A list of boards (and their related users) who you follow
A list of your followers
A list of people who follow your boards
A list of boards you follow
A list of boards you unfollowed after following a user
The followers and unfollowers of each board
Redis stores the above lists for each of it’s 70 million users—it basically stores the entire
follower graph.
References
https://grails.org/plugin/redis
https://github.com/grails-plugins/grails-redis
http://techstacks.io/tech/redis
http://www.slideshare.net/tednaleid/redis-and-groovy-and-grails-gr8conf-2011
https://cs.brown.edu/courses/cs227/archives/2011/slides/mar07-redis.pdf
http://stackoverflow.com/questions/10558465/memcached-vs-redis
http://blog.andolasoft.com/2014/02/memcached-vs-redis-which-one-to-pick-for-large-web-app.html
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis
Thanks :)
Questions?
Shoot them at vishal@nexthoughts.com

More Related Content

What's hot

redis basics
redis basicsredis basics
redis basics
Manoj Kumar
 
Redis database
Redis databaseRedis database
Redis database
Ñáwrás Ñzár
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Arnab Mitra
 
Redis Introduction
Redis IntroductionRedis Introduction
Redis IntroductionAlex Su
 
Introduction to redis - version 2
Introduction to redis - version 2Introduction to redis - version 2
Introduction to redis - version 2
Dvir Volk
 
An Introduction to Redis for Developers.pdf
An Introduction to Redis for Developers.pdfAn Introduction to Redis for Developers.pdf
An Introduction to Redis for Developers.pdf
Stephen Lorello
 
Redis Overview
Redis OverviewRedis Overview
Redis Overview
Hoang Long
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
Eugene Fidelin
 
Redis overview
Redis overviewRedis overview
Redis overview
Ahmad El-khuja
 
Découverte de Redis
Découverte de RedisDécouverte de Redis
Découverte de RedisJEMLI Fathi
 
Redis in Practice
Redis in PracticeRedis in Practice
Redis in Practice
Noah Davis
 
mongodb와 mysql의 CRUD 연산의 성능 비교
mongodb와 mysql의 CRUD 연산의 성능 비교mongodb와 mysql의 CRUD 연산의 성능 비교
mongodb와 mysql의 CRUD 연산의 성능 비교Woo Yeong Choi
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
NeoClova
 
Redis and it's data types
Redis and it's data typesRedis and it's data types
Redis and it's data types
Aniruddha Chakrabarti
 
Maxscale_메뉴얼
Maxscale_메뉴얼Maxscale_메뉴얼
Maxscale_메뉴얼
NeoClova
 
InnoDB Internal
InnoDB InternalInnoDB Internal
InnoDB Internal
mysqlops
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Mydbops
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
Mydbops
 
PostgreSQL Replication Tutorial
PostgreSQL Replication TutorialPostgreSQL Replication Tutorial
PostgreSQL Replication Tutorial
Hans-Jürgen Schönig
 

What's hot (20)

redis basics
redis basicsredis basics
redis basics
 
Redis database
Redis databaseRedis database
Redis database
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Redis Introduction
Redis IntroductionRedis Introduction
Redis Introduction
 
Introduction to redis - version 2
Introduction to redis - version 2Introduction to redis - version 2
Introduction to redis - version 2
 
An Introduction to Redis for Developers.pdf
An Introduction to Redis for Developers.pdfAn Introduction to Redis for Developers.pdf
An Introduction to Redis for Developers.pdf
 
Redis Overview
Redis OverviewRedis Overview
Redis Overview
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
 
Redis overview
Redis overviewRedis overview
Redis overview
 
Découverte de Redis
Découverte de RedisDécouverte de Redis
Découverte de Redis
 
Redis 101
Redis 101Redis 101
Redis 101
 
Redis in Practice
Redis in PracticeRedis in Practice
Redis in Practice
 
mongodb와 mysql의 CRUD 연산의 성능 비교
mongodb와 mysql의 CRUD 연산의 성능 비교mongodb와 mysql의 CRUD 연산의 성능 비교
mongodb와 mysql의 CRUD 연산의 성능 비교
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
 
Redis and it's data types
Redis and it's data typesRedis and it's data types
Redis and it's data types
 
Maxscale_메뉴얼
Maxscale_메뉴얼Maxscale_메뉴얼
Maxscale_메뉴얼
 
InnoDB Internal
InnoDB InternalInnoDB Internal
InnoDB Internal
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
PostgreSQL Replication Tutorial
PostgreSQL Replication TutorialPostgreSQL Replication Tutorial
PostgreSQL Replication Tutorial
 

Viewers also liked

Elastic search
Elastic searchElastic search
Elastic search
NexThoughts Technologies
 
Advanced criteria queries
Advanced criteria queriesAdvanced criteria queries
Advanced criteria queries
NexThoughts Technologies
 
Grails Custom Plugin
Grails Custom PluginGrails Custom Plugin
Grails Custom Plugin
NexThoughts Technologies
 
Grails audit logging
Grails audit loggingGrails audit logging
Grails audit logging
NexThoughts Technologies
 
G pars
G parsG pars
Grails custom tag lib
Grails custom tag libGrails custom tag lib
Grails custom tag lib
NexThoughts Technologies
 
Grails internationalization-160524154831
Grails internationalization-160524154831Grails internationalization-160524154831
Grails internationalization-160524154831
NexThoughts Technologies
 
Bootcamp linux commands
Bootcamp linux commandsBootcamp linux commands
Bootcamp linux commands
NexThoughts Technologies
 
Angular 2 - An Introduction
Angular 2 - An IntroductionAngular 2 - An Introduction
Angular 2 - An Introduction
NexThoughts Technologies
 
Spring boot
Spring bootSpring boot
Twilio
TwilioTwilio
Gorm
GormGorm
Mixpanel
MixpanelMixpanel
Apache kafka
Apache kafkaApache kafka
MetaProgramming with Groovy
MetaProgramming with GroovyMetaProgramming with Groovy
MetaProgramming with Groovy
NexThoughts Technologies
 
Java reflection
Java reflectionJava reflection
Java reflection
NexThoughts Technologies
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
NexThoughts Technologies
 
Grails Plugins(Console, DB Migration, Asset Pipeline and Remote pagination)
Grails Plugins(Console, DB Migration, Asset Pipeline and Remote pagination)Grails Plugins(Console, DB Migration, Asset Pipeline and Remote pagination)
Grails Plugins(Console, DB Migration, Asset Pipeline and Remote pagination)
NexThoughts Technologies
 
Grails services
Grails servicesGrails services
Grails services
NexThoughts Technologies
 
Grails Controllers
Grails ControllersGrails Controllers
Grails Controllers
NexThoughts Technologies
 

Viewers also liked (20)

Elastic search
Elastic searchElastic search
Elastic search
 
Advanced criteria queries
Advanced criteria queriesAdvanced criteria queries
Advanced criteria queries
 
Grails Custom Plugin
Grails Custom PluginGrails Custom Plugin
Grails Custom Plugin
 
Grails audit logging
Grails audit loggingGrails audit logging
Grails audit logging
 
G pars
G parsG pars
G pars
 
Grails custom tag lib
Grails custom tag libGrails custom tag lib
Grails custom tag lib
 
Grails internationalization-160524154831
Grails internationalization-160524154831Grails internationalization-160524154831
Grails internationalization-160524154831
 
Bootcamp linux commands
Bootcamp linux commandsBootcamp linux commands
Bootcamp linux commands
 
Angular 2 - An Introduction
Angular 2 - An IntroductionAngular 2 - An Introduction
Angular 2 - An Introduction
 
Spring boot
Spring bootSpring boot
Spring boot
 
Twilio
TwilioTwilio
Twilio
 
Gorm
GormGorm
Gorm
 
Mixpanel
MixpanelMixpanel
Mixpanel
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
MetaProgramming with Groovy
MetaProgramming with GroovyMetaProgramming with Groovy
MetaProgramming with Groovy
 
Java reflection
Java reflectionJava reflection
Java reflection
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
 
Grails Plugins(Console, DB Migration, Asset Pipeline and Remote pagination)
Grails Plugins(Console, DB Migration, Asset Pipeline and Remote pagination)Grails Plugins(Console, DB Migration, Asset Pipeline and Remote pagination)
Grails Plugins(Console, DB Migration, Asset Pipeline and Remote pagination)
 
Grails services
Grails servicesGrails services
Grails services
 
Grails Controllers
Grails ControllersGrails Controllers
Grails Controllers
 

Similar to Introduction to redis

Redis and Ohm
Redis and OhmRedis and Ohm
Redis and Ohm
awksedgreep
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Itamar Haber
 
Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...Dinh Pham
 
EN - Azure - Cache for Redis.pdf
EN - Azure - Cache for Redis.pdfEN - Azure - Cache for Redis.pdf
EN - Azure - Cache for Redis.pdf
ArnaudMorvillier1
 
Redispresentation apac2012
Redispresentation apac2012Redispresentation apac2012
Redispresentation apac2012
Ankur Gupta
 
Redis meetup
Redis meetupRedis meetup
Redis meetup
Nikhil Dole
 
Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Redis and Bloom Filters - Atlanta Java Users Group 9/2014Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Christopher Curtin
 
Fun with Ruby and Redis
Fun with Ruby and RedisFun with Ruby and Redis
Fun with Ruby and Redis
javier ramirez
 
What's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis LabsWhat's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis Labs
Redis Labs
 
Mongo Internal Training session by Soner Altin
Mongo Internal Training session by Soner AltinMongo Internal Training session by Soner Altin
Mongo Internal Training session by Soner Altin
mustafa sarac
 
History of NoSQL and Azure Documentdb feature set
History of NoSQL and Azure Documentdb feature setHistory of NoSQL and Azure Documentdb feature set
History of NoSQL and Azure Documentdb feature set
Soner Altin
 
Redis tutoring
Redis tutoringRedis tutoring
Redis tutoring
Chen-Tien Tsai
 
Managing Data with Amazon ElastiCache for Redis - August 2016 Monthly Webinar...
Managing Data with Amazon ElastiCache for Redis - August 2016 Monthly Webinar...Managing Data with Amazon ElastiCache for Redis - August 2016 Monthly Webinar...
Managing Data with Amazon ElastiCache for Redis - August 2016 Monthly Webinar...
Amazon Web Services
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
Jon Meredith
 
AWS Webcast - Tableau Big Data Solution Showcase
AWS Webcast - Tableau Big Data Solution ShowcaseAWS Webcast - Tableau Big Data Solution Showcase
AWS Webcast - Tableau Big Data Solution Showcase
Amazon Web Services
 
Hadoop File system (HDFS)
Hadoop File system (HDFS)Hadoop File system (HDFS)
Hadoop File system (HDFS)
Prashant Gupta
 
Cost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWSCost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWS
Amazon Web Services
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
Christopher Curtin
 
Redis data structure and Performance Optimization
Redis data structure and Performance OptimizationRedis data structure and Performance Optimization
Redis data structure and Performance Optimization
Knoldus Inc.
 

Similar to Introduction to redis (20)

Redis and Ohm
Redis and OhmRedis and Ohm
Redis and Ohm
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...
 
EN - Azure - Cache for Redis.pdf
EN - Azure - Cache for Redis.pdfEN - Azure - Cache for Redis.pdf
EN - Azure - Cache for Redis.pdf
 
Redispresentation apac2012
Redispresentation apac2012Redispresentation apac2012
Redispresentation apac2012
 
Redis meetup
Redis meetupRedis meetup
Redis meetup
 
Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Redis and Bloom Filters - Atlanta Java Users Group 9/2014Redis and Bloom Filters - Atlanta Java Users Group 9/2014
Redis and Bloom Filters - Atlanta Java Users Group 9/2014
 
Fun with Ruby and Redis
Fun with Ruby and RedisFun with Ruby and Redis
Fun with Ruby and Redis
 
Rails Concept
Rails ConceptRails Concept
Rails Concept
 
What's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis LabsWhat's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis Labs
 
Mongo Internal Training session by Soner Altin
Mongo Internal Training session by Soner AltinMongo Internal Training session by Soner Altin
Mongo Internal Training session by Soner Altin
 
History of NoSQL and Azure Documentdb feature set
History of NoSQL and Azure Documentdb feature setHistory of NoSQL and Azure Documentdb feature set
History of NoSQL and Azure Documentdb feature set
 
Redis tutoring
Redis tutoringRedis tutoring
Redis tutoring
 
Managing Data with Amazon ElastiCache for Redis - August 2016 Monthly Webinar...
Managing Data with Amazon ElastiCache for Redis - August 2016 Monthly Webinar...Managing Data with Amazon ElastiCache for Redis - August 2016 Monthly Webinar...
Managing Data with Amazon ElastiCache for Redis - August 2016 Monthly Webinar...
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
 
AWS Webcast - Tableau Big Data Solution Showcase
AWS Webcast - Tableau Big Data Solution ShowcaseAWS Webcast - Tableau Big Data Solution Showcase
AWS Webcast - Tableau Big Data Solution Showcase
 
Hadoop File system (HDFS)
Hadoop File system (HDFS)Hadoop File system (HDFS)
Hadoop File system (HDFS)
 
Cost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWSCost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWS
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
 
Redis data structure and Performance Optimization
Redis data structure and Performance OptimizationRedis data structure and Performance Optimization
Redis data structure and Performance Optimization
 

More from NexThoughts Technologies

Alexa skill
Alexa skillAlexa skill
GraalVM
GraalVMGraalVM
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
NexThoughts Technologies
 
Apache commons
Apache commonsApache commons
Apache commons
NexThoughts Technologies
 
HazelCast
HazelCastHazelCast
MySQL Pro
MySQL ProMySQL Pro
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
NexThoughts Technologies
 
Swagger
SwaggerSwagger
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
NexThoughts Technologies
 
Arango DB
Arango DBArango DB
Jython
JythonJython
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
NexThoughts Technologies
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
NexThoughts Technologies
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
NexThoughts Technologies
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
NexThoughts Technologies
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
NexThoughts Technologies
 
Ethereum
EthereumEthereum
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
NexThoughts Technologies
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
NexThoughts Technologies
 
Google authentication
Google authenticationGoogle authentication
Google authentication
NexThoughts Technologies
 

More from NexThoughts Technologies (20)

Alexa skill
Alexa skillAlexa skill
Alexa skill
 
GraalVM
GraalVMGraalVM
GraalVM
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
Apache commons
Apache commonsApache commons
Apache commons
 
HazelCast
HazelCastHazelCast
HazelCast
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
 
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
 
Swagger
SwaggerSwagger
Swagger
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Arango DB
Arango DBArango DB
Arango DB
 
Jython
JythonJython
Jython
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
 
Ethereum
EthereumEthereum
Ethereum
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
 
Google authentication
Google authenticationGoogle authentication
Google authentication
 

Recently uploaded

Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Introduction to redis

  • 2. Agenda What is Redis? History Installation Sample commands Redis with Grails Demo Case Studies
  • 3. What is Redis? Redis means REmote DIrectory Server. Redis is an advanced key-value NoSQL data store. It is similar to memcached except the dataset is not volatile. Like memcached, Redis can store string values, but it can also store lists, sets, and ordered sets. All these data types can be manipulated with atomic operations that push, pop, add and remove elements, perform server side union, intersection, difference between sets, and more. Redis also supports different kinds of sorting.
  • 4. History Early 2009 - Salvatore Sanfilippo, an Italian developer, started the Redis project He was working on a real-time web analytics solution and found that MySQL could not provide the necessary performance. June 2009 - Redis was deployed in production for the LLOOGG real-time web analytics website March 2010 - VMWare hired Sanfilippo to work full-time on Redis (remains BSD licensed) Subsequently, VMWare hired Pieter Noordhuis, a major Redis contributor, to assist on the project.
  • 6. Installation sudo add-apt-repository ppa:chris-lea/redis-server sudo apt-get update sudo apt-get install redis-server Start/Stop: sudo service redis-server start sudo service redis-server stop redis-benchmark
  • 7. Sample Commands Command Line : redis-cli SET users:GeorgeWashington "job: President, born:1732, dislikes: cherry trees" GET users:GeorgeWashington > SET population 6 OK > INCRBY population 10 (integer) 16 > INCR population (integer) 17
  • 9. Redis with Grails Plugin: https://grails.org/plugin/redis The Redis plugin provides integration with a Redis datastore. This plugin gives grails apps a pooled connection to a Redis instance and provides a number of helper methods and caching/memoization methods that can greatly speed up your application performance.
  • 10. Redis with Grails def redisService The redisService bean wraps the pool connection. It has a number of caching/memoization helper functions, template methods, and basic Redis commands, it will be your primary interface to Redis. redisService.foo = "bar" assert "bar" == redisService.foo redisService.sadd("months", "february") assert true == redisService.sismember("months", "february")
  • 11. Demo
  • 12. Memoization Memoization is a write-through caching technique. The plugin gives a number of methods that take a key name, and a closure as parameters. These methods first check Redis to see if the key exists. If it does, it returns the value of the key and does not execute the closure. If it does not exist in Redis, it executes the closure and saves the result in Redis under the key. Subsequent calls will then be served the cached value from Redis rather than recalculating. This technique is very useful for caching values that are frequently requested but expensive to calculate.
  • 13. Demo
  • 14. Redis Taglib The redis:memoize TagLib lets you leverage memoization within your GSP files. Wrap it around any expensive to generate text and it will cache it and quickly serve it from Redis. <redis:memoize key="mykey" expire="3600"> <!-- insert expensive to generate GSP content here taglib body will be executed once, subsequent calls will pull from redis till the key expires --> <div id='header'> ... expensive header stuff here that can be cached ... </div> </redis:memoize>
  • 15. Demo
  • 16. Redis Session Plugin Stores HTTP sessions in a Redis data store. This plugin lets you store HTTP session data in a redis store using Database Session Plugin. https://grails.org/plugin/redis-database-session
  • 17. Redis Persistence #Snapshotting (RDB) : Snapshots at predefined intervals, which may also depend on the number of changes. Any changes between these intervals will be lost at a power failure or crash. # Append-Only files (AOF): Writing a kind of change log at every data change. You can fine-tune how often this is physically written to the disk, but if you chose to always write immediately (which will cost you some performance), then there will be no data loss caused by the in-memory nature of Redis
  • 18. Redis @ Twitter Redis on Twitter supports over 30 billion timeline updates per day based on 5000 tweets per second or 400,000,000 tweets per day. There is no doubt, Twitter’s infrastructure deals with extremely high scale demands. So, next time you get a Tweet from Katy Perry, remember 39 million inserts just occurred on Redis. While there might be 5000 tweets per second on average and peaks up to 12,000, views are actually what keeps the datastore busy. There are over 300,000 queries per second on home timelines and 30,000 on search-based timelines.
  • 19. Redis @ Pinterest Things which Redis stores for a Pinterest Profile. A list of users who you follow A list of boards (and their related users) who you follow A list of your followers A list of people who follow your boards A list of boards you follow A list of boards you unfollowed after following a user The followers and unfollowers of each board Redis stores the above lists for each of it’s 70 million users—it basically stores the entire follower graph.
  • 21. Thanks :) Questions? Shoot them at vishal@nexthoughts.com