• Save
PlayNice.ly: Using Redis to store all our data, hahaha (Redis London Meetup)
Upcoming SlideShare
Loading in...5
×
 

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

on

  • 9,749 views

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.

Statistics

Views

Total Views
9,749
Views on SlideShare
9,621
Embed Views
128

Actions

Likes
9
Downloads
0
Comments
0

1 Embed 128

http://www.slideshare.net 128

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

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
  • Admin stuff <br /> Thanks to Mint for hosting <br /> Why we&#x2019;re organising it <br /> Hashtag <br /> Video/Slides etc <br />
  • Put some times on here and include QA and drinks!! <br />
  • <br />
  • Russian for Radish? <br />
  • non-blocking io, single threaded <br /> pub sub and notifications <br /> replication <br /> cluster support soon <br /> 1.2.6 <br /> 2.0 RC1 out... <br /> <br /> <br />
  • Lives in Italy <br /> Active Mailing List <br /> 20 client libraries in over 10 different languages <br />
  • <br />
  • &#x201C;Just about to enter private beta&#x201D; <br /> Chose redis because <br /> 1. Its cool <br /> 2. Damn fast and scales well <br />
  • - we went into it thinking: &#x201C;hey, no schema needed :)&#x201D; <br /> - sadly, not the case, need some structure (e.g. to key naming) <br /> - so here is how we tackled it... <br />
  • - pretty obvious, just string keys :) <br />
  • - again, pretty clear what is going on <br /> - linking projects and users? ... <br />
  • Sets store COLLECTION of unique values, and will optimise data storage for integer values <br />
  • Data integrity is enforced at the API level, not the DB level <br /> Migrations <br /> <br />
  • nothing for python <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • 100k on bare-metal, 60% on EC2 VM <br />
  • <br />
  • <br />
  • <br />

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) Presentation Transcript

  • #redisldn Welcome (The First) London Redis Meetup @robbiehudson @adamcharnock @bash
  • #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
  • #redisldn Onwards!
  • #redisldn What is Redis?
  • #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
  • #redisldn Created by... Salvatore Sanfilippo (@antirez) ... now VMWare ... and Pieter Noordhuis
  • #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...
  • #redisldn Redis schema example • Why you need a schema? ho ho ho
  • #redisldn Users user:5:name → “Pete Mascot” user:5:username → “pete” user:5:email → “pete@playnice.ly”
  • #redisldn Projects project:9:name → “Alan Parson’s Project” project:9:created_at → 1274815155 ...
  • #redisldn Linking users to projects user:5:projects → SET(2, 9, 13) project:9:users → SET(3, 5, 9)
  • #redisldn But that looks like hard work! • Yes it is, so use a model!
  • #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)
  • #redisldn A quick example >>> user = models.User.create() >>> user.user_id 6 >>> user.name = "Pete" >>> user.name u'Pete' >>> user.projects []
  • #redisldn A quick example >>> project = models.Project.create() >>> project.project_id 8 >>> project.users []
  • #redisldn A quick example >>> project.users.add(6) >>> project.users [6] >>> user.projects [8]
  • #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'])
  • #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!
  • #redisldn Find out more! •http://playnice.ly • http://playnice.ly/blog • @playnicelyapp
  • #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)
  • #redisldn Thanks! Any Questions?