SlideShare una empresa de Scribd logo
1 de 70
Descargar para leer sin conexión
Redis — The AK-47 Of Post-relational Databases
Karel Minařík
Karel Minařík
→ Independent web designer and developer

→ Ruby, Rails, Git, CouchDB propagandista in .cz

→ Previously: Flash Developer; Art Director; Information Architect;… (see LinkedIn)

→ @karmiq at Twitter




→   karmi.cz



                                                                                      Redis
WEAPON DESIGN

AK-47



Designed at the end of WWII by Mikhail Kalashnikov

Assault Rifle, not a “submachine gun”

Simple design

Designed for mass production & low-quality manufacturing

Extreme reliability, at the cost of accuracy


                                                     Redis
http://www.youtube.com/watch?v=J6c3DLlM9KA#t=8m32s



                                                     Redis
Reliability



              Redis
SIMPLICITY

The Redis Manifesto




We're against complexity.
We believe designing systems is a fight against complexity.
Most of the time the best way to fight complexity is by not
creating it at all.




http://antirez.com/post/redis-manifesto.html            Redis
SIMPLICITY

Redis and NoSQL




What's wrong with RDBMS when used for (many) tasks
that don't need all this complexity? The data model: non
scalable, time complexity hard to predict, and can't model
many common problems well enough.




http://antirez.com/post/MongoDB-and-Redis.html               Redis
Assault rifles as the crucial invention for
                                      new rules of warfare: fighting in shorter
                                      distances and shooting while on the run.


http://www.youtube.com/watch?v=a1KBsqvKpXk#t=7m50s

                                                                               Redis
Memory is the new disk.
Disk is the new tape.
— Jim Gray

http://www.infoq.com/news/2008/06/ram-is-disk

http://research.microsoft.com/en-us/um/people/gray/talks/Flash_is_Good.ppt   Redis
Redis: Main Features




                       Redis
Simplicity       Speed
Predictability   Versatility
Reliability      Low Footprint
SIMPLICITY

Installation



git  clone  http://github.com/antirez/redis
cd  redis
make

./src/redis-­‐server

./src/redis-­‐cli




                                              Redis
SIMPLICITY

The Zen of Redis




(...) what Redis provides are data structures (...)

http://antirez.com/post/MongoDB-and-Redis.html#c1537   Redis
REDIS

Data Structures


Strings

Lists

Sets

Sorted Sets

Hashes



                  Redis
REDIS DATA STRUCTURES

Strings




SET  key  "value"  ~  4  billion  of  keys
GET  key
=>  "value"
DEL  key



                                             Redis
REDIS DATA STRUCTURES

Fetch multiple keys at once



SET  key1  "value1"
SET  key2  "value2"

MGET  key1  key2
=>  "value1"
=>  "value2"


                              Redis
REDIS DATA STRUCTURES

Expiration



EXPIRE  key  5
GET  key
=>  "value"
TTL  key
=>  1
GET  key
=>  (nil)


                        Redis
Usage

Cache
http://antirez.com/post/redis-as-LRU-cache.html

Sessions
https://github.com/mattmatt/redis-session-store




                                                  Redis
REDIS DATA STRUCTURES

Atomic Increments


GET  key
=>  nil
INCR  key
=>  1
INCR  key
=>  2
GET  key
=>  2

                        Redis
Usage

Counters (downloads, hits, votes, …)
$  curl  http://example.com/downloads/file1.mpg
INCR  downloads:total
INCR  downloads:total:today
INCR  downloads:total:2011-­‐05-­‐10
INCR  downloads:/downloads/file1.mpg:total
INCR  downloads:/downloads/file1.mpg:today
INCR  downloads:/downloads/file1.mpg:2011-­‐05-­‐10




                                                Redis
Usage

Counters (downloads, hits, votes, …)
#  Total  downloads  for  server,  all  time
GET  downloads:total
#  Total  downloads  for  server,  today
GET  downloads:total:today
#  Total  downloads  for  file
GET  downloads:/downloads/file1.mpg:total

#  Total  downloads  for  file  today
INCR  downloads:/downloads/file1.mpg:today
...

                                               Redis
Usage

Counters (downloads, hits, votes, …)
#  Expire  at  2011-­‐05-­‐10  23:59:59
EXPIREAT  downloads:total:today  1305064799




All this runs at super-sonic speed, with minimal overhead and resource consumption.
See implementation for Rubygems.org: https://gist.github.com/296921
However, you'll hit denormalization bloat once you start adding metrics (eg. downloads per
country, per category, …)




                                                                                       Redis
Usage

Variations: Rate limiting
$  curl  http://api.example.com/list.json
INCR  api:<TOKEN>:hits
=>  1

 if INCR('api:abc123:hits') > LIMIT
   return 420 Enhance Your Calm
 end




#  Every  hour...
DEL  api:<TOKEN>:hits


                                            Redis
Usage

Generating unique IDs

INCR  global:users_ids
=>  1
SET  users:1:username  "john"

INCR  global:users_ids
=>  2
SET  users:2:username  "mary"




                                Redis
REDIS DATA STRUCTURES

Lists

LPUSH  key  1           RPOP  key
=>  1                   =>  "1"
LPUSH  key  2           LRANGE  key  0  -­‐1
=>  2                   =>  "3"
LPUSH  key  3           =>  "2"
=>  3                   LLEN  key
LRANGE  key  0  -­‐1    =>  2
=>  "3"                 LTRIM  key  0  1
=>  "2"                 =>  OK
=>  "1"
                                               Redis
Usage

Indexes (list of comments, ...)
LPUSH  article:comments  <ID>

Timelines (of all sorts: messages, logs, …)
LPUSH  user:<ID>:inbox  "message  from  Alice"
LPUSH  user:<ID>:inbox  "message  from  Bob"
#  Limit  the  messages  to  100
LTRIM  user:<ID>:inbox  0  99
#  Get  last  10  messages
LRANGE  user:<ID>:inbox  0  9
#  Get  next  10  messages
LRANGE  user:<ID>:inbox  10  19
                                                 Redis
Usage

Queues
#  Publisher
RPUSH  queue  "task-­‐1"
RPUSH  queue  "task-­‐2"

#  Worker  (blocks  and  waits  for  tasks)
BLPOP  queue  0




                                              Redis
Usage

Queues
# publisher.sh
for i in {1..10}; do
  redis-cli RPUSH "queue" "task-$i"
done

# worker.sh
while true; do
  redis-cli BLPOP "queue" 0
done




                       Demo
                                      Redis
REDIS DATA STRUCTURES

Resque: Background Processing from Github



                                                                                                RPUSH




                                          }
                             LPOP




   O(1)                                      … tens or millions of items …




                        https://github.com/defunkt/resque/blob/v1.13.0/lib/resque.rb#L133-138




                                                                                                        Redis
MESSAGE QUEUES

RestMQ




                 Redis
TALK ON ASYNCHRONOUS PROCESSING

The Code of the Forking Paths




Slides
http://www.slideshare.net/karmi/the-code-of-the-forking-paths-asynchronous-processing-with-resque-and-amqp

Video (in Czech)
http://multimedia.vse.cz/media/Viewer/?peid=51c06c512f4645289c4e9c749dc85acc1d


                                                                                                     Redis
REDIS DATA STRUCTURES

Sets

SADD  key  1            SISMEMBER  key  1
=>  1                   =>  "1"
SADD  key  2            SISMEMBER  key  5
=>  2                   =>  "0"
SADD  key  3            SRANDMEMBER  key
=>  3                   =>  "<RAND>"
SMEMBERS  key           SREM  key  3
=>  "3"                 =>  1
=>  "1"
=>  "2"
                                            Redis
REDIS DATA STRUCTURES

Set Operations

SADD  A  1              SADD  B  1
SADD  A  2              SADD  B  3

SMEMBERS  A             SMEMBERS  B
=>  "1"                 =>  "1"
=>  "2"                 =>  "3"




                                      Redis
REDIS DATA STRUCTURES

Set Operations

[1,2]               [1,3]


                               Union                              SUNION  A  B
                                                                  =>  1
                                                                  =>  2
[1,2]               [1,3]                                         =>  3
                               Intersection                       SINTER  A  B
                                                                  =>  1


[1,2]               [1,3]


                               Difference                         SDIFF  A  B
                                                                  =>  2

http://en.wikipedia.org/wiki/Set_(mathematics)#Basic_operations                  Redis
Usage

Ad serving
SADD  ads:cars      "Check  out  Toyota!"
SADD  ads:cars      "Check  out  Ford!"
...
SADD  ads:movies  "Check  out  Winter's  Bone!"
...

SRANDMEMBER  ads:cars
SRANDMEMBER  ads:movies

Note: Time complexity is O(1). “Check out ODER BY RAND()!”

                                                             Redis
Usage

Relations (Friends/followers)
SADD  users:A:follows  B

SADD  users:B:follows  C
SADD  users:B:follows  D

SADD  users:C:follows  A
SADD  users:C:follows  D




                                Redis
Usage

Relations (Friends/followers)
# Joint network of A and B
SUNION  users:A:follows  users:B:follows
1)  "C"
2)  "D"
3)  "B"




                                           Redis
Usage

Relations (Friends/followers)
#  Common  for  A  and  B
SINTER  users:A:follows  users:B:follows
[]
#  Common  for  B  and  C
SINTER  users:B:follows  users:C:follows
1)  "D"
#  Unique  to  B  compared  to  C
SDIFF  users:B:follows  users:C:follows
1)  "C"


                                           Redis
Usage

Relations (Friends/followers)

#  Whom  I  follow...
SADD  friends  A                SMEMBERS  friends
SADD  friends  B                1)  "A"
                                2)  "B"
#  Who  follows  me...
SADD  followers  B              SMEMBERS  followers
SADD  followers  C              1)  "C"
                                2)  "B"


                                                      Redis
Usage

Relations (Friends/followers)

#  Mutual  relationships
SINTER  friends  followers
1)  "B"
#  Who  does  not  follow  me  back?
SDIFF  friends  followers
1)  "A"
#  Who  am  I  not  following  back?
SDIFF  followers  friends
1)  "C"

                                       Redis
Mining the Social Web
                                           Analyzing Data from Facebook, Twitter, LinkedIn, and Other Social Media Sites
                                           Matthew A. Russell
                                           http://books.google.com/books?id=SYM1lrQdrdsC&lpg=PP1&pg=PA94




http://oreilly.com/catalog/0636920010203                                                                                   Redis
Usage

Relations (Article tags/categories)

SADD  tags:ruby  article-­‐1

SADD  tags:java  article-­‐2

SADD  tags:web    article-­‐1
SADD  tags:web    article-­‐2




                                      Redis
Usage

Relations (Article tags/categories)
#  ruby  OR  java
SUNION  tags:ruby  tags:java
1)  "article-­‐2"
2)  "article-­‐1"
#  ruby  AND  java
SINTER  tags:ruby  tags:java
[]
#  web  AND  NOT  ruby
SDIFF  tags:web  tags:ruby
1)  "article-­‐2"
                                      Redis
Usage

Friends Online
#  My  friends
SADD  friends  A
SADD  friends  B
SADD  friends  C
#  Friend  A  connects
SADD  online:fresh  A
SUNIONSTORE  online  online:fresh  online:stale
#  Who's  online  now?
SINTER  friends  online
[A]
                                                  Redis
Usage

Friends Online
#  Every  minute,  rename  the  "fresh"  to  "stale"  ...
RENAME  online:fresh  online:stale
#  ...  and  update  the  "online"  set
SUNIONSTORE  online  online:fresh  online:stale
#  Friend  B  connects
SADD  online:fresh  B
SUNIONSTORE  online  online:fresh  online:stale
#  Who's  online  now?
SINTER  friends  online
[A,B]
                                                            Redis
Usage

Friends Online
#  Time  passes  ...
#  Rename  the  "fresh"  to  "stale",  every  minute  ...
RENAME  online:fresh  online:stale
#  ...  and  update  the  "online"  set
SUNIONSTORE  online  online:fresh  online:stale
#  Who's  online  now?
SINTER  friends  online
[B]



                                                            Redis
REDIS DATA STRUCTURES

Sorted Sets

ZADD  key  100  A       ZREVRANGE  key  0  -­‐1
ZADD  key  10    C      1)  "A"
ZADD  key  80    B      2)  "B"
                        3)  "C"

ZRANGE  key  0  -­‐1    ZINCRBY  key  10  C
1)  "C"                 "20"
2)  "B"
3)  "A"




                                              Redis
REDIS DATA STRUCTURES

Sorted Sets

ZREVRANGE  key  0  -­‐1   ZREVRANGEBYSCORE  
WITHSCORES                key  100  50
1)  "A"                 1)  "A"
2)  "100"               2)  "B"
3)  "B"
4)  "80"
5)  "C"
6)  "20"




                                           Redis
Usage

Leaderboards
#  User  A  got  10  points
ZINCRBY  scores  10  A
#  User  B  got  15  points
ZINCRBY  scores  15  B
#  User  A  got  another  10  points
ZINCRBY  scores  10  A
#  Display  scores
ZREVRANGE  scores  0  -­‐1  WITHSCORES
1)  "A"
2)  "20"
3)  "B"
4)  "15"
                                         Redis
Usage

Inverted Index
#  Index  document  A
ZINCRBY  index:foo  1  document-­‐A
ZINCRBY  index:foo  1  document-­‐A
ZINCRBY  index:bar  1  document-­‐A
#  Index  document  B
ZINCRBY  index:foo  1  document-­‐B
ZINCRBY  index:baz  1  document-­‐B
#  Search  for  token  foo,  sort  by  occurences
ZREVRANGE  index:foo  0  -­‐1  WITHSCORES
1)  "document-­‐A"
2)  "2"
3)  "document-­‐B"
4)  "1"

                                                    Redis
REDIS' SORTED SETS AS AN INDEX

Inverted Index




https://gist.github.com/928605   Redis
Usage

Counters (downloads, hits, votes, …)
#  Total  downloads  for  server,  all  time
GET  downloads:total
#  Total  downloads  for  server,  today
        Mm'kay. But I need the
GET  downloads:total:today
     “leaderboard” of downloads!
#  Total  downloads  for  file
GET  downloads:/downloads/file1.mpg:total

#  Total  downloads  for  file  today
INCR  downloads:/downloads/file1.mpg:today
...

                                               Redis
Usage

Counters (downloads, hits, votes, …)
INCR  downloads:total
INCR  downloads:total:today
...
                                            Easy!
#  >  Individual  files
#      GET  /downloads/file1.mpg
ZINCRBY  downloads:files:total  1  /downloads/file1.mpg
ZINCRBY  downloads:files:2011-­‐05-­‐10  1  /downloads/file1.mpg
#      GET  /downloads/file2.mpg
ZINCRBY  downloads:files:total  1  /downloads/file2.mpg
ZINCRBY  downloads:files:2011-­‐05-­‐10  1  /downloads/file2.mpg
...

                                                             Redis
Usage

Counters (downloads, hits, votes, …)
#  10  most  downloaded,  all  the  time
ZREVRANGE  downloads:files:total  0  10  WITHSCORES

#  10  most  downloaded  on  2011-­‐05-­‐10
ZREVRANGE  downloads:files:2011-­‐05-­‐10  0  10  WITHSCORES

#  10  most  downloaded  between  2011-­‐05-­‐10  and  <OTHER  DATE>
ZUNIONSTORE  downloads:timeline  2  
                        downloads:files:2011-­‐05-­‐10  
                        <OTHER  DATE>

ZREVRANGE  downloads:timeline  0  10  WITHSCORES




https://gist.github.com/974306                                    Redis
REDIS DATA STRUCTURES

Hashes

HMSET  users:1  username  j  name  John
HMSET  users:2  username  m  name  Mary
HGETALL  users:1
1)  "username"
2)  "j"
...
HKEYS  users:1
1)  "username"
2)  "name"
HSET  users:1  score  100
HGET  users:1  score
1)  "100"
                                          Redis
Usage

Structured data (Articles, users, …)
HMSET  articles:1  title          "Redis  is  cool!"  
                                  content      "I  recently  ..."  
                                  published  "2011-­‐05-­‐10"
HGETALL  articles:1
1)  "title"
2)  "Redis  is  cool!"
3)  "content"
4)  "I  recently  ..."
5)  "published"
6)  "2011-­‐05-­‐10"


HSET  articles:1  title  "Redis  is  very  cool!"
HGET  articles:1  title
"Redis  is  very  cool!"



                                                                       Redis
Usage

User Preferences (No login)
#  Save  preferences  from  <FORM>
HMSET  prefs:<COOKIE  HASH>  background  #ccc  color  #333

#  Keep  it  for  one  year
EXPIRE  prefs:<COOKIE  HASH>  31556926

#  Retrieve  preferences
HGETALL  prefs:<COOKIE  HASH>




                                                       Redis
REDIS FEATURES

Publish/Subscribe

SUBSCRIBE    log.error
PUBLISH        log.error  "ERROR"

PSUBSCRIBE  log.*                   “AMQP”

PUBLISH        log.error  "ERROR"
=>  "ERROR"
=>  "ERROR"

PUBLISH        log.info  "INFO"
=>  "INFO"

                    Demo
                                        Redis
REDIS FEATURES

Durability


BGSAVE
/usr/local/var/db/redis/dump.rdb

BGREWRITEAOF
#  redis.conf
appendonly  yes



http://redis.io/topics/persistence   Redis
REDIS FEATURES

Virtual Memory


#  redis.conf
vm-­‐enabled  yes
Allows to work with data sets bigger then available RAM.
Swaps less often used values to disk.
Keys must still fit into RAM.

#  Make  Redis  disk-­‐bound  database
vm-­‐max-­‐memory  0




The future? Redis Diskstore (disk-bound by default, cache in between server and disk)

http://redis.io/topics/virtual-memory                                              Redis
REDIS FEATURES

Replication


#  slave.conf
slaveof  127.0.0.1  6379
$  redis-­‐server  slave.conf




The future? Redis Cluster (Dynamo-like, Distributed hash table)

http://redis.io/topics/replication                                Redis
REDIS FEATURES

Scripting (experimental)
$  git  clone  https://github.com/antirez/redis  -­‐b  scripting  redis-­‐scripting
$  cd  redis-­‐scripting
$  make
$  echo  port  7397  |  ./src/redis-­‐server  -­‐
$  ./src/redis-­‐cli



SET  myscript  "return  'HELLO'"


EVAL  "return  loadstring(redis('get',  KEYS[1]))()"    
          1  myscript
=>  "HELLO"




http://antirez.com/post/scripting-branch-released.html                                Redis
REDIS RESOURCES

The Interactive Documentation




                           PROMPT




http://redis.io/commands            Redis
REDIS RESOURCES

Simon Willison Tutorial




http://simonwillison.net/static/2010/redis-tutorial/   Redis
REDIS RESOURCES

Redis Implementation Details




http://pauladamsmith.com/articles/redis-under-the-hood.html   Redis
REDIS RESOURCES

Redis Use Cases




http://highscalability.com/blog/2010/12/6/what-the-heck-are-you-actually-using-nosql-for.html   Redis
REDIS RESOURCES

The Original Metaphore…




http://flazz.me/redis-the-ak-47-of-databases   Redis
Thanks!
  d

Más contenido relacionado

La actualidad más candente

Redis And python at pycon_2011
Redis And python at pycon_2011Redis And python at pycon_2011
Redis And python at pycon_2011sunilar0ra
 
Redis - Usability and Use Cases
Redis - Usability and Use CasesRedis - Usability and Use Cases
Redis - Usability and Use CasesFabrizio Farinacci
 
Redis and its many use cases
Redis and its many use casesRedis and its many use cases
Redis and its many use casesChristian Joudrey
 
An Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL databaseAn Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL databaseAli MasudianPour
 
Caching solutions with Redis
Caching solutions   with RedisCaching solutions   with Redis
Caching solutions with RedisGeorge Platon
 
Scaling php applications with redis
Scaling php applications with redisScaling php applications with redis
Scaling php applications with redisjimbojsb
 
Redis Indices (#RedisTLV)
Redis Indices (#RedisTLV)Redis Indices (#RedisTLV)
Redis Indices (#RedisTLV)Itamar Haber
 
Extend Redis with Modules
Extend Redis with ModulesExtend Redis with Modules
Extend Redis with ModulesItamar Haber
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisKnoldus Inc.
 
Redis/Lessons learned
Redis/Lessons learnedRedis/Lessons learned
Redis/Lessons learnedTit Petric
 
Advanced Redis data structures
Advanced Redis data structuresAdvanced Redis data structures
Advanced Redis data structuresamix3k
 
Redis for the Everyday Developer
Redis for the Everyday DeveloperRedis for the Everyday Developer
Redis for the Everyday DeveloperRoss Tuck
 
Redis Functions, Data Structures for Web Scale Apps
Redis Functions, Data Structures for Web Scale AppsRedis Functions, Data Structures for Web Scale Apps
Redis Functions, Data Structures for Web Scale AppsDave Nielsen
 

La actualidad más candente (20)

Redis And python at pycon_2011
Redis And python at pycon_2011Redis And python at pycon_2011
Redis And python at pycon_2011
 
Redis - Usability and Use Cases
Redis - Usability and Use CasesRedis - Usability and Use Cases
Redis - Usability and Use Cases
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Redis and its many use cases
Redis and its many use casesRedis and its many use cases
Redis and its many use cases
 
An Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL databaseAn Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL database
 
Caching solutions with Redis
Caching solutions   with RedisCaching solutions   with Redis
Caching solutions with Redis
 
Redis introduction
Redis introductionRedis introduction
Redis introduction
 
Redis and it's data types
Redis and it's data typesRedis and it's data types
Redis and it's data types
 
Scaling php applications with redis
Scaling php applications with redisScaling php applications with redis
Scaling php applications with redis
 
Redis Indices (#RedisTLV)
Redis Indices (#RedisTLV)Redis Indices (#RedisTLV)
Redis Indices (#RedisTLV)
 
Extend Redis with Modules
Extend Redis with ModulesExtend Redis with Modules
Extend Redis with Modules
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Redis 101
Redis 101Redis 101
Redis 101
 
Redis/Lessons learned
Redis/Lessons learnedRedis/Lessons learned
Redis/Lessons learned
 
Advanced Redis data structures
Advanced Redis data structuresAdvanced Redis data structures
Advanced Redis data structures
 
Redis for the Everyday Developer
Redis for the Everyday DeveloperRedis for the Everyday Developer
Redis for the Everyday Developer
 
Node.js in production
Node.js in productionNode.js in production
Node.js in production
 
Redis Functions, Data Structures for Web Scale Apps
Redis Functions, Data Structures for Web Scale AppsRedis Functions, Data Structures for Web Scale Apps
Redis Functions, Data Structures for Web Scale Apps
 
Nodejs - A quick tour (v5)
Nodejs - A quick tour (v5)Nodejs - A quick tour (v5)
Nodejs - A quick tour (v5)
 

Destacado

High-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using RedisHigh-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using Rediscacois
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueGleicon Moraes
 
Interaktivita, originalita a návrhové vzory
Interaktivita, originalita a návrhové vzoryInteraktivita, originalita a návrhové vzory
Interaktivita, originalita a návrhové vzoryKarel Minarik
 
Vizualizace dat a D3.js [EUROPEN 2014]
Vizualizace dat a D3.js [EUROPEN 2014]Vizualizace dat a D3.js [EUROPEN 2014]
Vizualizace dat a D3.js [EUROPEN 2014]Karel Minarik
 
Redis installation
Redis installationRedis installation
Redis installationeric German
 
Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...techblog
 
Mapping, Interlinking and Exposing MusicBrainz as Linked Data
Mapping, Interlinking and Exposing MusicBrainz as Linked DataMapping, Interlinking and Exposing MusicBrainz as Linked Data
Mapping, Interlinking and Exposing MusicBrainz as Linked DataPeter Haase
 
Continuously-Integrated Puppet in a Dynamic Environment
Continuously-Integrated Puppet in a Dynamic EnvironmentContinuously-Integrated Puppet in a Dynamic Environment
Continuously-Integrated Puppet in a Dynamic EnvironmentPuppet
 
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7Colin Charles
 
Ruby application based on http
Ruby application based on httpRuby application based on http
Ruby application based on httpRichard Huang
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoringAlan Renouf
 
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)Gleicon Moraes
 
PostgreSQL Materialized Views with Active Record
PostgreSQL Materialized Views with Active RecordPostgreSQL Materialized Views with Active Record
PostgreSQL Materialized Views with Active RecordDavid Roberts
 
The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015Colin Charles
 
Taking Control of Chaos with Docker and Puppet
Taking Control of Chaos with Docker and PuppetTaking Control of Chaos with Docker and Puppet
Taking Control of Chaos with Docker and PuppetPuppet
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsersSergey Shekyan
 
Monitoring in an Infrastructure as Code Age
Monitoring in an Infrastructure as Code AgeMonitoring in an Infrastructure as Code Age
Monitoring in an Infrastructure as Code AgePuppet
 

Destacado (20)

High-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using RedisHigh-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using Redis
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
 
Interaktivita, originalita a návrhové vzory
Interaktivita, originalita a návrhové vzoryInteraktivita, originalita a návrhové vzory
Interaktivita, originalita a návrhové vzory
 
Vizualizace dat a D3.js [EUROPEN 2014]
Vizualizace dat a D3.js [EUROPEN 2014]Vizualizace dat a D3.js [EUROPEN 2014]
Vizualizace dat a D3.js [EUROPEN 2014]
 
Redis installation
Redis installationRedis installation
Redis installation
 
Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...
 
Mapping, Interlinking and Exposing MusicBrainz as Linked Data
Mapping, Interlinking and Exposing MusicBrainz as Linked DataMapping, Interlinking and Exposing MusicBrainz as Linked Data
Mapping, Interlinking and Exposing MusicBrainz as Linked Data
 
Continuously-Integrated Puppet in a Dynamic Environment
Continuously-Integrated Puppet in a Dynamic EnvironmentContinuously-Integrated Puppet in a Dynamic Environment
Continuously-Integrated Puppet in a Dynamic Environment
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7
 
Sensu
SensuSensu
Sensu
 
Ruby application based on http
Ruby application based on httpRuby application based on http
Ruby application based on http
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoring
 
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
 
Symfonytn
SymfonytnSymfonytn
Symfonytn
 
PostgreSQL Materialized Views with Active Record
PostgreSQL Materialized Views with Active RecordPostgreSQL Materialized Views with Active Record
PostgreSQL Materialized Views with Active Record
 
The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015
 
Taking Control of Chaos with Docker and Puppet
Taking Control of Chaos with Docker and PuppetTaking Control of Chaos with Docker and Puppet
Taking Control of Chaos with Docker and Puppet
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
 
Monitoring in an Infrastructure as Code Age
Monitoring in an Infrastructure as Code AgeMonitoring in an Infrastructure as Code Age
Monitoring in an Infrastructure as Code Age
 

Similar a Redis — The AK-47 of Post-relational Databases

Redispresentation apac2012
Redispresentation apac2012Redispresentation apac2012
Redispresentation apac2012Ankur Gupta
 
Redis — memcached on steroids
Redis — memcached on steroidsRedis — memcached on steroids
Redis — memcached on steroidsRobert Lehmann
 
Redis+Spark Structured Streaming: Roshan Kumar
Redis+Spark Structured Streaming: Roshan KumarRedis+Spark Structured Streaming: Roshan Kumar
Redis+Spark Structured Streaming: Roshan KumarRedis Labs
 
r2con 2017 r2cLEMENCy
r2con 2017 r2cLEMENCyr2con 2017 r2cLEMENCy
r2con 2017 r2cLEMENCyRay Song
 
Tailoring Redis Modules For Your Users’ Needs
Tailoring Redis Modules For Your Users’ NeedsTailoring Redis Modules For Your Users’ Needs
Tailoring Redis Modules For Your Users’ NeedsRedis Labs
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisItamar Haber
 
WebClusters, Redis
WebClusters, RedisWebClusters, Redis
WebClusters, RedisFilip Tepper
 
RedisGears: Meir Shpilraien
RedisGears: Meir ShpilraienRedisGears: Meir Shpilraien
RedisGears: Meir ShpilraienRedis Labs
 
Getting Ready to Use Redis with Apache Spark with Dvir Volk
Getting Ready to Use Redis with Apache Spark with Dvir VolkGetting Ready to Use Redis with Apache Spark with Dvir Volk
Getting Ready to Use Redis with Apache Spark with Dvir VolkSpark Summit
 
Reusing your existing software on Android
Reusing your existing software on AndroidReusing your existing software on Android
Reusing your existing software on AndroidTetsuyuki Kobayashi
 
Building a Large Scale Recommendation Engine with Spark and Redis-ML with Sha...
Building a Large Scale Recommendation Engine with Spark and Redis-ML with Sha...Building a Large Scale Recommendation Engine with Spark and Redis-ML with Sha...
Building a Large Scale Recommendation Engine with Spark and Redis-ML with Sha...Databricks
 
REDIS intro and how to use redis
REDIS intro and how to use redisREDIS intro and how to use redis
REDIS intro and how to use redisKris Jeong
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB
 
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗YUCHENG HU
 
Developing a Redis Module - Hackathon Kickoff
 Developing a Redis Module - Hackathon Kickoff Developing a Redis Module - Hackathon Kickoff
Developing a Redis Module - Hackathon KickoffItamar Haber
 

Similar a Redis — The AK-47 of Post-relational Databases (20)

Redispresentation apac2012
Redispresentation apac2012Redispresentation apac2012
Redispresentation apac2012
 
Mini-Training: Redis
Mini-Training: RedisMini-Training: Redis
Mini-Training: Redis
 
Redis — memcached on steroids
Redis — memcached on steroidsRedis — memcached on steroids
Redis — memcached on steroids
 
Redis+Spark Structured Streaming: Roshan Kumar
Redis+Spark Structured Streaming: Roshan KumarRedis+Spark Structured Streaming: Roshan Kumar
Redis+Spark Structured Streaming: Roshan Kumar
 
r2con 2017 r2cLEMENCy
r2con 2017 r2cLEMENCyr2con 2017 r2cLEMENCy
r2con 2017 r2cLEMENCy
 
Tailoring Redis Modules For Your Users’ Needs
Tailoring Redis Modules For Your Users’ NeedsTailoring Redis Modules For Your Users’ Needs
Tailoring Redis Modules For Your Users’ Needs
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
WebClusters, Redis
WebClusters, RedisWebClusters, Redis
WebClusters, Redis
 
RedisGears
RedisGearsRedisGears
RedisGears
 
REDIS327
REDIS327REDIS327
REDIS327
 
RedisGears: Meir Shpilraien
RedisGears: Meir ShpilraienRedisGears: Meir Shpilraien
RedisGears: Meir Shpilraien
 
Intro to Map Reduce
Intro to Map ReduceIntro to Map Reduce
Intro to Map Reduce
 
Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone
 
Getting Ready to Use Redis with Apache Spark with Dvir Volk
Getting Ready to Use Redis with Apache Spark with Dvir VolkGetting Ready to Use Redis with Apache Spark with Dvir Volk
Getting Ready to Use Redis with Apache Spark with Dvir Volk
 
Reusing your existing software on Android
Reusing your existing software on AndroidReusing your existing software on Android
Reusing your existing software on Android
 
Building a Large Scale Recommendation Engine with Spark and Redis-ML with Sha...
Building a Large Scale Recommendation Engine with Spark and Redis-ML with Sha...Building a Large Scale Recommendation Engine with Spark and Redis-ML with Sha...
Building a Large Scale Recommendation Engine with Spark and Redis-ML with Sha...
 
REDIS intro and how to use redis
REDIS intro and how to use redisREDIS intro and how to use redis
REDIS intro and how to use redis
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
 
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
 
Developing a Redis Module - Hackathon Kickoff
 Developing a Redis Module - Hackathon Kickoff Developing a Redis Module - Hackathon Kickoff
Developing a Redis Module - Hackathon Kickoff
 

Más de Karel Minarik

Elasticsearch (Rubyshift 2013)
Elasticsearch (Rubyshift 2013)Elasticsearch (Rubyshift 2013)
Elasticsearch (Rubyshift 2013)Karel Minarik
 
Elasticsearch in 15 Minutes
Elasticsearch in 15 MinutesElasticsearch in 15 Minutes
Elasticsearch in 15 MinutesKarel Minarik
 
Realtime Analytics With Elasticsearch [New Media Inspiration 2013]
Realtime Analytics With Elasticsearch [New Media Inspiration 2013]Realtime Analytics With Elasticsearch [New Media Inspiration 2013]
Realtime Analytics With Elasticsearch [New Media Inspiration 2013]Karel Minarik
 
Elasticsearch And Ruby [RuPy2012]
Elasticsearch And Ruby [RuPy2012]Elasticsearch And Ruby [RuPy2012]
Elasticsearch And Ruby [RuPy2012]Karel Minarik
 
Shell's Kitchen: Infrastructure As Code (Webexpo 2012)
Shell's Kitchen: Infrastructure As Code (Webexpo 2012)Shell's Kitchen: Infrastructure As Code (Webexpo 2012)
Shell's Kitchen: Infrastructure As Code (Webexpo 2012)Karel Minarik
 
Elastic Search: Beyond Ordinary Fulltext Search (Webexpo 2011 Prague)
Elastic Search: Beyond Ordinary Fulltext Search (Webexpo 2011 Prague)Elastic Search: Beyond Ordinary Fulltext Search (Webexpo 2011 Prague)
Elastic Search: Beyond Ordinary Fulltext Search (Webexpo 2011 Prague)Karel Minarik
 
Your Data, Your Search, ElasticSearch (EURUKO 2011)
Your Data, Your Search, ElasticSearch (EURUKO 2011)Your Data, Your Search, ElasticSearch (EURUKO 2011)
Your Data, Your Search, ElasticSearch (EURUKO 2011)Karel Minarik
 
CouchDB – A Database for the Web
CouchDB – A Database for the WebCouchDB – A Database for the Web
CouchDB – A Database for the WebKarel Minarik
 
Spoiling The Youth With Ruby (Euruko 2010)
Spoiling The Youth With Ruby (Euruko 2010)Spoiling The Youth With Ruby (Euruko 2010)
Spoiling The Youth With Ruby (Euruko 2010)Karel Minarik
 
Verzovani kodu s Gitem (Karel Minarik)
Verzovani kodu s Gitem (Karel Minarik)Verzovani kodu s Gitem (Karel Minarik)
Verzovani kodu s Gitem (Karel Minarik)Karel Minarik
 
Představení Ruby on Rails [Junior Internet]
Představení Ruby on Rails [Junior Internet]Představení Ruby on Rails [Junior Internet]
Představení Ruby on Rails [Junior Internet]Karel Minarik
 
Efektivni vyvoj webovych aplikaci v Ruby on Rails (Webexpo)
Efektivni vyvoj webovych aplikaci v Ruby on Rails (Webexpo)Efektivni vyvoj webovych aplikaci v Ruby on Rails (Webexpo)
Efektivni vyvoj webovych aplikaci v Ruby on Rails (Webexpo)Karel Minarik
 
Úvod do Ruby on Rails
Úvod do Ruby on RailsÚvod do Ruby on Rails
Úvod do Ruby on RailsKarel Minarik
 
Úvod do programování 7
Úvod do programování 7Úvod do programování 7
Úvod do programování 7Karel Minarik
 
Úvod do programování 6
Úvod do programování 6Úvod do programování 6
Úvod do programování 6Karel Minarik
 
Úvod do programování 5
Úvod do programování 5Úvod do programování 5
Úvod do programování 5Karel Minarik
 
Úvod do programování 4
Úvod do programování 4Úvod do programování 4
Úvod do programování 4Karel Minarik
 
Úvod do programování 3 (to be continued)
Úvod do programování 3 (to be continued)Úvod do programování 3 (to be continued)
Úvod do programování 3 (to be continued)Karel Minarik
 
Historie programovacích jazyků
Historie programovacích jazykůHistorie programovacích jazyků
Historie programovacích jazykůKarel Minarik
 
Úvod do programování aneb Do nitra stroje
Úvod do programování aneb Do nitra strojeÚvod do programování aneb Do nitra stroje
Úvod do programování aneb Do nitra strojeKarel Minarik
 

Más de Karel Minarik (20)

Elasticsearch (Rubyshift 2013)
Elasticsearch (Rubyshift 2013)Elasticsearch (Rubyshift 2013)
Elasticsearch (Rubyshift 2013)
 
Elasticsearch in 15 Minutes
Elasticsearch in 15 MinutesElasticsearch in 15 Minutes
Elasticsearch in 15 Minutes
 
Realtime Analytics With Elasticsearch [New Media Inspiration 2013]
Realtime Analytics With Elasticsearch [New Media Inspiration 2013]Realtime Analytics With Elasticsearch [New Media Inspiration 2013]
Realtime Analytics With Elasticsearch [New Media Inspiration 2013]
 
Elasticsearch And Ruby [RuPy2012]
Elasticsearch And Ruby [RuPy2012]Elasticsearch And Ruby [RuPy2012]
Elasticsearch And Ruby [RuPy2012]
 
Shell's Kitchen: Infrastructure As Code (Webexpo 2012)
Shell's Kitchen: Infrastructure As Code (Webexpo 2012)Shell's Kitchen: Infrastructure As Code (Webexpo 2012)
Shell's Kitchen: Infrastructure As Code (Webexpo 2012)
 
Elastic Search: Beyond Ordinary Fulltext Search (Webexpo 2011 Prague)
Elastic Search: Beyond Ordinary Fulltext Search (Webexpo 2011 Prague)Elastic Search: Beyond Ordinary Fulltext Search (Webexpo 2011 Prague)
Elastic Search: Beyond Ordinary Fulltext Search (Webexpo 2011 Prague)
 
Your Data, Your Search, ElasticSearch (EURUKO 2011)
Your Data, Your Search, ElasticSearch (EURUKO 2011)Your Data, Your Search, ElasticSearch (EURUKO 2011)
Your Data, Your Search, ElasticSearch (EURUKO 2011)
 
CouchDB – A Database for the Web
CouchDB – A Database for the WebCouchDB – A Database for the Web
CouchDB – A Database for the Web
 
Spoiling The Youth With Ruby (Euruko 2010)
Spoiling The Youth With Ruby (Euruko 2010)Spoiling The Youth With Ruby (Euruko 2010)
Spoiling The Youth With Ruby (Euruko 2010)
 
Verzovani kodu s Gitem (Karel Minarik)
Verzovani kodu s Gitem (Karel Minarik)Verzovani kodu s Gitem (Karel Minarik)
Verzovani kodu s Gitem (Karel Minarik)
 
Představení Ruby on Rails [Junior Internet]
Představení Ruby on Rails [Junior Internet]Představení Ruby on Rails [Junior Internet]
Představení Ruby on Rails [Junior Internet]
 
Efektivni vyvoj webovych aplikaci v Ruby on Rails (Webexpo)
Efektivni vyvoj webovych aplikaci v Ruby on Rails (Webexpo)Efektivni vyvoj webovych aplikaci v Ruby on Rails (Webexpo)
Efektivni vyvoj webovych aplikaci v Ruby on Rails (Webexpo)
 
Úvod do Ruby on Rails
Úvod do Ruby on RailsÚvod do Ruby on Rails
Úvod do Ruby on Rails
 
Úvod do programování 7
Úvod do programování 7Úvod do programování 7
Úvod do programování 7
 
Úvod do programování 6
Úvod do programování 6Úvod do programování 6
Úvod do programování 6
 
Úvod do programování 5
Úvod do programování 5Úvod do programování 5
Úvod do programování 5
 
Úvod do programování 4
Úvod do programování 4Úvod do programování 4
Úvod do programování 4
 
Úvod do programování 3 (to be continued)
Úvod do programování 3 (to be continued)Úvod do programování 3 (to be continued)
Úvod do programování 3 (to be continued)
 
Historie programovacích jazyků
Historie programovacích jazykůHistorie programovacích jazyků
Historie programovacích jazyků
 
Úvod do programování aneb Do nitra stroje
Úvod do programování aneb Do nitra strojeÚvod do programování aneb Do nitra stroje
Úvod do programování aneb Do nitra stroje
 

Último

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 

Último (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Redis — The AK-47 of Post-relational Databases

  • 1. Redis — The AK-47 Of Post-relational Databases Karel Minařík
  • 2. Karel Minařík → Independent web designer and developer → Ruby, Rails, Git, CouchDB propagandista in .cz → Previously: Flash Developer; Art Director; Information Architect;… (see LinkedIn) → @karmiq at Twitter → karmi.cz Redis
  • 3.
  • 4. WEAPON DESIGN AK-47 Designed at the end of WWII by Mikhail Kalashnikov Assault Rifle, not a “submachine gun” Simple design Designed for mass production & low-quality manufacturing Extreme reliability, at the cost of accuracy Redis
  • 6. Reliability Redis
  • 7.
  • 8. SIMPLICITY The Redis Manifesto We're against complexity. We believe designing systems is a fight against complexity. Most of the time the best way to fight complexity is by not creating it at all. http://antirez.com/post/redis-manifesto.html Redis
  • 9. SIMPLICITY Redis and NoSQL What's wrong with RDBMS when used for (many) tasks that don't need all this complexity? The data model: non scalable, time complexity hard to predict, and can't model many common problems well enough. http://antirez.com/post/MongoDB-and-Redis.html Redis
  • 10. Assault rifles as the crucial invention for new rules of warfare: fighting in shorter distances and shooting while on the run. http://www.youtube.com/watch?v=a1KBsqvKpXk#t=7m50s Redis
  • 11. Memory is the new disk. Disk is the new tape. — Jim Gray http://www.infoq.com/news/2008/06/ram-is-disk http://research.microsoft.com/en-us/um/people/gray/talks/Flash_is_Good.ppt Redis
  • 13. Simplicity Speed Predictability Versatility Reliability Low Footprint
  • 14. SIMPLICITY Installation git  clone  http://github.com/antirez/redis cd  redis make ./src/redis-­‐server ./src/redis-­‐cli Redis
  • 15. SIMPLICITY The Zen of Redis (...) what Redis provides are data structures (...) http://antirez.com/post/MongoDB-and-Redis.html#c1537 Redis
  • 17. REDIS DATA STRUCTURES Strings SET  key  "value"  ~  4  billion  of  keys GET  key =>  "value" DEL  key Redis
  • 18. REDIS DATA STRUCTURES Fetch multiple keys at once SET  key1  "value1" SET  key2  "value2" MGET  key1  key2 =>  "value1" =>  "value2" Redis
  • 19. REDIS DATA STRUCTURES Expiration EXPIRE  key  5 GET  key =>  "value" TTL  key =>  1 GET  key =>  (nil) Redis
  • 21. REDIS DATA STRUCTURES Atomic Increments GET  key =>  nil INCR  key =>  1 INCR  key =>  2 GET  key =>  2 Redis
  • 22. Usage Counters (downloads, hits, votes, …) $  curl  http://example.com/downloads/file1.mpg INCR  downloads:total INCR  downloads:total:today INCR  downloads:total:2011-­‐05-­‐10 INCR  downloads:/downloads/file1.mpg:total INCR  downloads:/downloads/file1.mpg:today INCR  downloads:/downloads/file1.mpg:2011-­‐05-­‐10 Redis
  • 23. Usage Counters (downloads, hits, votes, …) #  Total  downloads  for  server,  all  time GET  downloads:total #  Total  downloads  for  server,  today GET  downloads:total:today #  Total  downloads  for  file GET  downloads:/downloads/file1.mpg:total #  Total  downloads  for  file  today INCR  downloads:/downloads/file1.mpg:today ... Redis
  • 24. Usage Counters (downloads, hits, votes, …) #  Expire  at  2011-­‐05-­‐10  23:59:59 EXPIREAT  downloads:total:today  1305064799 All this runs at super-sonic speed, with minimal overhead and resource consumption. See implementation for Rubygems.org: https://gist.github.com/296921 However, you'll hit denormalization bloat once you start adding metrics (eg. downloads per country, per category, …) Redis
  • 25. Usage Variations: Rate limiting $  curl  http://api.example.com/list.json INCR  api:<TOKEN>:hits =>  1 if INCR('api:abc123:hits') > LIMIT return 420 Enhance Your Calm end #  Every  hour... DEL  api:<TOKEN>:hits Redis
  • 26. Usage Generating unique IDs INCR  global:users_ids =>  1 SET  users:1:username  "john" INCR  global:users_ids =>  2 SET  users:2:username  "mary" Redis
  • 27. REDIS DATA STRUCTURES Lists LPUSH  key  1 RPOP  key =>  1 =>  "1" LPUSH  key  2 LRANGE  key  0  -­‐1 =>  2 =>  "3" LPUSH  key  3 =>  "2" =>  3 LLEN  key LRANGE  key  0  -­‐1 =>  2 =>  "3" LTRIM  key  0  1 =>  "2" =>  OK =>  "1" Redis
  • 28. Usage Indexes (list of comments, ...) LPUSH  article:comments  <ID> Timelines (of all sorts: messages, logs, …) LPUSH  user:<ID>:inbox  "message  from  Alice" LPUSH  user:<ID>:inbox  "message  from  Bob" #  Limit  the  messages  to  100 LTRIM  user:<ID>:inbox  0  99 #  Get  last  10  messages LRANGE  user:<ID>:inbox  0  9 #  Get  next  10  messages LRANGE  user:<ID>:inbox  10  19 Redis
  • 29. Usage Queues #  Publisher RPUSH  queue  "task-­‐1" RPUSH  queue  "task-­‐2" #  Worker  (blocks  and  waits  for  tasks) BLPOP  queue  0 Redis
  • 30. Usage Queues # publisher.sh for i in {1..10}; do redis-cli RPUSH "queue" "task-$i" done # worker.sh while true; do redis-cli BLPOP "queue" 0 done Demo Redis
  • 31. REDIS DATA STRUCTURES Resque: Background Processing from Github RPUSH } LPOP O(1) … tens or millions of items … https://github.com/defunkt/resque/blob/v1.13.0/lib/resque.rb#L133-138 Redis
  • 33. TALK ON ASYNCHRONOUS PROCESSING The Code of the Forking Paths Slides http://www.slideshare.net/karmi/the-code-of-the-forking-paths-asynchronous-processing-with-resque-and-amqp Video (in Czech) http://multimedia.vse.cz/media/Viewer/?peid=51c06c512f4645289c4e9c749dc85acc1d Redis
  • 34. REDIS DATA STRUCTURES Sets SADD  key  1 SISMEMBER  key  1 =>  1 =>  "1" SADD  key  2 SISMEMBER  key  5 =>  2 =>  "0" SADD  key  3 SRANDMEMBER  key =>  3 =>  "<RAND>" SMEMBERS  key SREM  key  3 =>  "3" =>  1 =>  "1" =>  "2" Redis
  • 35. REDIS DATA STRUCTURES Set Operations SADD  A  1 SADD  B  1 SADD  A  2 SADD  B  3 SMEMBERS  A SMEMBERS  B =>  "1" =>  "1" =>  "2" =>  "3" Redis
  • 36. REDIS DATA STRUCTURES Set Operations [1,2] [1,3] Union SUNION  A  B =>  1 =>  2 [1,2] [1,3] =>  3 Intersection SINTER  A  B =>  1 [1,2] [1,3] Difference SDIFF  A  B =>  2 http://en.wikipedia.org/wiki/Set_(mathematics)#Basic_operations Redis
  • 37. Usage Ad serving SADD  ads:cars      "Check  out  Toyota!" SADD  ads:cars      "Check  out  Ford!" ... SADD  ads:movies  "Check  out  Winter's  Bone!" ... SRANDMEMBER  ads:cars SRANDMEMBER  ads:movies Note: Time complexity is O(1). “Check out ODER BY RAND()!” Redis
  • 38. Usage Relations (Friends/followers) SADD  users:A:follows  B SADD  users:B:follows  C SADD  users:B:follows  D SADD  users:C:follows  A SADD  users:C:follows  D Redis
  • 39. Usage Relations (Friends/followers) # Joint network of A and B SUNION  users:A:follows  users:B:follows 1)  "C" 2)  "D" 3)  "B" Redis
  • 40. Usage Relations (Friends/followers) #  Common  for  A  and  B SINTER  users:A:follows  users:B:follows [] #  Common  for  B  and  C SINTER  users:B:follows  users:C:follows 1)  "D" #  Unique  to  B  compared  to  C SDIFF  users:B:follows  users:C:follows 1)  "C" Redis
  • 41. Usage Relations (Friends/followers) #  Whom  I  follow... SADD  friends  A SMEMBERS  friends SADD  friends  B 1)  "A" 2)  "B" #  Who  follows  me... SADD  followers  B SMEMBERS  followers SADD  followers  C 1)  "C" 2)  "B" Redis
  • 42. Usage Relations (Friends/followers) #  Mutual  relationships SINTER  friends  followers 1)  "B" #  Who  does  not  follow  me  back? SDIFF  friends  followers 1)  "A" #  Who  am  I  not  following  back? SDIFF  followers  friends 1)  "C" Redis
  • 43. Mining the Social Web Analyzing Data from Facebook, Twitter, LinkedIn, and Other Social Media Sites Matthew A. Russell http://books.google.com/books?id=SYM1lrQdrdsC&lpg=PP1&pg=PA94 http://oreilly.com/catalog/0636920010203 Redis
  • 44. Usage Relations (Article tags/categories) SADD  tags:ruby  article-­‐1 SADD  tags:java  article-­‐2 SADD  tags:web    article-­‐1 SADD  tags:web    article-­‐2 Redis
  • 45. Usage Relations (Article tags/categories) #  ruby  OR  java SUNION  tags:ruby  tags:java 1)  "article-­‐2" 2)  "article-­‐1" #  ruby  AND  java SINTER  tags:ruby  tags:java [] #  web  AND  NOT  ruby SDIFF  tags:web  tags:ruby 1)  "article-­‐2" Redis
  • 46. Usage Friends Online #  My  friends SADD  friends  A SADD  friends  B SADD  friends  C #  Friend  A  connects SADD  online:fresh  A SUNIONSTORE  online  online:fresh  online:stale #  Who's  online  now? SINTER  friends  online [A] Redis
  • 47. Usage Friends Online #  Every  minute,  rename  the  "fresh"  to  "stale"  ... RENAME  online:fresh  online:stale #  ...  and  update  the  "online"  set SUNIONSTORE  online  online:fresh  online:stale #  Friend  B  connects SADD  online:fresh  B SUNIONSTORE  online  online:fresh  online:stale #  Who's  online  now? SINTER  friends  online [A,B] Redis
  • 48. Usage Friends Online #  Time  passes  ... #  Rename  the  "fresh"  to  "stale",  every  minute  ... RENAME  online:fresh  online:stale #  ...  and  update  the  "online"  set SUNIONSTORE  online  online:fresh  online:stale #  Who's  online  now? SINTER  friends  online [B] Redis
  • 49. REDIS DATA STRUCTURES Sorted Sets ZADD  key  100  A ZREVRANGE  key  0  -­‐1 ZADD  key  10    C 1)  "A" ZADD  key  80    B 2)  "B" 3)  "C" ZRANGE  key  0  -­‐1 ZINCRBY  key  10  C 1)  "C" "20" 2)  "B" 3)  "A" Redis
  • 50. REDIS DATA STRUCTURES Sorted Sets ZREVRANGE  key  0  -­‐1   ZREVRANGEBYSCORE   WITHSCORES key  100  50 1)  "A" 1)  "A" 2)  "100" 2)  "B" 3)  "B" 4)  "80" 5)  "C" 6)  "20" Redis
  • 51. Usage Leaderboards #  User  A  got  10  points ZINCRBY  scores  10  A #  User  B  got  15  points ZINCRBY  scores  15  B #  User  A  got  another  10  points ZINCRBY  scores  10  A #  Display  scores ZREVRANGE  scores  0  -­‐1  WITHSCORES 1)  "A" 2)  "20" 3)  "B" 4)  "15" Redis
  • 52. Usage Inverted Index #  Index  document  A ZINCRBY  index:foo  1  document-­‐A ZINCRBY  index:foo  1  document-­‐A ZINCRBY  index:bar  1  document-­‐A #  Index  document  B ZINCRBY  index:foo  1  document-­‐B ZINCRBY  index:baz  1  document-­‐B #  Search  for  token  foo,  sort  by  occurences ZREVRANGE  index:foo  0  -­‐1  WITHSCORES 1)  "document-­‐A" 2)  "2" 3)  "document-­‐B" 4)  "1" Redis
  • 53. REDIS' SORTED SETS AS AN INDEX Inverted Index https://gist.github.com/928605 Redis
  • 54. Usage Counters (downloads, hits, votes, …) #  Total  downloads  for  server,  all  time GET  downloads:total #  Total  downloads  for  server,  today Mm'kay. But I need the GET  downloads:total:today “leaderboard” of downloads! #  Total  downloads  for  file GET  downloads:/downloads/file1.mpg:total #  Total  downloads  for  file  today INCR  downloads:/downloads/file1.mpg:today ... Redis
  • 55. Usage Counters (downloads, hits, votes, …) INCR  downloads:total INCR  downloads:total:today ... Easy! #  >  Individual  files #      GET  /downloads/file1.mpg ZINCRBY  downloads:files:total  1  /downloads/file1.mpg ZINCRBY  downloads:files:2011-­‐05-­‐10  1  /downloads/file1.mpg #      GET  /downloads/file2.mpg ZINCRBY  downloads:files:total  1  /downloads/file2.mpg ZINCRBY  downloads:files:2011-­‐05-­‐10  1  /downloads/file2.mpg ... Redis
  • 56. Usage Counters (downloads, hits, votes, …) #  10  most  downloaded,  all  the  time ZREVRANGE  downloads:files:total  0  10  WITHSCORES #  10  most  downloaded  on  2011-­‐05-­‐10 ZREVRANGE  downloads:files:2011-­‐05-­‐10  0  10  WITHSCORES #  10  most  downloaded  between  2011-­‐05-­‐10  and  <OTHER  DATE> ZUNIONSTORE  downloads:timeline  2                          downloads:files:2011-­‐05-­‐10                          <OTHER  DATE> ZREVRANGE  downloads:timeline  0  10  WITHSCORES https://gist.github.com/974306 Redis
  • 57. REDIS DATA STRUCTURES Hashes HMSET  users:1  username  j  name  John HMSET  users:2  username  m  name  Mary HGETALL  users:1 1)  "username" 2)  "j" ... HKEYS  users:1 1)  "username" 2)  "name" HSET  users:1  score  100 HGET  users:1  score 1)  "100" Redis
  • 58. Usage Structured data (Articles, users, …) HMSET  articles:1  title          "Redis  is  cool!"                                    content      "I  recently  ..."                                    published  "2011-­‐05-­‐10" HGETALL  articles:1 1)  "title" 2)  "Redis  is  cool!" 3)  "content" 4)  "I  recently  ..." 5)  "published" 6)  "2011-­‐05-­‐10" HSET  articles:1  title  "Redis  is  very  cool!" HGET  articles:1  title "Redis  is  very  cool!" Redis
  • 59. Usage User Preferences (No login) #  Save  preferences  from  <FORM> HMSET  prefs:<COOKIE  HASH>  background  #ccc  color  #333 #  Keep  it  for  one  year EXPIRE  prefs:<COOKIE  HASH>  31556926 #  Retrieve  preferences HGETALL  prefs:<COOKIE  HASH> Redis
  • 60. REDIS FEATURES Publish/Subscribe SUBSCRIBE    log.error PUBLISH        log.error  "ERROR" PSUBSCRIBE  log.* “AMQP” PUBLISH        log.error  "ERROR" =>  "ERROR" =>  "ERROR" PUBLISH        log.info  "INFO" =>  "INFO" Demo Redis
  • 62. REDIS FEATURES Virtual Memory #  redis.conf vm-­‐enabled  yes Allows to work with data sets bigger then available RAM. Swaps less often used values to disk. Keys must still fit into RAM. #  Make  Redis  disk-­‐bound  database vm-­‐max-­‐memory  0 The future? Redis Diskstore (disk-bound by default, cache in between server and disk) http://redis.io/topics/virtual-memory Redis
  • 63. REDIS FEATURES Replication #  slave.conf slaveof  127.0.0.1  6379 $  redis-­‐server  slave.conf The future? Redis Cluster (Dynamo-like, Distributed hash table) http://redis.io/topics/replication Redis
  • 64. REDIS FEATURES Scripting (experimental) $  git  clone  https://github.com/antirez/redis  -­‐b  scripting  redis-­‐scripting $  cd  redis-­‐scripting $  make $  echo  port  7397  |  ./src/redis-­‐server  -­‐ $  ./src/redis-­‐cli SET  myscript  "return  'HELLO'" EVAL  "return  loadstring(redis('get',  KEYS[1]))()"              1  myscript =>  "HELLO" http://antirez.com/post/scripting-branch-released.html Redis
  • 65. REDIS RESOURCES The Interactive Documentation PROMPT http://redis.io/commands Redis
  • 66. REDIS RESOURCES Simon Willison Tutorial http://simonwillison.net/static/2010/redis-tutorial/ Redis
  • 67. REDIS RESOURCES Redis Implementation Details http://pauladamsmith.com/articles/redis-under-the-hood.html Redis
  • 68. REDIS RESOURCES Redis Use Cases http://highscalability.com/blog/2010/12/6/what-the-heck-are-you-actually-using-nosql-for.html Redis
  • 69. REDIS RESOURCES The Original Metaphore… http://flazz.me/redis-the-ak-47-of-databases Redis