From: Jacob Burkhart Date: 2007-10-29T02:05:53+09:00 Subject: Re: A memcached-like server in Ruby - feasible? ------=_Part_8404_10978564.1193591155286 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'd like to see you take the approach of extending memcached with ruby. Leverage what memcached is already doing and already good at. Based on my limited understanding (please correct me if I'm wrong): memcached works by accepting a request for a certain 'key' and then returns all objects that match that key. Right? For example, you can make memcached store 1000 user records and then ask for all of them, but you can't ask for them with a 'query' that limits the set of users. The way that memcached would answer your query for 1000 users is to go to each node and fetch and return to you all the users stored in that node, this node has 400 of them, this node has 200 of them, combine them all together and return them... So what you want to do, is to be able to define some arbitrary ruby that gets executed at each Node to trim down the set of users so that the entire set doesn't need to be returned. So alter memcached to accept a 'query' in the form of arbitrary ruby (or perhaps a pre-defined ruby) that a peer-daemon is to execute over the set of results a particular memcached node contains. In my understanding, this is sort of the way CouchDB is supposed to work. (http://theexciter.com/articles/couchdb-views-in-ruby-instead-of-javascript) do you follow? ------=_Part_8404_10978564.1193591155286--