Dave, Memcached will work fine for you. Just remember memcache is a temporary holding space for data. Data can go away due to purging in memcached due to memory maximum reached. Additionally, on any restart of memcached you will need to repopulate memcached with data.
You can add your cloud instance simply as another memcached instance so the data would be split between your initial memcached server and the one in the cloud. If you are mainly going to run this in a cloud then you might do without a local memcached and just remotely attach to the memcached instance in your cloud. You can accomplish this in a speedier/better way by running Moxi (a memcached proxy) in your local environment and having the cloud memcached as a remote memcached instance in your pool. Moxi manages dynamic pool redefinitions and provides a local memcached instance so repetitive requests will not need to go across the wire to your cloud (much faster). Finally, check out memcachedb which uses BerkeleyDB to store the memcached data seamlessly. It survives reboots with your data in tact. Probably best for you to run memcachedb in your cloud environment. Feel free to send me a message off the list if you have any questions. -Paul PubCrawler.com On Tue, Dec 15, 2009 at 12:25 AM, Dave L <[email protected]> wrote: > Hi, > I am writing an app using ruby on rails and am questioning if > memcached is an appropriate solution. I have a geography app that > allows a user to input anything related to geography like a city name, > river, or country. I parse different sources to return this > information such as wikipedia and this becomes very expensive. What I > would like to do is pre-cache everything. Right now, I am running a > rake task that takes a txt file that has every keyword possible, pings > wikipedia or wherever, then parses it, and then returns the data in an > array and caches it into memcached. > > Does memcached seem like a good solution? > > My other concern is that I am running this rake and loading the cache > on my local server with the hope of copying this cache to my server on > the cloud. Is this possible? > > Any help is appreciated. >
