Robert Havelka: REDIS – Letem světem

551 views
489 views

Published on

Bobova prezentace z PyVa, které proběhlo v brněnské Kaverně v lednu 2012.

Fotky z PyVa o NoSQL najdete zde: http://www.michaljanik.cz/pyvo-nosql

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
551
On SlideShare
0
From Embeds
0
Number of Embeds
31
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Robert Havelka: REDIS – Letem světem

  1. 1. REDIS – Letem světem Robert Havelka
  2. 2. What? „key-value” or „key-datastructure” storage string, hash, list, set a sorted set master - slave transactions
  3. 3. What REDIS means? It means REmote DIctionary Server It is a joke on the word Redistribute (instead to use just a Relational DB redistribute your workload among Redis servers)
  4. 4. String binary safe (JPEG, serialized objects) max 512M atomic counters INCR, DECR (64bit signed int) random access vector GETRANGE, SETRANGE http://redis.io/commands/#string
  5. 5. List list of Strings ordered max length of a List is 232-1 B(L|R)POP http://redis.io/commands#list
  6. 6. Set set of Strings max members in a Set is 232-1 extract elements at random SPOP, SRANDMEMBER http://redis.io/commands#set
  7. 7. Hash map between String fields and String values Hash can store up to 232-1 field-value pairs http://redis.io/commands#hash
  8. 8. Sorted set set of Strings members with score „most advanced Redis data types“ http://redis.io/commands#sorted_set
  9. 9. Transaction WATCH – check and set UNWATCH MULTI – start transaction block EXEC – commit transaction, unWATCH all DISCARD – rollback
  10. 10. Expiration EXPIRE (s) EXPIREAT (timestamp) PERSIST(cancel)
  11. 11. Persistence RDB memory snapshot key changes AOF fast (~1s) redis-check-aof + diff
  12. 12. Replication master – multiple slaves slave – slave graph-like structure cluster
  13. 13. Clients C – hiredis Java – Jedis LUA – redis-lua Perl – Redis PHP – Predis Python – redis-py Ruby – redis-rb
  14. 14. Sources http://redis.io Interactive tutorial - http://try.redis-db.com

×