1,049 karma · joined January 12, 2008
Redis is faster then tokyo by quite a bit but is not immediately durable as in the writes to disk happen in the background at certain trigger points so it is possible to lose a little bit of data if the server crashes.
But the power of redis comes in its data types. Having LISTS and SETS as well as string values for keys means you can do O(1) push/pop/shift/unshift as well as indexing/slicing into lists. And with the SET data type you can do set intersection in the server. This allows for very cool thigs like storing a set of tags for each key and then querying for the intersection of the set of tags of multiple keys to find out the common set of tags.
I'm using this in nanite(an agent based messaging system) for the persistent storage of agent state and routing info. Using the SET data types makes this faster then keeping the state in memory in my ruby processes since can do the SEt intersection routing inside opf redis rather then iterating and comparing in ruby:
You can also use redis LISTS as a queue to distribute work between multiple processes. Since pushing and popping are atomic you can use it as a shared tuple space. Also you can use a LIST as a circular log buffer by pushing to the end of a list and then doing an LTRIM to trim the list to the max size:
redis.list_push_tail('logs', 'some log line..') redis.list_trim('logs', 0, 99)
That will keep your circular log buffer at a max of 100 items.
With tokyo you can store lists if you use lua on the server, but to push or pop from a list you have to pull the entire list down, alter it and then push it back up to the server. There is no atomic push/pop of just a single item because tokyo canot store real lists as values so you have to do marhaling of your list to/from a string.
http://github.com/ezmobius/redis-rb/blob/0951204e6a84ca335ac...
And I am really enjoying being able to store lists as values and pushing/popping/indexing. Looking forward to where you are going with this.
Although the current release doesn't seem to support all the documented features yet. incrby and decrby don't work yet.
Can you get in touch? I'd love to pick your brain a little about redis.
So the answer is yes you will be able to replicate a traditional EY cluster setup on AWS in a few months.
Also you can run multiple applications on one solo instance. Since you have 1.7 gigs of ram you can run 3-6 little apps pretty easily if you use the apache + passenger stack.
The idea behind ey-solo(and the soon coming ey-flex) is that you don't want to have to learn all that stuff. We have been running and managing high volume ruby apps in production for 2.5 years now and we have taken our whole battle tested stack and are now offering it as SaaS.
So the goal is to save you time and hassle. We will maintain the whole stack with constant feature and security updates as well as bug fixes and all you need to do is write your app and leave the deployment and scaling hassles to us.
AWS is only the beginning, this platform will soon be available on other clouds as well as be downloadable so it can be run on any hosting provider if you run our linux and install our agent.
This means that eventually you will be able to host anywhere and still use our automated stack to manage the servers.
So Instead o've been using tokyo tyrant. It supports memcached protocol as well as HTTP and native client protocols.
http://tokyocabinet.sourceforge.net/tyrantdoc/
Much better then memcachedb and serves the same purpose.
It is highly scalable and spools the uploads to disk and does the mime parsing in efficient nginx C code> then once it finishes it just passes some params to your backend processes with the location of the file on disk and you can process it however you want.
Also working on some top secret engine yard projects that I will be able to talk about soon.
Vertebra is for controlling clusters and clouds at large while nanite is for building scalable backends for individual apps.
Sure, throwing more ec2 instances at the problem is one solution, but if you care about your apps performance you will try to optimize for smaller memory footprint.