Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Redis

on

  • 3,530 views

A brief introduction to Redis I gave at Seattle Tech Startups meetup on November 11, 2010. Provides some example use cases.

A brief introduction to Redis I gave at Seattle Tech Startups meetup on November 11, 2010. Provides some example use cases.

Statistics

Views

Total Views
3,530
Views on SlideShare
3,528
Embed Views
2

Actions

Likes
2
Downloads
36
Comments
0

2 Embeds 2

http://www.mefeedia.com 1
http://trunk.ly 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Redis Redis Presentation Transcript

  • Redis Damon Cortesi (@dacort) Untitled Startup (RowFeeder)
  • Movember • Help support prostate cancer research • http://bit.ly/mo_dacort
  • Up and Running • wget http://redis.googlecode.com/files/ redis-2.0.4.tar.gz • tar xzvf redis-2.0.4.tar.gz • cd redis-2.0.4 • make • ./redis-server
  • Yes...that’s it • Redis in your browser • http://try.redis-db.com • http://code.google.com/p/redis/wiki/ CommandReference
  • http://try.redis-db.com
  • 101 • Key/Value Store on Steroids • memcache? • Persistent • Push/Pop • Data types • Fast - 110000 SETs/sec, 81000 GETs/sec
  • Redis Data Types • Strings • Lists • Sets • Sorted/Scored Sets • Hashes
  • But wait, there’s more! • Clustering • Replication • Master/Slave • Publish/Subscribe
  • Use Cases • Queue Processing • Set Intersection • Stats Tracking/Leaderboards
  • Web Status Processing rowfeeder.com Keyword Filter MySQL User & Track Data Resque Queue (redis) Geo Filter Other Custom Filters External Data Tagging Resque Workers - bit.ly, geo, klout Slave MySQL Geo Lookups Google Memcache MongoDB Status Storage Spreadsheet
  • Queues • Resque - Killer Ruby library for background jobs RPUSH a b c d LPOP • RowFeeder - 428,811,359 items processed
  • Set Intersections • Goal: Contact Ashton Kutcher on Twitter • Approach: Is there anybody I can DM that can DM Ashton, or a friend of his?
  • Step 1 • Are any of my followers his friends? • SADD - Add specified member to the set • SINTER - Intersection of N sets
  • Step 2 • Can I DM somebody that can DM a friend of his? • ?t ?
  • Sweet!
  • Scoreboards • Sorted ZSets • ZINCRBY - Increment Operator • ZRANGE - Sort + Subset
  • • Tracks Twitter/Facebook Posts • ~4,000 keywords monitored in real-time • ~2MM posts/day • Sometimes...
  • What’s Blowing Up?
  • Step 1 • Maintain counters of all matched terms • Increment the “stream::kw::time” key by 1
  • Step 2 • 5 minute running average of the top 10 terms
  • Limitations • Greedy with memory • If it grows to XGB...it will stay there • (Not optimal if a queue backs up) • All in RAM / Atomicity • 2.0 solves both of these! • NoSQL
  • Questions • @dacort • damon [at] untitledstartup.com