Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Beauty of Simplicity: Mastering Database Design with Redis

The Beauty of Simplicity: Mastering Database Design with Redis

Unless you’ve been hiding under a rock for the last couple of years, you probably know how fantastic Redis is. It combines the simplicity of a key-value store with the power of data structures to give you a Swiss Army-like API for doing amazing things with your data.

But what if we took our love for Redis a step further?

In this presentation we will talk through the lessons I learned when attempting to use Redis as my only datastore for an application. We will also look at how these lessons can be applied to your decision making in all of your data-driven applications, regardless of the datastore.

Ryan Briones

June 30, 2012
Tweet

Other Decks in Programming

Transcript

  1. 0 1 2 3 4 5 6 7 8 9

    10 11 12 13 Lists
  2. Sorted Sets n0 n1 n2 n3 n4 n5 n6 n7

    n8 n9 n10 n11 n12 n13
  3. INCR widgets:next_id SET widgets:1:name “Foo Widget” RPUSH widgets:all 1 ...

    INCR widgets:next_id SET widgets:2:name “Bar Widget” RPUSH widgets:all 2 Storing Widgets
  4. INCR widgets:next_id SET widgets:1:name “Foo Widget” RPUSH widgets:all 1 ...

    INCR widgets:next_id SET widgets:2:name “Bar Widget” RPUSH widgets:all 2
  5. INCR widgets:next_id SET widgets:1:name “Foo Widget” SET widgets:1:due_date 1339762363 RPUSH

    widgets:all 1 ZADD widgets:all_by_due_date 1 1339762590 ... INCR widgets:next_id SET widgets:2:name “Bar Widget” SET widgets:2:due_date 1339762363 RPUSH widgets:all 2 ZADD widgets:all_by_due_date 2 1339762363 Preparing to Query