Project

hyperion

0.0
No commit activity in last 3 years
No release in over 3 years
Hyperion is a sweet Ruby data model thats backed with Redis. It's designed to be screamin' fast.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

hyperion¶ ↑

Hyperion is a lightning fast Ruby object model backed with Redis. It was created in 48 hours to back Leatherbound.me, a ebook comparison shopping tool that was built for Rails Rumble. We withstood 15,000 uniques on Monday morning, and Hyperion stayed super quick even with tons of concurrent queries on a small Linode.

Key features¶ ↑

  • CRUD on Ruby classes, any attributes get stuffed into a Redis key.

  • Indexing of objects on any attributes or collections of attributes.

A quickie¶ ↑

adrian$ gem install hyperion require ‘hyperion’ class Person < Hyperion # First we set up the attributes on this object. attr_accessor :name, :email, :password, :other_amazing_info, :car_color, :state # Let’s use the email as our primary key. # Another option would be to not define our own, in which case :id will be created & used. hyperion_key :email # Lets add some indexes! # We can search for all Persons with a given name. hyperion_index :name # We can also search for all people with a given car color and state. hyperion_index [:car_color, :state] end

p1 = Person.new({:name => ‘Adrian Pike’, :email => ‘adrian@pikeapps.com’, …}) p1.save Person.find(‘adrian@pikeapps.com’) #=> #<Person @name=“Adrian Pike”, @email=“adrian@pikeapps.com”> Person.find(:name => ‘Adrian Pike’) #=> [#<Person @name=“Adrian Pike”, @email=“adrian@pikeapps.com”>] Person.find(:car_color => ‘purple’, :state => ‘denial’) #=> [#<Person @name=“Adrian Pike”, @email=“adrian@pikeapps.com”>]

Requirements¶ ↑

  • Ruby 1.9

  • activesupport

  • Redis

Roadmap¶ ↑

  • Change the indexes to use ZSETs.

  • Delete. (ha!)

  • Schema versioning and migrations.

  • Faster faster faster! Let’s utilize more of Redis’ exposed data structures to make it better.

  • Clever auto-sharding based on primary keyspace

    • Figure out a way to auto-balance shards

  • Slow full-table searches.

  • Partial index searches

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Adrian Pike. See LICENSE for details.