<?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>猫言猫语 &#187; 开源技术</title>
	<atom:link href="http://www.wuwx.net/categories/%e5%bc%80%e6%ba%90%e6%8a%80%e6%9c%af/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wuwx.net</link>
	<description>严以律己·宽以待人·自强不息·知行合一</description>
	<lastBuildDate>Mon, 19 Dec 2011 00:27:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<atom:link rel='hub' href='http://www.wuwx.net/?pushpress=hub'/>
<cloud domain='www.wuwx.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>纠结的MySQL log-bin</title>
		<link>http://www.wuwx.net/archives/6077</link>
		<comments>http://www.wuwx.net/archives/6077#comments</comments>
		<pubDate>Mon, 19 Dec 2011 00:27:26 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[log-bin]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/?p=6077</guid>
		<description><![CDATA[开启log-bin硬盘总满，不开启log-bin表总crash，纠结啊纠结啊]]></description>
			<content:encoded><![CDATA[<p>开启log-bin硬盘总满，不开启log-bin表总crash，纠结啊纠结啊</p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6077" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/6077/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable ARP for VIP</title>
		<link>http://www.wuwx.net/archives/6050</link>
		<comments>http://www.wuwx.net/archives/6050#comments</comments>
		<pubDate>Thu, 17 Nov 2011 02:52:43 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[arp]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/6050</guid>
		<description><![CDATA[echo 1 &#62; /proc/sys/net/ipv4/conf/eth0/arp_ignore echo 2 &#62; /proc/sys/net/ipv4/conf/eth0/arp_announce net.ipv4.conf.eth0.arp_ignore = 1 net.ipv4.conf.eth0.arp_announce = 2]]></description>
			<content:encoded><![CDATA[<blockquote><p>echo 1 &gt; /proc/sys/net/ipv4/conf/eth0/arp_ignore     <br />echo 2 &gt; /proc/sys/net/ipv4/conf/eth0/arp_announce</p>
</blockquote>
<blockquote><p>net.ipv4.conf.eth0.arp_ignore = 1      <br />net.ipv4.conf.eth0.arp_announce = 2</p>
</blockquote>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6050" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/6050/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Signed and Permanent cookies in Rails 3</title>
		<link>http://www.wuwx.net/archives/5997</link>
		<comments>http://www.wuwx.net/archives/5997#comments</comments>
		<pubDate>Mon, 08 Aug 2011 00:44:17 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[Permanent]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Signed]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/5997</guid>
		<description><![CDATA[David added a very cool feature to Rails recently – Signed cookies and permanent cookies This lets you set permanent and/or signed cookies very easily. Before this, you’d have to write : cookies[:user_preference] = { :value =&#62; @current_user.preferences, :expires =&#62; 20.years.from_now.utc } Now just becomes : cookies.permanent[:user_preference] = @current_user.preferences In case you happen to have [...]]]></description>
			<content:encoded><![CDATA[<p>David added a very cool feature to Rails recently – <a href="http://github.com/rails/rails/commit/0200e20f148c96afceeebc4da7b5985643f9f707">Signed cookies and permanent cookies</a> This lets you set permanent and/or signed cookies very easily.
<p>Before this, you’d have to write :</p>
<pre>cookies[:user_preference] = {
  :value =&gt; @current_user.preferences,
  :expires =&gt; 20.years.from_now.utc
}</pre>
<p>Now just becomes :</p>
<pre>cookies.permanent[:user_preference] = @current_user.preferences</pre>
<p>In case you happen to have seen my <a href="http://m.onkey.org/2009/10/18/railssummit-slides">Railssummit presentation</a> I had talked about using <a href="http://api.rubyonrails.org/classes/ActiveSupport/MessageVerifier.html">ActiveSupport::MessageVerifier</a> for implementing “Remember me” functionality. The above commit makes that a whole lot easier.</p>
<p>In your model <tt>User.rb</tt> :</p>
<pre># User.rb
def self.authenticated_with_token(id, stored_salt)
  u = find_by_id(user_id)
  u &amp;&amp; u.salt == stored_salt ? u : nil
end</pre>
<p>And when the user checks “Remember me” box, make sure the following gets run :</p>
<pre>cookies.permanent.signed[:remember_me] = [current_user.id, current_user.salt]</pre>
<p>This will set a permanent and signed cookie using the secret specified in <tt>ActionController::Base.cookie_verifier_secret</tt>. If you don’t have the <tt>cookie_verifier_secret</tt> defined, you might want to do that in one of the initializers.</p>
<p>Now when you want to login using the cookie :</p>
<pre>user = User.authenticated_with_token(*cookies.signed[:remember_me])</pre>
<p>In this specific case, it’s very important to use the <tt>salt</tt> in the cookie value. That makes sure the cookie gets invalidated if the user changes his password.</p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5997" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/5997/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>为CentOS Linux安装配置ntp服务</title>
		<link>http://www.wuwx.net/archives/5979</link>
		<comments>http://www.wuwx.net/archives/5979#comments</comments>
		<pubDate>Sat, 11 Jun 2011 13:57:05 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ntp]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/5979</guid>
		<description><![CDATA[具体只看命令不解释： [root@iscsi sysconfig]# yum install ntp[root@iscsi sysconfig]# chkconfig --level 2345 ntpd on[root@iscsi sysconfig]# vim /etc/sysconfig/ntpdOPTIONS="-u ntp:ntp -x -p /var/run/ntpd.pid"[root@iscsi sysconfig]# service ntpd restart]]></description>
			<content:encoded><![CDATA[<p>具体只看命令不解释：</p>
<p>[root@iscsi sysconfig]# yum install ntp<br />[root@iscsi sysconfig]# chkconfig --level 2345 ntpd on<br />[root@iscsi sysconfig]# vim /etc/sysconfig/ntpd<br />OPTIONS="-u ntp:ntp -x -p /var/run/ntpd.pid"<br />[root@iscsi sysconfig]# service ntpd restart</p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5979" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/5979/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在CentOS Linux系统上提供iSCSI存储服务</title>
		<link>http://www.wuwx.net/archives/5978</link>
		<comments>http://www.wuwx.net/archives/5978#comments</comments>
		<pubDate>Sat, 11 Jun 2011 13:45:00 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[iSCSI]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/5978</guid>
		<description><![CDATA[一、硬件环境介绍 　　先看iSCSI服务器的硬盘配置信息，/dev/sda给本机使用，将/dev/sdb和/dev/sdc作为共享存储提供给其他客户机。 二、安装相关服务 　　通过yum命令先把服务器需要的服务装上：yum install scsi-target-utils 三、配置相关服务 配置iptables防火墙，打开TCP 3260端口，并重新启动iptables：-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3260 -j ACCEPT 安装完成后，编辑其配置文件：vim /etc/tgt/targets.conf ，找个合适的位置加上要共享出去的存储的配置信息： &#60;target iqn.2008-09.cn.edu.neu.oracle.iscsi:storage&#62;&#160;&#160;&#160; backing-store /dev/sdb&#160;&#160;&#160; backing-store /dev/sdc&#60;/target&#62; 重新启动tgtd服务：service tgtd restart 并保持tgtd服务随系统启动：chkconfig --level 2345 tgtd on 四、配置结果测试 查看共享情况：tgtadm --op show --mode target]]></description>
			<content:encoded><![CDATA[<h5>一、硬件环境介绍</h5>
<p>　　先看iSCSI服务器的硬盘配置信息，/dev/sda给本机使用，将/dev/sdb和/dev/sdc作为共享存储提供给其他客户机。</p>
<p><a href="http://www.wuwx.net/wp-content/uploads/2011/06/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.wuwx.net/wp-content/uploads/2011/06/image_thumb.png" width="501" height="321"></a></p>
<h5>二、安装相关服务</h5>
<p>　　通过yum命令先把服务器需要的服务装上：yum install scsi-target-utils</p>
<p><a href="http://www.wuwx.net/wp-content/uploads/2011/06/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.wuwx.net/wp-content/uploads/2011/06/image_thumb1.png" width="372" height="129"></a></p>
<h5>三、配置相关服务</h5>
<p>配置iptables防火墙，打开TCP 3260端口，并重新启动iptables：<br />-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3260 -j ACCEPT</p>
<p>安装完成后，编辑其配置文件：vim /etc/tgt/targets.conf ，找个合适的位置加上要共享出去的存储的配置信息：</p>
<p>&lt;target iqn.2008-09.cn.edu.neu.oracle.iscsi:storage&gt;<br />&nbsp;&nbsp;&nbsp; backing-store /dev/sdb<br />&nbsp;&nbsp;&nbsp; backing-store /dev/sdc<br />&lt;/target&gt;</p>
<p>重新启动tgtd服务：service tgtd restart</p>
<p><a href="http://www.wuwx.net/wp-content/uploads/2011/06/image2.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.wuwx.net/wp-content/uploads/2011/06/image_thumb2.png" width="541" height="52"></a></p>
<p>并保持tgtd服务随系统启动：chkconfig --level 2345 tgtd on</p>
<p>四、配置结果测试</p>
<p>查看共享情况：tgtadm --op show --mode target</p>
<p><a href="http://www.wuwx.net/wp-content/uploads/2011/06/image3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.wuwx.net/wp-content/uploads/2011/06/image_thumb3.png" width="425" height="434"></a></p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5978" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/5978/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS5下PHP连接Sybase的方法</title>
		<link>http://www.wuwx.net/archives/5967</link>
		<comments>http://www.wuwx.net/archives/5967#comments</comments>
		<pubDate>Mon, 30 May 2011 02:29:10 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sybase]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/5967</guid>
		<description><![CDATA[第一步：先安装freetds及相关库 yum install freetds freetds-devel 第二步：下载php源码及编译sybase扩展 wget http://cn.php.net/get/php-5.3.6.tar.bz2/from/this/mirrortar jxvf php-5.3.6.tar.bz2 cd php-5.3.6/ext/sybase_ct/phpize./configure --with-sybase-ct=/usrmakemake install 第三步：载入PHP的sybase扩展 cd /etc/php.dvim sybase_ct.ini extension=sybase_ct.so 第四步：重新启动Apache完成 service httpd restart]]></description>
			<content:encoded><![CDATA[<h4>第一步：先安装freetds及相关库</h4>
<p>yum install freetds freetds-devel</p>
<h4>第二步：下载php源码及编译sybase扩展</h4>
<p>wget http://cn.php.net/get/php-5.3.6.tar.bz2/from/this/mirror<br />tar jxvf php-5.3.6.tar.bz2 <br />cd php-5.3.6/ext/sybase_ct/<br />phpize<br />./configure --with-sybase-ct=/usr<br />make<br />make install</p>
<h4>第三步：载入PHP的sybase扩展</h4>
<p>cd /etc/php.d<br />vim sybase_ct.ini <br />extension=sybase_ct.so</p>
<h4>第四步：重新启动Apache完成</h4>
<p>service httpd restart</p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5967" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/5967/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何退出xm console界面？</title>
		<link>http://www.wuwx.net/archives/5957</link>
		<comments>http://www.wuwx.net/archives/5957#comments</comments>
		<pubDate>Thu, 10 Mar 2011 23:58:10 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[xm]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/5957</guid>
		<description><![CDATA[　　Xen虚拟机用xm console domainid打开虚拟机的控制台，操作完成后想退出去该怎么办呢？ 　　esc+ctrl+] 　　使用这三个组合键即可，注意先后顺序，先按esc，然后ctrl，最后才是]]]></description>
			<content:encoded><![CDATA[<p>　　Xen虚拟机用xm console domainid打开虚拟机的控制台，操作完成后想退出去该怎么办呢？</p>
<p>　　esc+ctrl+]</p>
<p>　　使用这三个组合键即可，注意先后顺序，先按esc，然后ctrl，最后才是]</p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5957" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/5957/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FTP Server Passive模式下iptables配置</title>
		<link>http://www.wuwx.net/archives/5955</link>
		<comments>http://www.wuwx.net/archives/5955#comments</comments>
		<pubDate>Thu, 03 Mar 2011 08:31:44 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/5955</guid>
		<description><![CDATA[　　在一台Server上开了FTP Server之后，防火墙只打开了21端口，某些FTP Client连接时会有端口被Block的一些提示，发现是由于PassivePortRange的端口范围没有被iptables允许通过的缘故。 　　一种简单的解决办法是吧PassivePortRange的端口范围全部加到iptables的配置文件中： 　　-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 30000:50000 -j ACCEPT 　　不过这个方法有个缺点，如果在FTP Server里把端口范围改掉了，同时需要在iptables也把这个范围改掉，算是有点小缺憾吧。 　　另外一种办法是给iptables加上ftp模块，让他自动识别PassivePort，在/etc/sysconfig/iptables-config中加入： 　　IPTABLES_MODULES="ip_conntrack_netbios_ns ip_nat_ftp"]]></description>
			<content:encoded><![CDATA[<p>　　在一台Server上开了FTP Server之后，防火墙只打开了21端口，某些FTP Client连接时会有端口被Block的一些提示，发现是由于PassivePortRange的端口范围没有被iptables允许通过的缘故。</p>
<p>　　一种简单的解决办法是吧PassivePortRange的端口范围全部加到iptables的配置文件中：</p>
<p>　　-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 30000:50000 -j ACCEPT</p>
<p>　　不过这个方法有个缺点，如果在FTP Server里把端口范围改掉了，同时需要在iptables也把这个范围改掉，算是有点小缺憾吧。</p>
<p>　　另外一种办法是给iptables加上ftp模块，让他自动识别PassivePort，在/etc/sysconfig/iptables-config中加入：</p>
<p>　　IPTABLES_MODULES="ip_conntrack_netbios_ns ip_nat_ftp"</p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5955" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/5955/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison</title>
		<link>http://www.wuwx.net/archives/5954</link>
		<comments>http://www.wuwx.net/archives/5954#comments</comments>
		<pubDate>Fri, 18 Feb 2011 06:14:25 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[CouchDB]]></category>
		<category><![CDATA[HBase]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[Redis]]></category>
		<category><![CDATA[Riak]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/5954</guid>
		<description><![CDATA[While SQL databases are insanely useful tools, their tyranny of ~15 years is coming to an end. And it was just time: I can't even count the things that were forced into relational databases, but never really fitted them. But the differences between &#34;NoSQL&#34; databases are much bigger than it ever was between one SQL [...]]]></description>
			<content:encoded><![CDATA[<p>While SQL databases are insanely useful tools, their tyranny of ~15 years is coming to an end. And it was just time: I can't even count the things that were forced into relational databases, but never really fitted them. </p>
<p>But the differences between &quot;NoSQL&quot; databases are much bigger than it ever was between one SQL database and another. This means that it is a bigger responsibility on software architects to choose the appropriate one for a project right at the beginning. </p>
<p>In this light, here is a comparison of <a href="http://cassandra.apache.org/">Cassandra</a>, <a href="http://www.mongodb.org/">Mongodb</a>, <a href="http://couchdb.apache.org/">CouchDB</a>, <a href="http://redis.io/">Redis</a>, <a href="http://www.basho.com/Riak.html">Riak</a> and <a href="http://hbase.apache.org/">HBase</a>: </p>
<h4>CouchDB</h4>
<ul>
<li><strong>Written in:</strong> Erlang </li>
<li><strong>Main point:</strong> DB consistency, ease of use </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST </li>
<li>Bi-directional (!) replication, </li>
<li>continuous or ad-hoc, </li>
<li>with conflict detection, </li>
<li>thus, master-master replication. (!) </li>
<li>MVCC - write operations do not block reads </li>
<li>Previous versions of documents are available </li>
<li>Crash-only (reliable) design </li>
<li>Needs compacting from time to time </li>
<li>Views: embedded map/reduce </li>
<li>Formatting views: lists &amp; shows </li>
<li>Server-side document validation possible </li>
<li>Authentication possible </li>
<li>Real-time updates via _changes (!) </li>
<li>Attachment handling </li>
<li>thus, <a href="http://couchapp.org/">CouchApps</a> (standalone js apps) </li>
<li>jQuery library included </li>
</ul>
<p><strong>Best used:</strong> For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important. </p>
<p><strong>For example:</strong> CRM, CMS systems. Master-master replication is an especially interesting feature, allowing easy multi-site deployments. </p>
<h4>Redis</h4>
<ul>
<li><strong>Written in:</strong> C/C++ </li>
<li><strong>Main point:</strong> Blazing fast </li>
<li><strong>License:</strong> BSD </li>
<li><strong>Protocol:</strong> Telnet-like </li>
<li>Disk-backed in-memory database, </li>
<li>but since 2.0, it can swap to disk. </li>
<li>Master-slave replication </li>
<li>Simple keys and values, </li>
<li>but <a href="http://redis.io/commands">complex operations</a> like ZREVRANGEBYSCORE </li>
<li>INCR &amp; co (good for rate limiting or statistics) </li>
<li>Has sets (also union/diff/inter) </li>
<li>Has lists (also a queue; blocking pop) </li>
<li>Has hashes (objects of multiple fields) </li>
<li>Of all these databases, only Redis does transactions (!) </li>
<li>Values can be set to expire (as in a cache) </li>
<li>Sorted sets (high score table, good for range queries) </li>
<li>Pub/Sub and WATCH on data changes (!) </li>
</ul>
<p><strong>Best used:</strong> For rapidly changing data with a foreseeable database size (should fit mostly in memory). </p>
<p><strong>For example:</strong> Stock prices. Analytics. Real-time data collection. Real-time communication. </p>
<h4>MongoDB</h4>
<ul>
<li><strong>Written in:</strong> C++ </li>
<li><strong>Main point:</strong> Retains some friendly properties of SQL. (Query, index) </li>
<li><strong>License:</strong> AGPL (Drivers: Apache) </li>
<li><strong>Protocol:</strong> Custom, binary (BSON) </li>
<li>Master/slave replication </li>
<li>Queries are javascript expressions </li>
<li>Run arbitrary javascript functions server-side </li>
<li>Better update-in-place than CouchDB </li>
<li>Sharding built-in </li>
<li>Uses memory mapped files for data storage </li>
<li>Performance over features </li>
<li>After crash, it needs to repair tables </li>
<li>Better durablity coming in V1.8 </li>
</ul>
<p><strong>Best used:</strong> If you need dynamic queries. If you prefer to define indexes, not map/reduce functions. If you need good performance on a big DB. If you wanted CouchDB, but your data changes too much, filling up disks. </p>
<p><strong>For example:</strong> For all things that you would do with MySQL or PostgreSQL, but having predefined columns really holds you back. </p>
<h4>Cassandra</h4>
<ul>
<li><strong>Written in:</strong> Java </li>
<li><strong>Main point:</strong> Best of BigTable and Dynamo </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> Custom, binary (Thrift) </li>
<li>Tunable trade-offs for distribution and replication (N, R, W) </li>
<li>Querying by column, range of keys </li>
<li>BigTable-like features: columns, column families </li>
<li>Writes are much faster than reads (!) </li>
<li>Map/reduce possible with Apache Hadoop </li>
<li>I admit being a bit biased against it, because of the bloat and complexity it has partly because of Java (configuration, seeing exceptions, etc) </li>
</ul>
<p><strong>Best used:</strong> When you write more than you read (logging). If every component of the system must be in Java. (&quot;No one gets fired for choosing Apache's stuff.&quot;) </p>
<p><strong>For example:</strong> Banking, financial industry (though not necessarily for financial transactions, but these industries are much bigger than that.) Writes are faster than reads, so one natural niche is real time data analysis. </p>
<h4>Riak</h4>
<ul>
<li><strong>Written in:</strong> Erlang &amp; C, some Javascript </li>
<li><strong>Main point:</strong> Fault tolerance </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST </li>
<li>Tunable trade-offs for distribution and replication (N, R, W) </li>
<li>Pre- and post-commit hooks, </li>
<li>for validation and security. </li>
<li>Built-in full-text search </li>
<li>Map/reduce in javascript or Erlang </li>
<li>Comes in &quot;open source&quot; and &quot;enterprise&quot; editions </li>
</ul>
<p><strong>Best used:</strong> If you want something Cassandra-like (Dynamo-like), but no way you're gonna deal with the bloat and complexity. If you need very good single-site scalability, availability and fault-tolerance, but you're ready to pay for multi-site replication. </p>
<p><strong>For example:</strong> Point-of-sales data collection. Factory control systems. Places where even seconds of downtime hurt. </p>
<h4>HBase</h4>
<p>(With the help of ghshephard) </p>
<ul>
<li><strong>Written in:</strong> Java </li>
<li><strong>Main point:</strong> Billions of rows X millions of columns </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST (also Thrift) </li>
<li>Modeled after BigTable </li>
<li>Map/reduce with Hadoop </li>
<li>Query predicate push down via server side scan and get filters </li>
<li>Optimizations for real time queries </li>
<li>A high performance Thrift gateway </li>
<li>HTTP supports XML, Protobuf, and binary </li>
<li>Cascading, hive, and pig source and sink modules </li>
<li>Jruby-based (JIRB) shell </li>
<li>No single point of failure </li>
<li>Rolling restart for configuration changes and minor upgrades </li>
<li>Random access performance is like MySQL </li>
</ul>
<p><strong>Best used:</strong> If you're in love with BigTable. <img src='http://www.wuwx.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And when you need random, realtime read/write access to your Big Data. </p>
<p><strong>For example:</strong> Facebook Messaging Database (more general example coming soon) </p>
<p>Of course, all systems have much more features than what's listed here. I only wanted to list the key points that I base my decisions on. Also, development of all are very fast, so things are bound to change. I'll do my best to keep this list updated. </p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5954" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/5954/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Linux系统中指定IPv6域名服务器</title>
		<link>http://www.wuwx.net/archives/5945</link>
		<comments>http://www.wuwx.net/archives/5945#comments</comments>
		<pubDate>Fri, 15 Oct 2010 02:15:43 +0000</pubDate>
		<dc:creator>有颜色的猫</dc:creator>
				<category><![CDATA[开源技术]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.wuwx.net/archives/5945</guid>
		<description><![CDATA[编辑/etc/resolv.conf文件，参考IPv4域名服务器设置，假如IPv6服务器地址： nameserver xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx vim会有红色警告，不理会他就是了~]]></description>
			<content:encoded><![CDATA[<p>编辑/etc/resolv.conf文件，参考IPv4域名服务器设置，假如IPv6服务器地址：</p>
<blockquote><p>nameserver xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx</p>
</blockquote>
<p>vim会有红色警告，不理会他就是了~</p>
 <img src="http://www.wuwx.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=5945" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.wuwx.net/archives/5945/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

