Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Redis
Search
Akshay Rawat
April 16, 2013
Programming
2
250
Redis
A Quick Intro
Akshay Rawat
April 16, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.1k
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
200
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
40
16k
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
510
SwiftUI Viewの責務分離
elmetal
PRO
2
270
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
14
4.6k
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
8
2.4k
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
260
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
210
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
120
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
1
210
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
260
Featured
See All Featured
How GitHub (no longer) Works
holman
314
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Navigating Team Friction
lara
183
15k
Designing Experiences People Love
moore
140
23k
Unsuck your backbone
ammeep
669
57k
Music & Morning Musume
bryan
46
6.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Git: the NoSQL Database
bkeepers
PRO
427
65k
Transcript
Redis
DATA STRUCTURES Strings, Lists, Sets, Sorted Sets, Hashes IPC Shared
Memory, MQs, Semaphores, PubSub Caching Expiration, Eviction Policies
Time Complexity O(1) < O(log(n)) < O(n) < O(n^2) ..
Containers String, Doubly Linked Lists, Skip Lists, Hash Tables ... Guaranteed, Mathematically Predictable Specialized C data structures Varies based on storage pattern
LIST Data Structure: Doubly Linked Lists Strengths: Time Complexity O(1)
operations LPUSH LPOP RPUSH RPOP LPUSHX RPUSHX LTRIM Capped collections: Logs, Activity Feeds
LIST Strengths: IPC operations BLPOP BRPOP BRPOPLPUSH Blocking Atomic EM
implementations Light weight APMQ replacement
SET Strengths: Set Operations SINTER SUNION SISMEMBER Is a friend?
Common Friends. All friends of A & B. People who bought this, also bought ... Data filtering - eg. Blog Tags, N Dimension
SORTED SET Strengths: Scores and Ranks ZRANGEBYSCORE ZRANGE ZCOUNT ZRANK
ZREMRANGEBYSCORE ZREMRANGEBYRANK Leader boards - Top something lists. Priority Queues
IPC Named Channels. ActiveSupport Notifications like API Pub Sub SUBSCRIBE
PSUBSCRIBE PUBLISH Simple Semaphores / Distributed Locks String SETNX
In Short Redis is feature rich, but not a swiss
knife ~Time & Memory complexity Single Threaded / Single Core Utilization Memory complexity is a funky blackbox Persistence strategy - a work in progress