REDIS: NOSQL DATA STORAGE
Everything and Anything I.T
Redis is an open source, advanced
key-value data store
Often referred to as a data structure server
since keys can contain strings, hashes, lists, sets
and sorted sets
Redis works with an in-memory dataset
Every second Redis can handle more than
100,000 Read/Write operations.
It is possible to persist dataset either by
dumping the dataset to disk every once in a while
or by appending each command to a log
List of Databases
Classical variant - store data in a relational
and many more...
Modern trend in a Web programming:
store data in NoSQL databases
NoSQL(Not Only SQL)
"Any form of distributed system with state, of which
a distributed database is the canonical example,
can exhibit almost two of the properties desirable
Consistency, Availability and Persistence“
--By CAP theorem
Retrieval of data with less constrained,
Simplicity of design,
Highly optimized ,
Performance benefits in terms of latency and throughput.
The exponential growth of the volume of data
generated by users and systems
The increasing interdependency and complexity of
data, accelerated by the Internet, Web 2.0, social
networks, mobile, etc
NoSQL databases are useful when working with a
huge quantity of data and the data's nature does
not require a relational model for the data
Basic Concepts and Techniques
CAP theorem (Consistency, Availability, Partition
ACID (Atomicity, Consistency, Isolation and Durability)
BASE (Basically Available, Soft State, Eventual
NoSQL Classification by feature
Data Model Performance Scalability Flexibility Complexity Functionality
variable variable low moderate
high high high none
variable variable high high graph theory
Column Store high high moderate low minimal
Some Redis commands
$ redis-cli set mykey "my binary safe value"
$ redis-cli get mykey
my binary safe value
List of Redis Clients
C, C++,Objective C, Node.js,
Redis Use Case
Show latest items listings in your home page.
Deletion and filtering.
Leaderboards and related problems
Real time analysis of what is happening, for
stats, anti spam, or whatever.