3. 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
4. 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
5. 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
6. 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
7. Data Structures in Redis
Key/Value Pairs(not to be confused with redis hash)
12. 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
13. 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?
14. 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
15. 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)
16. Ohm - Fun with Patterns
Group
ToDo Person
Person
Person
Task
Task
Task
19. More . . .
Lets try an atomic operation
Take 1 task from the group todo queue and
assign it to a Person.
20. 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.