Your SlideShare is downloading. ×
0
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)

8,382

Published on

PlayNice.ly's presentation at the first London Redis Meetup. A quick into to Redis, then digging down into some schema design examples.

PlayNice.ly's presentation at the first London Redis Meetup. A quick into to Redis, then digging down into some schema design examples.

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

No Downloads
Views
Total Views
8,382
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
9
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Admin stuff
    Thanks to Mint for hosting
    Why we’re organising it
    Hashtag
    Video/Slides etc
  • Put some times on here and include QA and drinks!!

  • Russian for Radish?
  • non-blocking io, single threaded
    pub sub and notifications
    replication
    cluster support soon
    1.2.6
    2.0 RC1 out...


  • Lives in Italy
    Active Mailing List
    20 client libraries in over 10 different languages

  • “Just about to enter private beta”
    Chose redis because
    1. Its cool
    2. Damn fast and scales well
  • - we went into it thinking: “hey, no schema needed :)”
    - sadly, not the case, need some structure (e.g. to key naming)
    - so here is how we tackled it...
  • - pretty obvious, just string keys :)
  • - again, pretty clear what is going on
    - linking projects and users? ...
  • Sets store COLLECTION of unique values, and will optimise data storage for integer values
  • Data integrity is enforced at the API level, not the DB level
    Migrations

  • nothing for python




  • 100k on bare-metal, 60% on EC2 VM



  • Transcript

    • 1. #redisldn Welcome (The First) London Redis Meetup @robbiehudson @adamcharnock @bash
    • 2. #redisldn The Agenda • Quick Redis introduction • Using Redis to store all our data, hahaha (Rob & Adam / PlayNice.ly) • Queuing and non-persistent lists (Thomas / Mint Digital) • Super-fast caching and Redis (Demis / mFlow) • QA
    • 3. #redisldn Onwards!
    • 4. #redisldn What is Redis?
    • 5. #redisldn What is Redis? • Advanced key value store • Data Structure Server (+ more!) • Lists, Sets, Hashes (and lots of other cool stuff) • Super-fast in Memory • But it is persistent, and now supports VM
    • 6. #redisldn Created by... Salvatore Sanfilippo (@antirez) ... now VMWare ... and Pieter Noordhuis
    • 7. #redisldn Redis and PlayNice.ly • PlayNice.ly: Collaboration web app for software developers... • So, a bug tracker :) • And we store all our information in Redis • users, projects, bugs, comments, audit logging, search indexes...
    • 8. #redisldn Redis schema example • Why you need a schema? ho ho ho
    • 9. #redisldn Users user:5:name → “Pete Mascot” user:5:username → “pete” user:5:email → “pete@playnice.ly”
    • 10. #redisldn Projects project:9:name → “Alan Parson’s Project” project:9:created_at → 1274815155 ...
    • 11. #redisldn Linking users to projects user:5:projects → SET(2, 9, 13) project:9:users → SET(3, 5, 9)
    • 12. #redisldn But that looks like hard work! • Yes it is, so use a model!
    • 13. #redisldn ORM for Redis • Ohm: http://ohm.keyvalue.org (Ruby) • http://github.com/nateware/redis-objects (Ruby) • http://github.com/whoahbot/dm-redis-adapter (Ruby) • http://github.com/kijin/stalkr (PHP, “not production ready”) • Roll your own (like we did, for Python)
    • 14. #redisldn A quick example >>> user = models.User.create() >>> user.user_id 6 >>> user.name = "Pete" >>> user.name u'Pete' >>> user.projects []
    • 15. #redisldn A quick example >>> project = models.Project.create() >>> project.project_id 8 >>> project.users []
    • 16. #redisldn A quick example >>> project.users.add(6) >>> project.users [6] >>> user.projects [8]
    • 17. #redisldn Proving it actually worked... >>> redis.get("user:6:name") 'Pete' >>> redis.smembers("project:8:users") set(['6']) >>> redis.smembers("user:6:projects") set(['8'])
    • 18. #redisldn Summary • It is very fast! • Other cool stuff: • search • migrations • message queuing • PlayNice.ly is entering into Private Beta in the next few weeks!
    • 19. #redisldn Find out more! •http://playnice.ly • http://playnice.ly/blog • @playnicelyapp
    • 20. #redisldn The Agenda • Quick Redis introduction • Using Redis to store all our data, hahaha (Rob & Adam / PlayNice.ly) • Queuing and non-persistent lists (Thomas / Mint Digital) • Super-fast caching and Redis (Demis / mFlow)
    • 21. #redisldn Thanks! Any Questions?

    ×