<?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>幽冥大盗-不进则退</title>
	<atom:link href="http://www.ys250.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ys250.com</link>
	<description>学而不思则罔,思而不学则殆</description>
	<lastBuildDate>Fri, 03 Sep 2010 05:30:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>redis + thrift + mongodb 数据测试</title>
		<link>http://www.ys250.com/2010/09/02/redis-thrift-mongodb-test/</link>
		<comments>http://www.ys250.com/2010/09/02/redis-thrift-mongodb-test/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 03:38:54 +0000</pubDate>
		<dc:creator>xiongyq</dc:creator>
				<category><![CDATA[系统构架]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[thrift]]></category>

		<guid isPermaLink="false">http://www.ys250.com/?p=785</guid>
		<description><![CDATA[
这几日在处理一个广告数据统计偏差的问题，为了验证数据的准确性，决定用一个新的统计方式对比测试。
&#160;
一、安装：
&#40;1&#41;. redis
&#160;
	wget http://redis.googlecode.com/files/redis-1.2.6.tar.gz
	tar -zxvf redis-1.2.6.tar.gz
	cd redis-1.2.6
	make
	mkdir -p /usr/local/redis/conf
	mkdir -p /usr/local/redis/db
	cp redis-server redis-cli redis-benchmark redis-stat /usr/local/redis/
	cp redis.conf /usr/local/redis/conf/
&#160;
	#修改配置文件
	daemonize no    修改成  daemonize yes
	logfile stdout  修改成  /usr/local/redis/redis.log
	dir ./          修改成  dir /usr/local/redis/db
&#160;
	#启动服务
	/usr/local/redis/redis-server /usr/local/redis/conf/redis.conf
&#160;
	#测试安装是否成功
	./redis-cli set foo test
	./redis-cli get foo
&#160;
	telnet 127.0.0.1 6379
&#160;
	set foo 3
	xx
	get foo
&#160;
	#安装客户端
	wget [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">这几日在处理一个广告数据统计偏差的问题，为了验证数据的准确性，决定用一个新的统计方式对比测试。
&nbsp;
一、安装：
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span>. <span style="color: #202020;">redis</span>
&nbsp;
	wget http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//redis.googlecode.com/files/redis-1.2.6.tar.gz</span>
	tar <span style="color: #339933;">-</span>zxvf redis<span style="color: #339933;">-</span>1.2.6.<span style="color: #202020;">tar</span>.<span style="color: #202020;">gz</span>
	cd redis<span style="color: #339933;">-</span>1.2.6
	make
	mkdir <span style="color: #339933;">-</span>p <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>redis<span style="color: #339933;">/</span>conf
	mkdir <span style="color: #339933;">-</span>p <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>redis<span style="color: #339933;">/</span>db
	cp redis<span style="color: #339933;">-</span>server redis<span style="color: #339933;">-</span>cli redis<span style="color: #339933;">-</span>benchmark redis<span style="color: #339933;">-</span>stat <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>redis<span style="color: #339933;">/</span>
	cp redis.<span style="color: #202020;">conf</span> <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>redis<span style="color: #339933;">/</span>conf<span style="color: #339933;">/</span>
&nbsp;
	<span style="color: #339933;">#修改配置文件</span>
	daemonize no    修改成  daemonize yes
	logfile stdout  修改成  <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>redis<span style="color: #339933;">/</span>redis.<span style="color: #202020;">log</span>
	dir .<span style="color: #339933;">/</span>          修改成  dir <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>redis<span style="color: #339933;">/</span>db
&nbsp;
	<span style="color: #339933;">#启动服务</span>
	<span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>redis<span style="color: #339933;">/</span>redis<span style="color: #339933;">-</span>server <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>redis<span style="color: #339933;">/</span>conf<span style="color: #339933;">/</span>redis.<span style="color: #202020;">conf</span>
&nbsp;
	<span style="color: #339933;">#测试安装是否成功</span>
	.<span style="color: #339933;">/</span>redis<span style="color: #339933;">-</span>cli set foo test
	.<span style="color: #339933;">/</span>redis<span style="color: #339933;">-</span>cli get foo
&nbsp;
	telnet 127.0.0.1 <span style="color: #0000dd;">6379</span>
&nbsp;
	set foo <span style="color: #0000dd;">3</span>
	xx
	get foo
&nbsp;
	<span style="color: #339933;">#安装客户端</span>
	wget http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.ys250.com/download/phpredis.tag.gz</span>
&nbsp;
	<span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>php<span style="color: #339933;">/</span>bin<span style="color: #339933;">/</span>phpize
	.<span style="color: #339933;">/</span>configure <span style="color: #339933;">-</span>with<span style="color: #339933;">-</span>php<span style="color: #339933;">-</span>config<span style="color: #339933;">=/</span>usr<span style="color: #339933;">/</span>local<span style="color: #339933;">/</span>php<span style="color: #339933;">/</span>bin<span style="color: #339933;">/</span>php<span style="color: #339933;">-</span>config
	make
	make  install
&nbsp;
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#41;</span>. <span style="color: #202020;">thrift</span>  安装见 <span style="color: #339933;"># http://www.ys250.com/2010/07/03/thrift_py_php/</span>
&nbsp;
<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#41;</span>. <span style="color: #202020;">mongodb</span> 安装见 <span style="color: #339933;"># http://www.ys250.com/2010/03/25/mongodb-php-%E7%9A%84%E5%BA%94%E7%94%A8/</span>
&nbsp;
测试结果：数据完全是正确的，两边数据对比没有偏差。
redis 在内存充足的情况下，12w<span style="color: #339933;">/</span>秒的写入速度，比memcache 快。
thrift 框架的使用，比soap使用更人性化。</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ys250.com/2010/09/02/redis-thrift-mongodb-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
