object store in Heroku?

1 view
Skip to first unread message

lsiden

unread,
Nov 4, 2009, 9:51:37 PM11/4/09
to Detroit.rb
Does Heroku have anything like Google's Object Store? Based on the
site, they seem to host only a SQL database for storage. I just want
to store serialized (stringified) JSON objects keyed off of SHA1
hashes. I suppose I could do that in a SQL table defined as "name(key
char(n), json text)" (in pseudo-code). Any other recommendations?

Zach Church

unread,
Nov 4, 2009, 10:04:23 PM11/4/09
to rubyd...@googlegroups.com
I think what you're looking for is ActiveRecord::Base#serialize,
though I think this serializes as YAML:

http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002284

You could generate the SHA1 keys with a before_save callback.

Zach

lsiden

unread,
Nov 8, 2009, 12:11:00 AM11/8/09
to Detroit.rb
This looks perfect. Thanks!
Reply all
Reply to author
Forward
0 new messages