SlideShare a Scribd company logo
1 of 27
Download to read offline
Let’s talk about Sets




                ryan lemmer
* email
* password


             * period: start => stop
             * type: download, upload, visit
CREATE
CREATE

     KEY       VALUE
    “User:1”   {:email => “...”, :password => “...”}
CREATE

     KEY       VALUE
    “UserID”   1
    “User:1”   {:email => “...”, :password => “...”}
CREATE

    KEY       VALUE
   “UserID”   1
   “User:1”   {:email => “...”, :password => “...”}
  “UsageID”   1
  “Usage:1”   {:start => ?, :stop => ?, :type => “download”, :user_id => 1}
GET ITEM
GET ITEM
    KEY        VALUE
   “UserID”    1
   “User:1”    {:email => “...”, :password => “...”}
   “UsageID”   1
   “Usage:1”   {:start => ?, :stop => ?, :type => “download”, :user_id => 1}
GET ITEM
GET ITEM
            KEY           VALUE
           “UserID”       2
           “User:1”       {:email => “...”, :password => “...”}
           “User:2”       {:email => “...”, :password => “...”}
    “User: zaphod@m.com” 1
     “User: vortex@m.com” 2
GET ITEMS

                                     “Usage:2”
        “UserID”          “User:5”                     “User:2”
            “User:1”                  “User:4”
        “Usage:3”         “User:3”                “Usage:7”

      “Usage:5”                            “Usage:1”
                              “Usage:4”
              “Usage:6”
                               “Usage:8”
GET ITEMS
      KEY       VALUE
     “UserID”   2
     “User:1”   {:email => “...”, :password => “...”}
     “User:2”   {:email => “...”, :password => “...”}
     “User:3”   {:email => “...”, :password => “...”}
     “Users”    <1,2,3>
GET ITEMS
      KEY       VALUE
     “UserID”   2
     “User:1”   {:email => “...”, :password => “...”}
     “User:2”   {:email => “...”, :password => “...”}
     “User:3”   {:email => “...”, :password => “...”}
     “Users”    <1,2,3>
SORTED
 ITEMS
SORTED
 ITEMS
“User:1:usages”     “3”        “2”        “4”        “1”          “5”        value
                  1262325600 1262348100 1262369700 1262416500   1262512860   score
SORTED
 ITEMS
“User:1:usages”     “3”        “2”        “4”        “1”          “5”        value
                  1262325600 1262348100 1262369700 1262416500   1262512860   score
                     0          1          2          3            4         index
SORTED
 ITEMS
“User:1:usages”     “3”        “2”        “4”        “1”          “5”        value
                  1262325600 1262348100 1262369700 1262416500   1262512860   score
SORTED
 ITEMS
      KEY           VALUE
     “UserID”       2
     “User:1”       {:email => “...”, :password => “...”}
     “User:2”       {:email => “...”, :password => “...”}
     “User:3”       {:email => “...”, :password => “...”}
     “Users”        <1,2,3>
  “User:1:usages”   <(s1,1), (s2,2), (s3,3), (s4,4), (s5,5)>
  “User:2:usages”   <(s6,6), (s7,7), (s8,8)>
FILTER
ITEMS
FILTER
ITEMS
                   Downloads
         “1” “5”
         “7” “8”
                   Uploads
         “2” “4”
          “6”
                   Visits
            “3”
FILTER
ITEMS
                   Downloads
         “1” “5”
         “7” “8”
                   Uploads
         “2” “4”
          “6”
                   Visits
            “3”
FILTER
ITEMS
                              Downloads
    User:1:usages
                    “1” “5”
                    “7” “8”
    “1”  “3”
     “4”   “5”                Uploads
         “2”        “2” “4”
                     “6”
                              Visits
                       “3”
FILTER
ITEMS

                      INTERSECTION

                           “3”
     User:1:usages
                                 “1” “7”   Usage:downloads
                     “4”         “5” “8”
                           “2”
FILTER
ITEMS

         Usage:downloads

           “1” “5”
           “7” “8”
          Usage:uploads

           “2” “4”
            “6”
FILTER
ITEMS

    User:1:usages   Usage:downloads

    “1”  “3”          “1” “5”
     “4”   “5”        “7” “8”
         “2”
                     Usage:uploads

                      “2” “4”
                       “6”
Checkout...
github.com/ezmobius/redis-rb
ohm.keyvalue.org




                      ryan lemmer

More Related Content

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Let's talk about sets

  • 1. Let’s talk about Sets ryan lemmer
  • 2. * email * password * period: start => stop * type: download, upload, visit
  • 3.
  • 5. CREATE KEY VALUE “User:1” {:email => “...”, :password => “...”}
  • 6. CREATE KEY VALUE “UserID” 1 “User:1” {:email => “...”, :password => “...”}
  • 7. CREATE KEY VALUE “UserID” 1 “User:1” {:email => “...”, :password => “...”} “UsageID” 1 “Usage:1” {:start => ?, :stop => ?, :type => “download”, :user_id => 1}
  • 9. GET ITEM KEY VALUE “UserID” 1 “User:1” {:email => “...”, :password => “...”} “UsageID” 1 “Usage:1” {:start => ?, :stop => ?, :type => “download”, :user_id => 1}
  • 11. GET ITEM KEY VALUE “UserID” 2 “User:1” {:email => “...”, :password => “...”} “User:2” {:email => “...”, :password => “...”} “User: zaphod@m.com” 1 “User: vortex@m.com” 2
  • 12. GET ITEMS “Usage:2” “UserID” “User:5” “User:2” “User:1” “User:4” “Usage:3” “User:3” “Usage:7” “Usage:5” “Usage:1” “Usage:4” “Usage:6” “Usage:8”
  • 13. GET ITEMS KEY VALUE “UserID” 2 “User:1” {:email => “...”, :password => “...”} “User:2” {:email => “...”, :password => “...”} “User:3” {:email => “...”, :password => “...”} “Users” <1,2,3>
  • 14. GET ITEMS KEY VALUE “UserID” 2 “User:1” {:email => “...”, :password => “...”} “User:2” {:email => “...”, :password => “...”} “User:3” {:email => “...”, :password => “...”} “Users” <1,2,3>
  • 16. SORTED ITEMS “User:1:usages” “3” “2” “4” “1” “5” value 1262325600 1262348100 1262369700 1262416500 1262512860 score
  • 17. SORTED ITEMS “User:1:usages” “3” “2” “4” “1” “5” value 1262325600 1262348100 1262369700 1262416500 1262512860 score 0 1 2 3 4 index
  • 18. SORTED ITEMS “User:1:usages” “3” “2” “4” “1” “5” value 1262325600 1262348100 1262369700 1262416500 1262512860 score
  • 19. SORTED ITEMS KEY VALUE “UserID” 2 “User:1” {:email => “...”, :password => “...”} “User:2” {:email => “...”, :password => “...”} “User:3” {:email => “...”, :password => “...”} “Users” <1,2,3> “User:1:usages” <(s1,1), (s2,2), (s3,3), (s4,4), (s5,5)> “User:2:usages” <(s6,6), (s7,7), (s8,8)>
  • 21. FILTER ITEMS Downloads “1” “5” “7” “8” Uploads “2” “4” “6” Visits “3”
  • 22. FILTER ITEMS Downloads “1” “5” “7” “8” Uploads “2” “4” “6” Visits “3”
  • 23. FILTER ITEMS Downloads User:1:usages “1” “5” “7” “8” “1” “3” “4” “5” Uploads “2” “2” “4” “6” Visits “3”
  • 24. FILTER ITEMS INTERSECTION “3” User:1:usages “1” “7” Usage:downloads “4” “5” “8” “2”
  • 25. FILTER ITEMS Usage:downloads “1” “5” “7” “8” Usage:uploads “2” “4” “6”
  • 26. FILTER ITEMS User:1:usages Usage:downloads “1” “3” “1” “5” “4” “5” “7” “8” “2” Usage:uploads “2” “4” “6”