SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Redis
Wer benutzt Redis?
Instagram
• Redis powers their main feed, activity
feed, sessions system.
• Redis runs on several Quadruple
Extra-Large Memory instances.
• runs in a master-replica setup. Replicas
constantly save to disk.
Stackoverflow
• Use Redis as a caching layer for the
entire network.
• around 1.300.000 keys in Redis cache.
• peak time we're getting a few hundred
read/writes a second to Redis.
• about 1% cpu usage
• started storing much bigger things in
Redis, like inboxes
Redis
• Schlüssel-Werte Datenstruktur
• In-Memory-Datenbank
• Transaction (optimistic Locking)
• Kein MapReduce
Philosophie
Performance
100.000 Schreiboperation
80.000 Leseoperation
pro Sekunde
Datenstrukturen
• String
• Hashes
• Lists
• Sets
• Sorted Sets
String
SET mykey "Hello"
GET mykey
Hash
HSET myhash field1 "Hello"
HGET myhash field1
Sets
SADD myset "Hello"
SADD myset "World"
SMEMBERS myset
Sorted Sets
ZADD myzset 1 "one"
ZADD myzset 1 "uno"
ZADD myzset 2 "two"
ZRANGE myzset 0 -1 WITHSCORES
Praktikum
Abfrage
Alle Buchungen, bei denen der Flug in
Düsseldorf (DUS) begonnen wird.
modelleriung
java
feingranular
Datenstruktur Schlüssel Wert
Set bookings
00QKXC
00D3N0
String exposed:00QKXC 0
Set passengers:00QKXC
Anna:Becker
Alexander:Becker
Hash Anna:Becker
salutations => MS
firstname => Anna
lastname => Becker
List flights:00QKXC
flight:TG921
flight:TG920
Hash flight:TG921
date => 1373407200
departs => 1373460300
fromAirportAbbr => DUS
Hash service:TG921 Infant
Hash seats:TG921
RAUSS/ARMINMR => 08C
(Non-smoking)
Hash fares:00QKXC
type => ADT
taxes => 57.22
Set segments:00QKXC
1
2
Realisierung
Set<String> allBookingIds = jedis.smembers(BOOKINGS);
String flightId;
for(String bookingId : allBookingIds) {
flightId = jedis.lrange(FLIGHTS + bookingId, 0, 0).get(0);
if(jedis.hget(flightId, FROM_AIRPORT_ABBR).equals(startAirport)){
allBookings.add(getBooking(bookingId));
}
}
modelleriung
java
grobgranular
ticket:00P5LM:eticket:220327240100C1,220327240100C2:exposed:1:flights:DUS->CDG->CDG->DUS
Hash Name
key => flights
flights => {...........}
Datenstruktur
GUI-Client
Realisierung
function getBookingsStartingIn($redis, $airport)
{
echo "----------------------------------------------------------n";
echo "Flüge die in $airport starten:n";
$tickets = $redis->query("*flights:$airport->*");
foreach ($tickets as $ticket){
echo "Flight " . $ticket["id"] . " starts in $airportn";
}
echo "----------------------------------------------------------n";
}
Fazit
• Einfache und schnelle Abfragen sind mit
Redis sehr gut zu realisieren.
• Gute Dokumentation.
• Abfragesprache ist nicht mächtig.
Danke für die
Aufmerksamkeit
Links
• Praktikum (Wiki)
• Installation (Webseite)
• Redis Befehle (API)
• NoSQL Einführung (Buch)
• Seven Databases in Seven Weeks (Buch)

Weitere ähnliche Inhalte

Was ist angesagt?

Luci, ricci and the rac bc
Luci, ricci and the rac bcLuci, ricci and the rac bc
Luci, ricci and the rac bc
fauzg
 
Mysql cluster
Mysql clusterMysql cluster
Mysql cluster
JS Lee
 
Apache Ambari - What's New in 1.2.4
Apache Ambari - What's New in 1.2.4Apache Ambari - What's New in 1.2.4
Apache Ambari - What's New in 1.2.4
Hortonworks
 
Sharding - Seoul 2012
Sharding - Seoul 2012Sharding - Seoul 2012
Sharding - Seoul 2012
MongoDB
 
Sharding
ShardingSharding
Sharding
MongoDB
 

Was ist angesagt? (20)

Automated Hadoop Cluster Construction on EC2
Automated Hadoop Cluster Construction on EC2Automated Hadoop Cluster Construction on EC2
Automated Hadoop Cluster Construction on EC2
 
Luci, ricci and the rac bc
Luci, ricci and the rac bcLuci, ricci and the rac bc
Luci, ricci and the rac bc
 
Mysql cluster
Mysql clusterMysql cluster
Mysql cluster
 
新浪微博开放平台Redis实战
新浪微博开放平台Redis实战新浪微博开放平台Redis实战
新浪微博开放平台Redis实战
 
企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
 
Redis database
Redis databaseRedis database
Redis database
 
Apache Ambari - What's New in 1.2.4
Apache Ambari - What's New in 1.2.4Apache Ambari - What's New in 1.2.4
Apache Ambari - What's New in 1.2.4
 
深入了解Redis
深入了解Redis深入了解Redis
深入了解Redis
 
Bacula4
Bacula4Bacula4
Bacula4
 
Travis
TravisTravis
Travis
 
Round trip - What changes & what doesn't
Round trip - What changes & what doesn'tRound trip - What changes & what doesn't
Round trip - What changes & what doesn't
 
Setting up repositories: Technical Requirements, Repository Software, Metad...
Setting up repositories:  Technical Requirements,  Repository Software, Metad...Setting up repositories:  Technical Requirements,  Repository Software, Metad...
Setting up repositories: Technical Requirements, Repository Software, Metad...
 
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFSHadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
Hadoop Meetup Jan 2019 - Mounting Remote Stores in HDFS
 
Redis and it's data types
Redis and it's data typesRedis and it's data types
Redis and it's data types
 
Redis 101 Data Structure
Redis 101 Data StructureRedis 101 Data Structure
Redis 101 Data Structure
 
Sharding - Seoul 2012
Sharding - Seoul 2012Sharding - Seoul 2012
Sharding - Seoul 2012
 
Sharding
ShardingSharding
Sharding
 
Sharding
ShardingSharding
Sharding
 
Intro to HTTP and Node.js
Intro to HTTP and Node.jsIntro to HTTP and Node.js
Intro to HTTP and Node.js
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 

Andere mochten auch

Trabajo de apoyo sociales
Trabajo de apoyo socialesTrabajo de apoyo sociales
Trabajo de apoyo sociales
davidcorreasj
 
Universidad técnica particular de loja
Universidad técnica particular de lojaUniversidad técnica particular de loja
Universidad técnica particular de loja
danny12morocho
 
REDES INFORMATICOS
REDES INFORMATICOSREDES INFORMATICOS
REDES INFORMATICOS
hoymi
 
Sociedad de la información y el conocimiento
Sociedad de la información y el conocimientoSociedad de la información y el conocimiento
Sociedad de la información y el conocimiento
mariana
 

Andere mochten auch (20)

One year in now media
One year in now mediaOne year in now media
One year in now media
 
As Visitas De Estudo Do Curso Efa
As Visitas De Estudo Do Curso EfaAs Visitas De Estudo Do Curso Efa
As Visitas De Estudo Do Curso Efa
 
Trabajo de apoyo sociales
Trabajo de apoyo socialesTrabajo de apoyo sociales
Trabajo de apoyo sociales
 
The chicago bulls
The chicago bullsThe chicago bulls
The chicago bulls
 
Sustentabilidade
SustentabilidadeSustentabilidade
Sustentabilidade
 
Bolsa millonaria bvc 2010
Bolsa millonaria bvc 2010Bolsa millonaria bvc 2010
Bolsa millonaria bvc 2010
 
Mujeres y Pintores famosos
Mujeres y Pintores famososMujeres y Pintores famosos
Mujeres y Pintores famosos
 
Guía para Consultar las Base de Datos - Registro de Inventario
Guía para Consultar las Base de Datos - Registro de InventarioGuía para Consultar las Base de Datos - Registro de Inventario
Guía para Consultar las Base de Datos - Registro de Inventario
 
Proyecto Arservir Ltda
Proyecto Arservir LtdaProyecto Arservir Ltda
Proyecto Arservir Ltda
 
Universidad técnica particular de loja
Universidad técnica particular de lojaUniversidad técnica particular de loja
Universidad técnica particular de loja
 
REDES INFORMATICOS
REDES INFORMATICOSREDES INFORMATICOS
REDES INFORMATICOS
 
Erdrugs
ErdrugsErdrugs
Erdrugs
 
Mobile health milstein
Mobile health milsteinMobile health milstein
Mobile health milstein
 
El largo camino hacia la Administración Electrónica
El largo camino hacia la Administración ElectrónicaEl largo camino hacia la Administración Electrónica
El largo camino hacia la Administración Electrónica
 
Estrategias Tic En Epocas De Crisis
Estrategias Tic En Epocas De CrisisEstrategias Tic En Epocas De Crisis
Estrategias Tic En Epocas De Crisis
 
Topologias
TopologiasTopologias
Topologias
 
Sociedad de la información y el conocimiento
Sociedad de la información y el conocimientoSociedad de la información y el conocimiento
Sociedad de la información y el conocimiento
 
FELIZ AÑO 2012!
FELIZ AÑO 2012!FELIZ AÑO 2012!
FELIZ AÑO 2012!
 
Bodite kreativni- Nastja Mulej
Bodite kreativni- Nastja MulejBodite kreativni- Nastja Mulej
Bodite kreativni- Nastja Mulej
 
Listaequiuposytutor
ListaequiuposytutorListaequiuposytutor
Listaequiuposytutor
 

Ähnlich wie Redis

Cassandra vs. Redis
Cassandra vs. RedisCassandra vs. Redis
Cassandra vs. Redis
Tim Lossen
 
Redis everywhere - PHP London
Redis everywhere - PHP LondonRedis everywhere - PHP London
Redis everywhere - PHP London
Ricard Clau
 
Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?
Tim Lossen
 
Intro to big data choco devday - 23-01-2014
Intro to big data   choco devday - 23-01-2014Intro to big data   choco devday - 23-01-2014
Intro to big data choco devday - 23-01-2014
Hassan Islamov
 
Redis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHPRedis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHP
Ricard Clau
 
Cassandra
CassandraCassandra
Cassandra
exsuns
 
Scalable and High available Distributed File System Metadata Service Using gR...
Scalable and High available Distributed File System Metadata Service Using gR...Scalable and High available Distributed File System Metadata Service Using gR...
Scalable and High available Distributed File System Metadata Service Using gR...
Alluxio, Inc.
 

Ähnlich wie Redis (20)

Redis - The Universal NoSQL Tool
Redis - The Universal NoSQL ToolRedis - The Universal NoSQL Tool
Redis - The Universal NoSQL Tool
 
Redis acc 2015_eng
Redis acc 2015_engRedis acc 2015_eng
Redis acc 2015_eng
 
Cassandra vs. Redis
Cassandra vs. RedisCassandra vs. Redis
Cassandra vs. Redis
 
Redis everywhere - PHP London
Redis everywhere - PHP LondonRedis everywhere - PHP London
Redis everywhere - PHP London
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
 
Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?
 
Intro to big data choco devday - 23-01-2014
Intro to big data   choco devday - 23-01-2014Intro to big data   choco devday - 23-01-2014
Intro to big data choco devday - 23-01-2014
 
Running MySQL on Linux
Running MySQL on LinuxRunning MySQL on Linux
Running MySQL on Linux
 
Scalable Filesystem Metadata Services with RocksDB
Scalable Filesystem Metadata Services with RocksDBScalable Filesystem Metadata Services with RocksDB
Scalable Filesystem Metadata Services with RocksDB
 
Introduction to Google BigQuery
Introduction to Google BigQueryIntroduction to Google BigQuery
Introduction to Google BigQuery
 
Redis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHPRedis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHP
 
Managing Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using ElasticsearchManaging Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using Elasticsearch
 
Column Stores and Google BigQuery
Column Stores and Google BigQueryColumn Stores and Google BigQuery
Column Stores and Google BigQuery
 
AWS Webcast - Backup & Restore for ElastiCache/Redis: Getting Started & Best ...
AWS Webcast - Backup & Restore for ElastiCache/Redis: Getting Started & Best ...AWS Webcast - Backup & Restore for ElastiCache/Redis: Getting Started & Best ...
AWS Webcast - Backup & Restore for ElastiCache/Redis: Getting Started & Best ...
 
Ceph Day Santa Clara: Ceph at DreamHost
Ceph Day Santa Clara: Ceph at DreamHost Ceph Day Santa Clara: Ceph at DreamHost
Ceph Day Santa Clara: Ceph at DreamHost
 
Cassandra
CassandraCassandra
Cassandra
 
Scalable and High available Distributed File System Metadata Service Using gR...
Scalable and High available Distributed File System Metadata Service Using gR...Scalable and High available Distributed File System Metadata Service Using gR...
Scalable and High available Distributed File System Metadata Service Using gR...
 
Getting started with Amazon ElastiCache
Getting started with Amazon ElastiCacheGetting started with Amazon ElastiCache
Getting started with Amazon ElastiCache
 

Mehr von imalik8088 (6)

Sharia
ShariaSharia
Sharia
 
Vom ewigen Aufschieben (Procrastination)
Vom ewigen Aufschieben (Procrastination)Vom ewigen Aufschieben (Procrastination)
Vom ewigen Aufschieben (Procrastination)
 
Sweden
SwedenSweden
Sweden
 
India cultural differences
India cultural differencesIndia cultural differences
India cultural differences
 
Tod Jesu (urdu: Wafat-e-Masih)
Tod Jesu (urdu: Wafat-e-Masih)Tod Jesu (urdu: Wafat-e-Masih)
Tod Jesu (urdu: Wafat-e-Masih)
 
Hadoop Einführung @codecentric
Hadoop Einführung @codecentricHadoop Einführung @codecentric
Hadoop Einführung @codecentric
 

Kürzlich hochgeladen

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Redis