Redis and Ohm
Upcoming SlideShare
Loading in...5
×
 

Redis and Ohm

on

  • 11,944 views

Redis and Ohm presented by Mark Cotner to Atlanta Ruby Users group on June 9, 2010

Redis and Ohm presented by Mark Cotner to Atlanta Ruby Users group on June 9, 2010

Statistics

Views

Total Views
11,944
Views on SlideShare
11,928
Embed Views
16

Actions

Likes
18
Downloads
62
Comments
0

4 Embeds 16

https://twimg0-a.akamaihd.net 6
http://www.slideshare.net 5
http://a0.twimg.com 4
https://twitter.com 1

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
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />

Redis and Ohm Redis and Ohm Presentation Transcript

  • Mark Cotner Redis and Ohm June 9, 2010
  • Mark Cotner Redis and Ohm June 9, 2010 Atlanta Ruby Users Group
  • It’s good to be back This is my 4th presentation I noticed on our history many of my presentations were remembered, but the presenter(me) was forgotten I guess that means the content really came across well, but the presenter just wasn’t memorable enough :) I missed you! I’m awksedgreep on IRC, Twitter, etc
  • Redis Well beyond a simple Key-Value Store Has data structures programmers are already familiar with: Arrays, Hashes, Queues, and much much more Interacting with the “DB” is no different in most cases than interacting with these data structures Written in C for speed
  • Community Redis license is BSD Very active community on the mailing list and IRC (#redis on freenode) Fast moving project. Features are requested very often and implemented quickly. Very stable in spite of rapid change. Strong client support in Ruby with redis-rb and em- redis ORM support with Ohm, redis-objects and DataMapper
  • Lets talk Patterns Redis is a database that thinks like a programmer Publish/Subscribe Producer/Consumer(w or w/o Blocking Queues) Actor Arrays Lists/Sets Sorted Lists/Sets(dual-indexed lists) Object Properties by Primary Key(using Hashes, similar to the Active Record pattern) Sequence
  • Data Structures in Redis Key/Value Pairs(not to be confused with redis hash)
  • Data Structures in Redis Hash (not to be confused with key/value pairs)
  • Data Structures in Redis Arrays/Queues
  • Data Structures in Redis Sequences and Unsorted Sets
  • Data Structures in Redis Sorted Sets and Time Series Data
  • Redis and Ruby redis-rb - Widely used redis gem em-redis - Event Machine(async) redis gem Ohm - Object Relational Mapper for Redis, which now uses redis hashes resque - Relatively simple producer/consumer background workers using redis redis-TextSearch - Full text searching for AR using redis
  • Redis and Ruby continued redis-store - Session and cache store for Rack/Rails/ Sinatra Redis::Objects - Integrates with existing ORM, provides a more OOP style functionality to redis dm-redis-adapter - Full DataMapper functionality for redis(Yes, it will work in Rails 3.0) redactor - Actor Pattern on redis more?
  • redis-rb Just reached 2.0 milestone Supports all major redis features through 2.0 including Hashes Thread Safe(with :thread_safe => true flag) Very easy to use
  • Ohm - ORM for Redis Has a redis feel to it (Person[1] vs Person.find(1)) Uses hashes for attributes now, extremely fast Supports simple data validations Allows relations to be stored as sets or lists(collection)
  • Ohm - Fun with Patterns Group ToDo Person Person Person Task Task Task
  • Creating the Model in Ohm
  • Working with the Model
  • More . . . Lets try an atomic operation Take 1 task from the group todo queue and assign it to a Person.
  • Future of Redis Commercial Support - Likely from VMWare VM - Indexes will be stored in memory, data will be written to disk UDP - Many operations will be supported by lightweight UDP Performance - Seems like antirez finds a performance enhancement every few days Commands - New requests for commands come in all the time and seem to be implemented quickly if they make sense.
  • Questions?