From: Blaine Cook Date: 2008-02-15T19:35:00+09:00 Subject: Re: Memcached: Dealing with unknown keys On Feb 14, 3:11 pm, Tony Garcia wrote: > Ben Bleything wrote: > > On Fri, Feb 15, 2008, Tony Garcia wrote: > > I read that. It's what pointed me toward memcache, actually. Again, part > of the problem is that I'm on a shared Joyent server, and I was trying > to work with what they had. Installing a beanstalk server isn't a very > good option for me at the moment. > > >> If anyone has a better suggestion, I'd love to hear it. This is the best > >> I've been able to figure out on my own. > > > I think the main problem is that memcache just isn't intended for what > > you're trying to do. The hash solution you came up with will get the > > job done, but it's a bit of a hack (as we both seem to agree). If it > > works though, there's not really any reason to change. > > My biggest concern is scalability. I'm pretty sure I'm going to have to > change things before too long. FWIW, we (Twitter) were on Joyent and used Starling (our message queue that speaks the memcache protocol) there with no problems. All you need to get started is to do a "gem install starling" and run it with write permissions to /var/spool/starling (you can specify a different path since it's unlikely you can write to /var on joyent). Once it's running, you can use the normal memcache library to connect to :22122 and use set() to put things in the queue and get() to take them out again. Hope that helps! b.