0% found this document useful (0 votes)
143 views17 pages

Remote Dictionary Server: Nilesh D Department of It

The document discusses Redis, an open source, BSD licensed, in-memory data structure store that can be used as a database, cache, message broker, and queue. Redis provides data structures like strings, hashes, lists, sets, and sorted sets and supports different persistence mechanisms to store data on disk. It was created in 2009 by Salvatore Sanfilippo and has gained popularity for its performance as a real-time analytics database and caching system.

Uploaded by

SHOBANA B T
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views17 pages

Remote Dictionary Server: Nilesh D Department of It

The document discusses Redis, an open source, BSD licensed, in-memory data structure store that can be used as a database, cache, message broker, and queue. Redis provides data structures like strings, hashes, lists, sets, and sorted sets and supports different persistence mechanisms to store data on disk. It was created in 2009 by Salvatore Sanfilippo and has gained popularity for its performance as a real-time analytics database and caching system.

Uploaded by

SHOBANA B T
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

REmote DIctionary Server

NILESH D
DEPARTMENT OF IT
Overview
History
Users
Logical Data Model
Atomic Operators
Transactions
Redis Persistance
WHY REDIS?

• Written in: C
• Main point: Blazing fast
• License: BSD, Open Source
• Disk-backed in-memory database,
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)
Other Users
Logical Data Model
Data Model
Key
Printable ASCII

Value
Primitives
Strings
Containers (of strings)
Hashes
Lists
Sets
Sorted Sets
Logical Data Model
Data Model
Key
Printable ASCII

Value
Primitives
Strings
Containers (of strings)
Hashes
Lists
Sets
Sorted Sets
Logical Data Model
Data Model
Key
Printable ASCII

Value
Primitives
Strings
Containers (of strings)
Hashes
Lists
Sets
Sorted Sets
Logical Data Model
Data Model
Key
Printable ASCII

Value
Primitives
Strings
Containers (of strings)
Hashes
Lists
Sets
Sorted Sets
Logical Data Model
Data Model
Key
Printable ASCII

Value
Primitives
Strings
Containers (of strings)
Hashes
Lists
Sets
Sorted Sets
Logical Data Model
Data Model
Key
Printable ASCII

Value
Primitives
Strings
Containers (of strings)
Hashes
Lists
Sets
Sorted Sets
Shopping Cart Example
Relational Model
carts
CartID User
1 james
2 chris
3 james
cart_lines
Cart Product Qty
1 28 1
1 372 2
2 15 1
2 160 5
2 201 7

UPDATE cart_lines
SET Qty = Qty + 2
WHERE Cart=1 AND Product=28
Shopping Cart Example
Relational Model Redis Model
carts set carts_james ( 1 3 )
CartID User set carts_chris ( 2 )
1 james hash cart_1 {
2 chris user : "james"
3 james
product_28 : 1
cart_lines product_372: 2
Cart Product Qty }
1 28 1 hash cart_2 {
1 372 2 user : "chris"
2 15 1 product_15 : 1
2 160 5 product_160: 5
2 201 7 product_201: 7
UPDATE cart_lines }
SET Qty = Qty + 2
HINCRBY cart_1 product_28 2
WHERE Cart=1 AND Product=28
REDIS ARCHITECTURE
REDIS Persistance

There are two different ways to make Redis persistance: RDB


and AO.
RDB Mechanism
RDB makes a copy of all the data in memory and stores them
in secondary storage(permanent storage). This happens in a
specified interval. So there is chance that you will loose data
that are set after RDB’s last snapshot.
AOF
AOF logs all the write operations received by the server.
Therefore everything is persistence. The problem with using
AOF is that it writes to disk for every operation and it is a
expensive task and also size of AOF file is large than RDB file.
Questions?

You might also like