<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Observed by Burcu Dogan &#187; redis</title>
	<atom:link href="http://blog.burcudogan.com/tag/redis/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.burcudogan.com</link>
	<description>burcu dogan&#039;s monthly routine. caution: risk of overdose.</description>
	<lastBuildDate>Fri, 23 Jul 2010 12:09:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Redis: New Persistent Key-Value Store</title>
		<link>http://blog.burcudogan.com/324/</link>
		<comments>http://blog.burcudogan.com/324/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 21:16:23 +0000</pubDate>
		<dc:creator>Burcu Dogan</dc:creator>
				<category><![CDATA[Regular]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[redis]]></category>

		<guid isPermaLink="false">http://blog.burcudogan.com/?p=324</guid>
		<description><![CDATA[Most recently, I&#8217;m working on Redis which is a key-value datastore with interesting characteristics. It&#8217;s ultra fast and has built in atomic operations to handle concurrent usage. Although everything lives in-memory, Redis syncs with hard disk time to time to serve as permanent storage. Most impressively, downloading Redis and making a working build doesn&#8217;t take [...]]]></description>
			<content:encoded><![CDATA[<p>Most recently, I&#8217;m working on <a href="http://code.google.com/p/redis/">Redis</a> which is a key-value datastore with interesting characteristics. It&#8217;s ultra fast and has built in atomic operations to handle concurrent usage. Although everything lives in-memory, Redis syncs with hard disk time to time to serve as permanent storage. Most impressively, downloading Redis and making a working build doesn&#8217;t take more than a few minutes.</p>
<p>Redis explains itself as a non-volatile memcached with various in-built data structures. Instead of only key and string value pairs, you can have lists and sets as values. There are atomic pop/push operations to work on these structures and increment/decrement functionality to work on numeric values.</p>
<p>Several client libraries are available including Perl, Python, Erlang, C++, Ruby, Scala and PHP. To write a more meaningful post, I&#8217;d like to add lines from a simple Python script.</p>
<pre>
import redis

storage = redis.Redis()
storage.keys("a*")  # returns keys starting with a

storage.get("key1") # returns the value of "key1"
storage.set("key1", "hello world") # setting the value of "key1"
storage.delete("key1") # deletes the pair with key1.

# working on lists
storage.push('key2', 'This is the first value', tail=True)
storage.push('key2', 'This is the second value', tail=True)
print storage.pop('key2')
</pre>
<p>Most of <a href="http://code.google.com/p/redis/wiki/CommandReference">these methods</a> are ported to client libraries and are available in downloadable Redis archive.</p>
<p>Although Redis can not be distributed, it&#8217;s easy to set up a slave node to replicate the master. Since it syncs with hard-disk in certain intervals, there might be data-loss in possible system crashes. So, setting up a slave may decrease the risks. It&#8217;s also advised to use Redis on a central server and manage sharding in the application level.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.burcudogan.com/324/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
