<?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.yeeach.com/tag/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yeeach.com</link>
	<description>专注电子商务领域，关注无线互联网，关注新媒体；Yeeach.com用于记录我技术生涯的点滴</description>
	<lastBuildDate>Sun, 25 Jul 2010 10:30:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>distributed key-value store 杂思</title>
		<link>http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/</link>
		<comments>http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 17:20:57 +0000</pubDate>
		<dc:creator>chuanliang</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[cap theorem]]></category>
		<category><![CDATA[高性能服务器]]></category>
		<category><![CDATA[key-value store]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[tokyo cabinet]]></category>
		<category><![CDATA[架构]]></category>

		<guid isPermaLink="false">http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/</guid>
		<description><![CDATA[&#160;&#160;&#160; distributed key-value&#160; store是当下比较流行的话题，尤其在构建诸如搜索引擎、IM、P2P、游戏服务器、SNS等大型互联网应用以及提供云计算服务的时候，怎样保证系统在海量数据环境下的高性能、高可靠性、高扩展性、高可用性、低成本成为所有系统架构们挖苦心思考虑的重点，而怎样解决数据库服务器的性能瓶颈是最大的挑战。 &#160;&#160;&#160; 按照分布式领域的CAP理论（Consistency、Availability、Tolerance to network Partitions这三部分在任何系统架构实现时只可能同时满足其中二点，没法三者兼顾）来衡量，传统的关系数据库的ACID只满足了Consistency、Availability，因此在Partition tolerance上就很难做得好。另外传统的关系数据库处理海量数据、分布式架构时候在Performance、Scalability、Availability等方面也存在很大的局限性。 &#160;&#160;&#160; 而key-value store更加注重对海量数据存取的性能、分布式、扩展性支持上，并不需要传统关系数据库的一些特征，例如：Schema、事务、完整SQL查询支持等等，因此在分布式环境下的性能相对于传统的关系数据库有较大的提升。当然不同的key-value store根据应用需求的不同，在设计理念并不完全相同，例如以Google BigTable、Amazon Dynamo为例： &#160;&#160;&#160; BigTable is a CA system; it is strongly consistent and highly available, but can be unavailable under network partitions.&#160; BigTable has no replication at the database level, rather replication is handled underneath by GFS. &#160;&#160; Dynamo is an [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; distributed key-value&#160; store是当下比较流行的话题，尤其在构建诸如搜索引擎、IM、P2P、游戏服务器、SNS等大型互联网应用以及提供云计算服务的时候，怎样保证系统在海量数据环境下的高性能、高可靠性、高扩展性、高可用性、低成本成为所有系统架构们挖苦心思考虑的重点，而怎样解决数据库服务器的性能瓶颈是最大的挑战。</p>
<p>&#160;&#160;&#160; 按照分布式领域的<a href="http://www.julianbrowne.com/article/viewer/brewers-cap-theorem" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.julianbrowne.com/article/viewer/brewers-cap-theorem');">CAP理论</a>（Consistency、Availability、Tolerance to network Partitions这三部分在任何系统架构实现时只可能同时满足其中二点，没法三者兼顾）来衡量，传统的关系数据库的ACID只满足了Consistency、Availability，因此在Partition tolerance上就很难做得好。另外传统的关系数据库处理海量数据、分布式架构时候在Performance、Scalability、Availability等方面也存在很大的局限性。</p>
<p>&#160;&#160;&#160; 而key-value store更加注重对海量数据存取的性能、分布式、扩展性支持上，并不需要传统关系数据库的一些特征，例如：Schema、事务、完整SQL查询支持等等，因此在分布式环境下的性能相对于传统的关系数据库有较大的提升。当然不同的key-value store根据应用需求的不同，在设计理念并不完全相同，例如以<a href="http://labs.google.com/papers/bigtable-osdi06.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://labs.google.com/papers/bigtable-osdi06.pdf');">Google BigTable</a>、<a href="http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf');">Amazon Dynamo</a>为例：</p>
<p><em>&#160;&#160;&#160; BigTable is a CA system; it is strongly consistent and highly available, but can be unavailable under network partitions.&#160; BigTable has no replication at the database level, rather replication is handled underneath by GFS.</em></p>
<p><em>&#160;&#160; Dynamo is an AP system; it is highly available, even under network partitions, but eventually consistent.&#160; Data is replicated within a single cluster, so even under partitions most data is available, however one node’s latest version might not match that of another, so every reader is only guaranteed to see every write eventually.</em><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </em></p>
<p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="http://www.yeeach.com/wp-content/uploads/2009/09/cap.png" ><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="cap理论,cap theorem,base" border="0" alt="cap理论,cap theorem,base" src="http://www.yeeach.com/wp-content/uploads/2009/09/cap-thumb.png" width="644" height="236" /></a>&#160;&#160; </em></p>
<p>&#160;&#160;&#160; 其实使用key-value store的历史已经很久了，以前在做电信计费时候的Radius服务器就采用Berkeley DB这样经典的key-value store作为用户数据库，只不过早期使用这样的key-value store关注的重点主要在性能上，对于分布式、海量数据的处理并非考虑的重点。</p>
<h3><strong>1、key-value store与RDBMS的区别</strong></h3>
<p>摘自:<a href="http://www.readwriteweb.com/enterprise/2009/02/is-the-relational-database-doomed.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.readwriteweb.com/enterprise/2009/02/is-the-relational-database-doomed.php');">Is the Relational Database Doomed?</a></p>
<p><a href="http://www.yeeach.com/wp-content/uploads/2009/09/relational-database-feb09c.png" ><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="key-value store,rdbms,distributed hash table" border="0" alt="key-value store,rdbms,distributed hash table" src="http://www.yeeach.com/wp-content/uploads/2009/09/relational-database-feb09c-thumb.png" width="644" height="367" /></a> </p>
<p><a href="http://www.yeeach.com/wp-content/uploads/2009/09/relational-database-feb09e.png" ><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="key-value store,rdbms,distributed hash table" border="0" alt="key-value store,rdbms,distributed hash table" src="http://www.yeeach.com/wp-content/uploads/2009/09/relational-database-feb09e-thumb.png" width="644" height="275" /></a> </p>
<p><a href="http://www.yeeach.com/wp-content/uploads/2009/09/relational-database-feb09f.png" ><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="key-value store,rdbms,distributed hash table" border="0" alt="key-value store,rdbms,distributed hash table" src="http://www.yeeach.com/wp-content/uploads/2009/09/relational-database-feb09f-thumb.png" width="644" height="234" /></a> </p>
<p>&#160;</p>
<h3><strong>2、一些常用的key-value的开源项目</strong></h3>
<p>这些项目的设计思路大多是参考<a href="http://labs.google.com/papers/bigtable-osdi06.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://labs.google.com/papers/bigtable-osdi06.pdf');">Google BigTable</a>、<a href="http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf');">Amazon Dynamo</a></p>
<p>&#160;&#160;&#160; <a href="http://www.yeeach.com/wp-content/uploads/2009/09/richardjones-antirdbmsalistofdistributedkeyvaluestores.png" ><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Richard Jones _ Anti-RDBMS  A list of distributed key-value stores" border="0" alt="Richard Jones _ Anti-RDBMS  A list of distributed key-value stores" src="http://www.yeeach.com/wp-content/uploads/2009/09/richardjones-antirdbmsalistofdistributedkeyvaluestores-thumb.png" width="516" height="484" /></a> </p>
<p>除了以上罗列的产品外，还有如下一些产品</p>
<p><a href="http://1978th.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://1978th.net/');">Tokyo cabinet</a></p>
<p><a href="http://code.google.com/p/redis/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://code.google.com/p/redis/');">Redis</a></p>
<p><a href="http://www.mongodb.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.mongodb.org');">MongoDB</a></p>
<p><u><a href="http://www.oracle.com/technology/products/berkeley-db/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.oracle.com/technology/products/berkeley-db/index.html');">Oracle Berkeley DB</a></u></p>
<p><u><a href="http://opensource.plurk.com/LightCloud/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://opensource.plurk.com/LightCloud/');">LightCloud</a></u></p>
<p><u><a href="http://luxio.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://luxio.sourceforge.net/');">Lux IO</a></u></p>
<p><a href="https://launchpad.net/drizzle" onclick="javascript:pageTracker._trackPageview('/outbound/article/https://launchpad.net/drizzle');">Drizzle</a></p>
<h5><u><a href="http://labs.gree.jp/Top/OpenSource/Flare-en.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://labs.gree.jp/Top/OpenSource/Flare-en.html');">Flare</a></u></h5>
<p>其中<a href="http://1978th.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://1978th.net/');">Tokyo cabinet</a>、<a href="http://code.google.com/p/redis/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://code.google.com/p/redis/');">Redis</a>、<a href="http://www.mongodb.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.mongodb.org');">MongoDB</a>各有特色，可以作为项目使用key-value store时候的重点评估对象。</p>
<p>&#160;</p>
<h3><strong>3、与工作相关的一些可以使用key-value store的应用场合</strong></h3>
<p>&#160;&#160;&#160; Cache：Memcachedb、Tokyo Tyrant</p>
<p>&#160;&#160;&#160; 网络通信：做IM、P2P时候做单点登录服务器、状态服务器；消息队列服务器（Tokyo Tyrant）</p>
<p>&#160;&#160;&#160; 交易系统：计费系统cdr及预处理后的账单数据；交易系统风控系统（内存数据库,redis）</p>
<p>&#160;&#160;&#160; 日志：服务器访问日志，用于web analytics使用；呼叫中心的呼叫数据；</p>
<p>&#160;&#160;&#160; 爬虫及搜索引擎：爬取页面日志；爬取任务；索引库</p>
<p>&#160;&#160;&#160; SNS社区及CMS站点：可以大规模应用Tokyo Cabinet+Tokyo Tyrant，结合Solr/Lucene或这样的Sphinx搜索引擎搞定查询问题</p>
</p>
</p>
<p>&#160;&#160;&#160; 云存储：</p>
<h3><strong>4、参考资料</strong></h3>
<p>&#160;&#160;&#160; <a title="http://www.julianbrowne.com/article/viewer/brewers-cap-theorem" href="http://www.julianbrowne.com/article/viewer/brewers-cap-theorem" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.julianbrowne.com/article/viewer/brewers-cap-theorem');">Brewers CAP Theorem</a></p>
<p>&#160;&#160;&#160; <a href="http://www.cs.berkeley.edu/%7Ebrewer/cs262b-2004/PODC-keynote.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.cs.berkeley.edu/%7Ebrewer/cs262b-2004/PODC-keynote.pdf');">Towards Robust Distributed Systems</a></p>
<p>&#160;&#160;&#160; <a title="http://devblog.streamy.com/tag/availability/" href="http://devblog.streamy.com/tag/availability/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://devblog.streamy.com/tag/availability/');">CAP Theorem</a></p>
<p>&#160;&#160;&#160; <a href="http://blog.dotkam.com/2009/08/30/key-value-store-list/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://blog.dotkam.com/2009/08/30/key-value-store-list/');">Key Value Store List</a></p>
<p>&#160;&#160;&#160; <a href="http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/');">Anti-RDBMS: A list of distributed key-value stores</a></p>
<p>&#160;&#160;&#160; <a href="http://www.jurriaanpersyn.com/archives/2009/02/12/database-sharding-at-netlog-with-mysql-and-php/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.jurriaanpersyn.com/archives/2009/02/12/database-sharding-at-netlog-with-mysql-and-php/');">Database Sharding at Netlog, with MySQL and PHP</a></p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2a7ccd96-d498-432e-a457-6a838309e71f" class="wlWriterEditableSmartContent">Technorati 标签: <a href="http://technorati.com/tags/cap+theorem" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/cap+theorem');" rel="tag">cap theorem</a>,<a href="http://technorati.com/tags/key-value+store" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/key-value+store');" rel="tag">key-value store</a>,<a href="http://technorati.com/tags/%e6%9e%b6%e6%9e%84" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e6%9e%b6%e6%9e%84');" rel="tag">架构</a>,<a href="http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8');" rel="tag">高性能服务器</a>,<a href="http://technorati.com/tags/tokyo+cabinet" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/tokyo+cabinet');" rel="tag">tokyo cabinet</a>,<a href="http://technorati.com/tags/redis" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/redis');" rel="tag">redis</a>,<a href="http://technorati.com/tags/mongodb" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/mongodb');" rel="tag">mongodb</a></div>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; chuanliang for <a href="http://www.yeeach.com" >出家如初，成佛有余</a>, 2009. |
	  <a href="http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/" >Permalink</a> |
	  <a href="http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/#comments" >2 comments</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/&amp;title=distributed key-value store 杂思" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://del.icio.us/post?url=http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/&amp;title=distributed key-value store 杂思');">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.technorati.com/search/http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/');" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://www.yeeach.com/category/%e6%8a%80%e6%9c%af-%e8%bd%af%e4%bb%b6/"  title="查看 技术相关 的全部文章" rel="category tag">技术相关</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.yeeach.com/2009/09/27/distributed-key-value-store-%e6%9d%82%e6%80%9d/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>图片服务器选型方案</title>
		<link>http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/</link>
		<comments>http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 17:25:48 +0000</pubDate>
		<dc:creator>chuanliang</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[csync2]]></category>
		<category><![CDATA[选型]]></category>
		<category><![CDATA[高性能服务器]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[inotify]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[分布式文件系统]]></category>
		<category><![CDATA[图片服务器]]></category>

		<guid isPermaLink="false">http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/</guid>
		<description><![CDATA[&#160;&#160;&#160; 各个web项目要共享各种图片素材、手机软件，同时也需要处理用户自助上传的图片、软件在各个项目间的共享。采用了独立的图片服务器来集中存储各种图片资源，其他应用服务器通过NFS方式存取图片资源（在linux下使用nfs及软链接解决图片文件共享问题 ）。起初觉得这种模式相对简单且容易实现，也不是很在意图片服务器的容灾问题，最近在部署应用时候没有按照步骤操作，直接把通过NFS方式共享的目录删除了（由于要在应用上传图片时候实时同步到图片服务器上，因此NFS目录是read、write的），这才意识到容灾的问题。 &#160;&#160;&#160; 在当前的经济形势下，遵循“少花钱、多办事”的原则，采用纯Open Source的方案，不增加硬件及软件投入。简单整理了一下图片服务器的实现时候需要考虑的几个地方： 1、操作文件系统的选择： &#160;&#160;&#160; 非分布式文件系统方案：ReiserFS4、Ext3、JFS &#160;&#160;&#160; 分布式文件系统方案：Redhat GFS、Lustre、ZFS、NFS 2、数据同步 &#160;&#160;&#160; 采用操作系统层分布式文件系统本身的同步功能 &#160;&#160;&#160; 采用应用层分布式文件系统同步方案：FastDFS、MogileFS、Hadoop HDFS &#160;&#160;&#160; 采用应用层第三方软件同步方案：csync2+inotify、rsync、unison、DRBD、tsync 3、Web服务器的选择： &#160;&#160;&#160; 采用轻量级的Lighttpd、Nginx，不采用apache 4、Cache及反向代理： &#160;&#160;&#160; Squid &#160;&#160;&#160; Lighttpd+mod_mem_cache 5、单独多个图片服务器、单独的图片服务器域名 6、数据压缩： &#160;&#160;&#160; HTTP HEADER的Accept-Encoding 7、客户端缓存： &#160;&#160;&#160;&#160; HTTP HEADER的Expires、Cache-Control、Etag、Last-Modified参数设置 8、应用层优化： &#160;&#160;&#160; 图片按需生成、图片预先生成、根据应用场景降低图片分辨率 采用ReiserFS4+csync2+inotify方案来满足当前需要，后续有空再测试一下FastDFS、MogileFS、Hadoop HDFS&#160; 的方案。 &#160; Technorati 标签: 图片服务器,高性能服务器,csync2,inotify,lighttpd,hadoop,分布式文件系统,选型 &#169; chuanliang for 出家如初，成佛有余, 2009. &#124; Permalink &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160; 各个web项目要共享各种图片素材、手机软件，同时也需要处理用户自助上传的图片、软件在各个项目间的共享。采用了独立的图片服务器来集中存储各种图片资源，其他应用服务器通过NFS方式存取图片资源（<a href="http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/" >在linux下使用nfs及软链接解决图片文件共享问题 </a>）。起初觉得这种模式相对简单且容易实现，也不是很在意图片服务器的容灾问题，最近在部署应用时候没有按照步骤操作，直接把通过NFS方式共享的目录删除了（由于要在应用上传图片时候实时同步到图片服务器上，因此NFS目录是read、write的），这才意识到容灾的问题。</p>
<p>&#160;&#160;&#160; 在当前的经济形势下，遵循“少花钱、多办事”的原则，采用纯Open Source的方案，不增加硬件及软件投入。简单整理了一下图片服务器的实现时候需要考虑的几个地方：</p>
<h3>1、操作文件系统的选择：</h3>
<p>&#160;&#160;&#160; 非分布式文件系统方案：ReiserFS4、<em>Ext3</em>、JFS</p>
<p>&#160;&#160;&#160; 分布式文件系统方案：Redhat GFS、Lustre、ZFS、NFS</p>
<h3>2、数据同步</h3>
<p>&#160;&#160;&#160; 采用操作系统层分布式文件系统本身的同步功能</p>
<p>&#160;&#160;&#160; 采用应用层分布式文件系统同步方案：<a href="http://www.csource.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.csource.org');">FastDFS</a>、<a href="http://www.danga.com/mogilefs/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.danga.com/mogilefs/');">MogileFS</a>、<a href="http://hadoop.apache.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://hadoop.apache.org/');">Hadoop HDFS</a></p>
<p>&#160;&#160;&#160; 采用应用层第三方软件同步方案：csync2+inotify、<a href="http://www.samba.org/rsync/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.samba.org/rsync/');">rsync</a>、<a href="http://www.cis.upenn.edu/~bcpierce/unison/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.cis.upenn.edu/~bcpierce/unison/');">unison</a>、<a href="http://www.drbd.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.drbd.org/');">DRBD</a>、<a href="http://tsyncd.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://tsyncd.sourceforge.net/');">tsync</a></p>
<h3>3、Web服务器的选择：</h3>
<h3>&#160;&#160;&#160; 采用轻量级的Lighttpd、Nginx，不采用apache</h3>
<h3>4、Cache及反向代理：</h3>
<p>&#160;&#160;&#160; Squid</p>
<p>&#160;&#160;&#160; Lighttpd+mod_mem_cache</p>
<h3>5、单独多个图片服务器、单独的图片服务器域名</h3>
<h3>6、数据压缩：</h3>
<p>&#160;&#160;&#160; HTTP HEADER的Accept-Encoding</p>
<h3>7、客户端缓存：</h3>
<p>&#160;&#160;&#160;&#160; HTTP HEADER的Expires、Cache-Control、Etag、Last-Modified参数设置</p>
<h3>8、应用层优化：</h3>
<p>&#160;&#160;&#160; 图片按需生成、图片预先生成、根据应用场景降低图片分辨率</p>
<p>采用ReiserFS4+csync2+inotify方案来满足当前需要，后续有空再测试一下<a href="http://www.csource.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.csource.org');">FastDFS</a>、<a href="http://www.danga.com/mogilefs/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.danga.com/mogilefs/');">MogileFS</a>、<a href="http://hadoop.apache.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://hadoop.apache.org/');">Hadoop HDFS</a>&#160; 的方案。</p>
<p>&#160; </p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bd561ebd-8f2b-4cf6-9ef9-95eab6c343d7" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati 标签: <a href="http://technorati.com/tags/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8');" rel="tag">图片服务器</a>,<a href="http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8');" rel="tag">高性能服务器</a>,<a href="http://technorati.com/tags/csync2" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/csync2');" rel="tag">csync2</a>,<a href="http://technorati.com/tags/inotify" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/inotify');" rel="tag">inotify</a>,<a href="http://technorati.com/tags/lighttpd" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/lighttpd');" rel="tag">lighttpd</a>,<a href="http://technorati.com/tags/hadoop" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/hadoop');" rel="tag">hadoop</a>,<a href="http://technorati.com/tags/%e5%88%86%e5%b8%83%e5%bc%8f%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e5%88%86%e5%b8%83%e5%bc%8f%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f');" rel="tag">分布式文件系统</a>,<a href="http://technorati.com/tags/%e9%80%89%e5%9e%8b" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%80%89%e5%9e%8b');" rel="tag">选型</a></div>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; chuanliang for <a href="http://www.yeeach.com" >出家如初，成佛有余</a>, 2009. |
	  <a href="http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/" >Permalink</a> |
	  <a href="http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/#comments" >No comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/&amp;title=图片服务器选型方案" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://del.icio.us/post?url=http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/&amp;title=图片服务器选型方案');">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.technorati.com/search/http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/');" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://www.yeeach.com/category/%e6%8a%80%e6%9c%af-%e8%bd%af%e4%bb%b6/"  title="查看 技术相关 的全部文章" rel="category tag">技术相关</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.yeeach.com/2009/04/20/%e5%9b%be%e7%89%87%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%80%89%e5%9e%8b%e6%96%b9%e6%a1%88/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在linux下使用nfs及软链接解决图片文件共享问题</title>
		<link>http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/</link>
		<comments>http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 00:49:23 +0000</pubDate>
		<dc:creator>chuanliang</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[高性能服务器]]></category>
		<category><![CDATA[软链接]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ln]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[nfs]]></category>

		<guid isPermaLink="false">http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/</guid>
		<description><![CDATA[    由于在门户社区中，诸如图片、下载软件这样的资源都较大，且在下载过程中，对带宽资源的占用也较大，因此为不影响正常业务应用，一般情况下都是将图片等资源部署到一台单独的服务器上以分配单独的带宽（在同一台服务器上也将这些资源存放在磁盘空间较大的地方），此种情况下图片等资源与应用不一定在同一台服务器上，即使在同一台服务器上也不一定部署在同一目录下。方案如下： 1、 图片等资源部署在单独的另外一台服务器上 此种模式可以通过linux的nfs来把完成远程文件mount为本地的文件目录（类似于windows的网络共享），步骤如下： 下面以将192.168.1.199（NFS服务器端）上的目录/liang mount到192.168.1.202（NFS客户端）上为例，说明一下远程mount的实现 1) NFS服务端（192.168.1.199）执行如下操作 在NFS服务端（192.168.1.199）修改/etc/exports，内容如下 /liang 192.168.1.0/255.255.255.0(ro,no_root_squash,sync) 格式如下：directory machine1(option11,option12)        注意：好像采用很多文档所说的 /liang 192.168.1.*(ro,no_root_squash,sync)存在问题 在NFS服务器端启动NFS: /etc/rc.d/init.d/portmap start /etc/rc.d/init.d/nfs start exportfs命令： 在启动了NFS之后又修改了/etc/exports后可以用exportfs命令来使改动立刻生效，命令格式如下： exportfs [-aruv] -a ：全部mount或者unmount /etc/exports中的内容 -r ：重新mount /etc/exports中分享出来的目录 -u ：umount 目录 -v ：在 export 的时候，将详细的信息输出到屏幕上。 2) 在NFS客户端(192.168.1.202)执行如下操作 建立本地mount点目录 mkdir /liang mount远端目录到本地目录 mount 192.168.1.199:/liang /liang 修改/etc/fstab以在系统重启时候自动mount：      # device       mountpoint     fs-type     [...]]]></description>
			<content:encoded><![CDATA[<p>    由于在门户社区中，诸如图片、下载软件这样的资源都较大，且在下载过程中，对带宽资源的占用也较大，因此为不影响正常业务应用，一般情况下都是将图片等资源部署到一台单独的服务器上以分配单独的带宽（在同一台服务器上也将这些资源存放在磁盘空间较大的地方），此种情况下图片等资源与应用不一定在同一台服务器上，即使在同一台服务器上也不一定部署在同一目录下。方案如下：</p>
<h3><strong>1、 </strong><strong>图片等资源部署在单独的另外一台服务器上</strong></h3>
<p>此种模式可以通过linux的nfs来把完成远程文件mount为本地的文件目录（类似于windows的网络共享），步骤如下：</p>
<p>下面以将192.168.1.199（NFS服务器端）上的目录/liang mount到192.168.1.202（NFS客户端）上为例，说明一下远程mount的实现</p>
<h4>1) NFS服务端（192.168.1.199）执行如下操作</h4>
<ul>
<li>在NFS服务端（192.168.1.199）修改/etc/exports，内容如下</li>
</ul>
<pre>         /liang 192.168.1.0/255.255.255.0(ro,no_root_squash,sync)</pre>
<p>格式如下：directory machine1(option11,option12)</p>
<pre>       注意：好像采用很多文档所说的 /liang 192.168.1.*(ro,no_root_squash,sync)存在问题</pre>
<ul>
<li>在NFS服务器端启动NFS:</li>
</ul>
<p>/etc/rc.d/init.d/portmap start</p>
<p>/etc/rc.d/init.d/nfs start</p>
<ul>
<li>exportfs命令：</li>
</ul>
<p>在启动了NFS之后又修改了/etc/exports后可以用exportfs命令来使改动立刻生效，命令格式如下：</p>
<p>exportfs [-aruv]</p>
<p>-a ：全部mount或者unmount /etc/exports中的内容</p>
<p>-r ：重新mount /etc/exports中分享出来的目录</p>
<p>-u ：umount 目录</p>
<p>-v ：在 export 的时候，将详细的信息输出到屏幕上。</p>
<h4>2) 在NFS客户端(192.168.1.202)执行如下操作</h4>
<ul>
<li>建立本地mount点目录</li>
</ul>
<p>mkdir /liang</p>
<ul>
<li>mount远端目录到本地目录</li>
</ul>
<p>mount 192.168.1.199:/liang /liang</p>
<ul>
<li>修改/etc/fstab以在系统重启时候自动mount：</li>
</ul>
<pre>     # device       mountpoint     fs-type     options      dump fsckorder</pre>
<pre>     192.168.1.199:/liang  /liang    nfs          rw            0    0</pre>
<ul>
<li>showmout命令</li>
</ul>
<p>-e ：显示指定的NFS SERVER上export出来的目录。</p>
<p>-a ：是用来显示已经mount上本机nfs目录的cline机器，一般在NFS SERVER上使用</p>
<h3><strong>2、 </strong><strong>图片等资源与应用部署在同一台服务器上，但资源目录与应用目录不在一处</strong></h3>
<p>此种情况，采用linux的软链接把图片等资源链接链接到应用的目录下。</p>
<p>ln  -s /image /www/newwap/wap/image</p>
<p>由于安全上的考虑，tomcat及jboss缺省情况下都不允许访问软链接的文件，改动如下：</p>
<p>在conf/server.xml中或conf/Catalina/localhost（根据虚拟主机配置情况做相应改变）下的context中增加如下内容：</p>
<p>&lt;Context path=&#8221;" docBase=&#8221;/www/newwap/wap&#8221;  allowLinking=&#8221;true&#8221;&gt;</p>
<p>&lt;Resources className=&#8221;org.apache.naming.resources.FileDirContext&#8221;</p>
<p>allowLinking=&#8221;true&#8221;/&gt;</p>
<p>&lt;Logger className=&#8221;org.apache.catalina.logger.FileLogger&#8221;/&gt;</p>
<p>&lt;/Context&gt;</p>
<h3>3、参考资料</h3>
<p><a href="http://nfs.sourceforge.net/nfs-howto/ar01s04.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://nfs.sourceforge.net/nfs-howto/ar01s04.html');" title="http://nfs.sourceforge.net/nfs-howto/ar01s04.html">http://nfs.sourceforge.net/nfs-howto/ar01s04.html</a></p>
<p class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4c434b9f-8599-40f1-8d7c-a5c2ee4b269a" style="margin: 0px; padding: 0px; display: inline; float: none">Technorati Tags: <a href="http://technorati.com/tags/nfs" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/nfs');" rel="tag">nfs</a>,<a href="http://technorati.com/tags/ln" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/ln');" rel="tag">ln</a>,<a href="http://technorati.com/tags/%e8%bd%af%e9%93%be%e6%8e%a5" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e8%bd%af%e9%93%be%e6%8e%a5');" rel="tag">软链接</a>,<a href="http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8');" rel="tag">高性能服务器</a>,<a href="http://technorati.com/tags/mount" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/mount');" rel="tag">mount</a>,<a href="http://technorati.com/tags/linux" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/linux');" rel="tag">linux</a></p>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; chuanliang for <a href="http://www.yeeach.com" >出家如初，成佛有余</a>, 2008. |
	  <a href="http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/" >Permalink</a> |
	  <a href="http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/#comments" >4 comments</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/&amp;title=在linux下使用nfs及软链接解决图片文件共享问题" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://del.icio.us/post?url=http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/&amp;title=在linux下使用nfs及软链接解决图片文件共享问题');">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.technorati.com/search/http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/');" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://www.yeeach.com/category/%e6%8a%80%e6%9c%af-%e8%bd%af%e4%bb%b6/"  title="查看 技术相关 的全部文章" rel="category tag">技术相关</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.yeeach.com/2008/09/13/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8nfs%e5%8f%8a%e8%bd%af%e9%93%be%e6%8e%a5%e8%a7%a3%e5%86%b3%e5%9b%be%e7%89%87%e6%96%87%e4%bb%b6%e5%85%b1%e4%ba%ab%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>无线增值业务门户建设技术思考</title>
		<link>http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/</link>
		<comments>http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/#comments</comments>
		<pubDate>Sun, 25 May 2008 02:54:55 +0000</pubDate>
		<dc:creator>chuanliang</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[用户体验]]></category>
		<category><![CDATA[高性能服务器]]></category>
		<category><![CDATA[freemarker]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[增值业务]]></category>
		<category><![CDATA[无线互联网]]></category>
		<category><![CDATA[交互设计]]></category>

		<guid isPermaLink="false">http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/</guid>
		<description><![CDATA[&#160; &#160;&#160;&#160; eSales这样的业务运营、支撑系统由于大部分内容都是动态的且由于并发用户数相对较少、压力也相对较低，在设计合理的情况下，性能并不是最大的瓶颈，因此此种情况下采用动态页面的方式是比较恰当。对于门户社区而言，高并发、高负载、高性能、高可用性是第一位的，需要采用各种手段来提高其性能。关于网站优化最好的方法论是Yahoo 的Best Practices for Speeding Up Your Web Site ，技术层面细节的优化策略参看Yahoo的方法论。 &#160;&#160;&#160; 同时这是一个用户为中心(user centered)的年代，诸如“以用户为中心的设计”、“以用户为中心的系统”、“用户为中心的营销”等等。 但是怎样才能够让门户设计中充分考虑用户体验，避免致命性的坏体验（bad smell）？这是门户建设需要重点考虑的问题，这一点上所谓的交互设计模式对于我们还是有所益处的。关于用户交互设计的模式：Yahoo Design Pattern Library 和Interaction Design Pattern Library &#160;&#160;&#160; 此处重点从技术层面谈一下在门户开发时候需要考虑的重点内容： &#160;&#160;&#160; Web2.0化：除了充分使用诸如TAG、RSS、DIGG、SNS、UGC这些典型的Web2.0的元素外，“用户体验”是门户建设的重中之重，以用户体验为中心，把这些web2.0元素恰当地融入无线增值业务门户中，相信我们才会造就一个伟大的无线互联网门户，否则只是一堆与别人雷同的舶来品。 &#160;&#160;&#160; 无线门户、互联网门户一体化：WAP门户及互联网门户采用同样的技术架构，在整个系统的基础架构仍然沿用目前的Struts2+Spring+Hibernate（ibatis）的架构，但在View层不使用JSP，而是采用Freemarker，充分利用Freemarker对模板支持及对xml较好支持，将对WML(WAP1.0)、XHTML（WAP2.0）、HTML（Internet）的处理都统一到同一架构下。 &#160;&#160;&#160; REST（Representational State Transfer）：遵循REST设计原则，尤其是无状态通信（statelessness）。 &#160;&#160;&#160; 页面静态化：对门户社区页面都尽量采用页面静态化方案，这样能够充分利用cache机制及实现replication、load balance及镜像（例如南北电信部署）。为了实现页面静态化策略，采用Freemarker+FMPP方案来实现页面静态化的策略。 &#160;&#160;&#160; SEO：在设计时候一定要首先重点考虑搜索引擎友好及针对google、baidu搜索引擎进行优化，主要是Meta Tag部分内容及网站架构，所有的页面url遵循RSET模式，对无法遵循REST模式的，采用lighhttpd的mod_rewrite来实现。 &#160;&#160;&#160; 爬虫：简单的垂直爬虫主要采用httpclient+htmlparser方案实现，复杂爬虫策略采用Heritrix(或Nutch)实现。 &#160;&#160;&#160; 搜索引擎：采用Nutch+Lucene+Compass方案，对门户定时索引，提供全站搜索功能。 &#160;&#160;&#160; AJAX：在eSales后台的ajax主要采用struts2的dojo实现，可以充分利用struts2的标签，保持架构的统一。在门户实现时候，由于主要采用静态页面化方案，对于需要动态内容的地方，采用ajax来实现动态数据的状态。在ajax库选择上，不再采用dojo，采用jquery方案。 &#160;&#160;&#160; CSS：在eSales后台主要还是采用frame、table方式来实现页面布局，在门户开发时候完全采用CSS方案，以保证页面布局的灵活性及页面大小。 &#160;&#160;&#160; Cache：尽量使用诸如memcache和squid的cache机制，提高性能 &#160;&#160;&#160;&#160; 镜像：采用rsync来实现对静态页面内容的镜像及同步，解决因不同运营商（移动（铁通）、电信、联通（网通）、教育网、有线网）及地域用户访问速度上差异。 &#160;&#160;&#160; 其他的部署策略参看下图： &#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; eSales这样的业务运营、支撑系统由于大部分内容都是动态的且由于并发用户数相对较少、压力也相对较低，在设计合理的情况下，性能并不是最大的瓶颈，因此此种情况下采用动态页面的方式是比较恰当。对于门户社区而言，高并发、高负载、高性能、高可用性是第一位的，需要采用各种手段来提高其性能。关于网站优化最好的方法论是Yahoo 的<a href="http://developer.yahoo.com/performance/rules.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.yahoo.com/performance/rules.html');">Best Practices for Speeding Up Your Web Site</a> ，技术层面细节的优化策略参看Yahoo的方法论。</p>
<p>&nbsp;&nbsp;&nbsp; 同时这是一个用户为中心(user centered)的年代，诸如“以用户为中心的设计”、“以用户为中心的系统”、“用户为中心的营销”等等。 但是怎样才能够让门户设计中充分考虑用户体验，避免致命性的坏体验（bad smell）？这是门户建设需要重点考虑的问题，这一点上所谓的交互设计模式对于我们还是有所益处的。关于用户交互设计的模式：<a href="http://developer.yahoo.com/ypatterns/atoz.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.yahoo.com/ypatterns/atoz.php');">Yahoo Design Pattern Library</a> 和<a href="http://www.welie.com/patterns/index.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.welie.com/patterns/index.php');">Interaction Design Pattern Library</a>
<p>&nbsp;&nbsp;&nbsp; 此处重点从技术层面谈一下在门户开发时候需要考虑的重点内容：
<p>&nbsp;&nbsp;&nbsp; <strong>Web2.0化</strong>：除了充分使用诸如TAG、RSS、DIGG、SNS、UGC这些典型的Web2.0的元素外，“用户体验”是门户建设的重中之重，以用户体验为中心，把这些web2.0元素恰当地融入无线增值业务门户中，相信我们才会造就一个伟大的无线互联网门户，否则只是一堆与别人雷同的舶来品。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>无线门户、互联网门户一体化</strong>：WAP门户及互联网门户采用同样的技术架构，在整个系统的基础架构仍然沿用目前的Struts2+Spring+Hibernate（ibatis）的架构，但在View层不使用JSP，而是采用Freemarker，充分利用Freemarker对模板支持及对xml较好支持，将对WML(WAP1.0)、XHTML（WAP2.0）、HTML（Internet）的处理都统一到同一架构下。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>REST</strong>（Representational State Transfer）：遵循REST设计原则，尤其是无状态通信（statelessness）。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>页面静态化：</strong>对门户社区页面都尽量采用页面静态化方案，这样能够充分利用cache机制及实现replication、load balance及镜像（例如南北电信部署）。为了实现页面静态化策略，采用Freemarker+FMPP方案来实现页面静态化的策略。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>SEO：</strong>在设计时候一定要首先重点考虑搜索引擎友好及针对google、baidu搜索引擎进行优化，主要是Meta Tag部分内容及网站架构，所有的页面url遵循RSET模式，对无法遵循REST模式的，采用lighhttpd的mod_rewrite来实现。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>爬虫</strong>：简单的垂直爬虫主要采用httpclient+htmlparser方案实现，复杂爬虫策略采用Heritrix(或Nutch)实现。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>搜索引擎</strong>：采用Nutch+Lucene+Compass方案，对门户定时索引，提供全站搜索功能。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>AJAX</strong>：在eSales后台的ajax主要采用struts2的dojo实现，可以充分利用struts2的标签，保持架构的统一。在门户实现时候，由于主要采用静态页面化方案，对于需要动态内容的地方，采用ajax来实现动态数据的状态。在ajax库选择上，不再采用dojo，采用jquery方案。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>CSS</strong>：在eSales后台主要还是采用frame、table方式来实现页面布局，在门户开发时候完全采用CSS方案，以保证页面布局的灵活性及页面大小。</p>
<p>&nbsp;&nbsp;&nbsp; <strong>Cache</strong>：尽量使用诸如memcache和squid的cache机制，提高性能</p>
<p><strong>&nbsp;&nbsp;&nbsp;&nbsp; <font size="2">镜像</font>：</strong>采用rsync来实现对静态页面内容的镜像及同步，解决因不同运营商（移动（铁通）、电信、联通（网通）、教育网、有线网）及地域用户访问速度上差异。</p>
<p>&nbsp;&nbsp;&nbsp; 其他的部署策略参看下图：</p>
<p>&nbsp;&nbsp;&nbsp; <a href="http://www.yeeach.com/wp-content/uploads/2008/05/windowslivewriterc909c73db1ef-98f3-2.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="1169" alt="平台系统部署方案" src="http://www.yeeach.com/wp-content/uploads/2008/05/windowslivewriterc909c73db1ef-98f3-thumb.png" width="736" border="0"></a> </p>
<p>&nbsp;</p>
<h3>参考资料：</h3>
<ul>
<li><strong>性能方面：</strong></li>
</ul>
<p><a title="http://developer.yahoo.com/performance/rules.html" href="http://developer.yahoo.com/performance/rules.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.yahoo.com/performance/rules.html');">http://developer.yahoo.com/performance/rules.html</a></p>
<p><a title="http://highscalability.com/" href="http://highscalability.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://highscalability.com/');">http://highscalability.com/</a></p>
<p><a href="http://www.amazon.com/High-Performance-Web-Sites-Essential/dp/0596529309" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.amazon.com/High-Performance-Web-Sites-Essential/dp/0596529309');">High Performance Web Sites</a></p>
</p>
<p><a href="http://www.amazon.com/Building-Scalable-Web-Sites-applications/dp/0596102356/ref=bxgy_cc_b_img_a" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.amazon.com/Building-Scalable-Web-Sites-applications/dp/0596102356/ref=bxgy_cc_b_img_a');">Building Scalable Web Sites</a></p>
<p><a title="http://www.sitepoint.com/print/web-site-optimization-steps" href="http://www.sitepoint.com/print/web-site-optimization-steps" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.sitepoint.com/print/web-site-optimization-steps');">http://www.sitepoint.com/print/web-site-optimization-steps</a></p>
<p>&nbsp;</p>
<ul>
<li><strong>用户体验方面</strong></li>
</ul>
<p><a href="http://www.welie.com/patterns/index.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.welie.com/patterns/index.php');">http://www.welie.com/patterns/index.php</a></p>
<p><a title="http://developer.yahoo.com/ypatterns/atoz.php" href="http://developer.yahoo.com/ypatterns/atoz.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://developer.yahoo.com/ypatterns/atoz.php');">http://developer.yahoo.com/ypatterns/atoz.php</a></p>
<p><a title="http://en.wikipedia.org/wiki/Interaction_design_pattern" href="http://en.wikipedia.org/wiki/Interaction_design_pattern" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Interaction_design_pattern');">http://en.wikipedia.org/wiki/Interaction_design_pattern</a></p>
<p><a href="http://www.visi.com/~snowfall/InteractionPatterns.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.visi.com/~snowfall/InteractionPatterns.html');">http://www.visi.com/~snowfall/InteractionPatterns.html</a></p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2d55e188-f1d3-4b56-8e7d-d73bc73d8d17" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati 标签: <a href="http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8');" rel="tag">高性能服务器</a>,<a href="http://technorati.com/tags/freemarker" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/freemarker');" rel="tag">freemarker</a>,<a href="http://technorati.com/tags/performance" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/performance');" rel="tag">performance</a>,<a href="http://technorati.com/tags/ajax" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/ajax');" rel="tag">ajax</a>,<a href="http://technorati.com/tags/%e7%94%a8%e6%88%b7%e4%bd%93%e9%aa%8c" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e7%94%a8%e6%88%b7%e4%bd%93%e9%aa%8c');" rel="tag">用户体验</a>,<a href="http://technorati.com/tags/%e6%97%a0%e7%ba%bf%e4%ba%92%e8%81%94%e7%bd%91" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e6%97%a0%e7%ba%bf%e4%ba%92%e8%81%94%e7%bd%91');" rel="tag">无线互联网</a>,<a href="http://technorati.com/tags/%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1');" rel="tag">增值业务</a>,<a href="http://technorati.com/tags/%e4%ba%a4%e4%ba%92%e8%ae%be%e8%ae%a1" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e4%ba%a4%e4%ba%92%e8%ae%be%e8%ae%a1');" rel="tag">交互设计</a></div>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; chuanliang for <a href="http://www.yeeach.com" >出家如初，成佛有余</a>, 2008. |
	  <a href="http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/" >Permalink</a> |
	  <a href="http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/#comments" >One comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/&amp;title=无线增值业务门户建设技术思考" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://del.icio.us/post?url=http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/&amp;title=无线增值业务门户建设技术思考');">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.technorati.com/search/http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/');" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://www.yeeach.com/category/%e6%8a%80%e6%9c%af-%e8%bd%af%e4%bb%b6/"  title="查看 技术相关 的全部文章" rel="category tag">技术相关</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.yeeach.com/2008/05/25/%e6%97%a0%e7%ba%bf%e5%a2%9e%e5%80%bc%e4%b8%9a%e5%8a%a1%e9%97%a8%e6%88%b7%e5%bb%ba%e8%ae%be%e6%8a%80%e6%9c%af%e6%80%9d%e8%80%83/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>业务平台部署方案思考</title>
		<link>http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/</link>
		<comments>http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 23:38:01 +0000</pubDate>
		<dc:creator>chuanliang</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[电子商务]]></category>
		<category><![CDATA[高可用性]]></category>
		<category><![CDATA[高性能服务器]]></category>
		<category><![CDATA[heartbeat]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[lvs]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/</guid>
		<description><![CDATA[&#160; Technorati 标签: 高性能服务器,高可用性,lighttpd,lvs,heartbeat,squid,电子商务 &#169; chuanliang for 出家如初，成佛有余, 2008. &#124; Permalink &#124; One comment Add to del.icio.us Search blogs linking this post with Technorati Want more on these topics ? Browse the archive of posts filed under 技术相关, 电子商务.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.yeeach.com/wp-content/uploads/2008/04/windowslivewriter59661c30bb0c-6b12-2.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="1093" alt="平台系统部署方案" src="http://www.yeeach.com/wp-content/uploads/2008/04/windowslivewriter59661c30bb0c-6b12-thumb.png" width="719" border="0"></a> </p>
<p>&nbsp;</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:41497d82-8111-429c-9161-e52a0ad08c8b" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati 标签: <a href="http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8');" rel="tag">高性能服务器</a>,<a href="http://technorati.com/tags/%e9%ab%98%e5%8f%af%e7%94%a8%e6%80%a7" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e5%8f%af%e7%94%a8%e6%80%a7');" rel="tag">高可用性</a>,<a href="http://technorati.com/tags/lighttpd" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/lighttpd');" rel="tag">lighttpd</a>,<a href="http://technorati.com/tags/lvs" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/lvs');" rel="tag">lvs</a>,<a href="http://technorati.com/tags/heartbeat" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/heartbeat');" rel="tag">heartbeat</a>,<a href="http://technorati.com/tags/squid" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/squid');" rel="tag">squid</a>,<a href="http://technorati.com/tags/%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1');" rel="tag">电子商务</a></div>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; chuanliang for <a href="http://www.yeeach.com" >出家如初，成佛有余</a>, 2008. |
	  <a href="http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/" >Permalink</a> |
	  <a href="http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/#comments" >One comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/&amp;title=业务平台部署方案思考" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://del.icio.us/post?url=http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/&amp;title=业务平台部署方案思考');">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.technorati.com/search/http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/');" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://www.yeeach.com/category/%e6%8a%80%e6%9c%af-%e8%bd%af%e4%bb%b6/"  title="查看 技术相关 的全部文章" rel="category tag">技术相关</a>, <a href="http://www.yeeach.com/category/web20-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1/"  title="查看 电子商务 的全部文章" rel="category tag">电子商务</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.yeeach.com/2008/04/17/%e4%b8%9a%e5%8a%a1%e5%b9%b3%e5%8f%b0%e9%83%a8%e7%bd%b2%e6%96%b9%e6%a1%88%e6%80%9d%e8%80%83/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ebay 电子商务平台研究（2）-ebay architecture</title>
		<link>http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/</link>
		<comments>http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 15:11:56 +0000</pubDate>
		<dc:creator>chuan liang</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[电子商务]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[电子支付]]></category>
		<category><![CDATA[ebay]]></category>
		<category><![CDATA[高性能服务器]]></category>

		<guid isPermaLink="false">http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/</guid>
		<description><![CDATA[4、ebay系统架构 4.1、架构度量标准 搭建高扩展性的系统架构是每一个架构师的口号，又有几个实现了这样的承诺？什么叫架构的高扩展性，我自己一直也没有明确的答案，ebay的架构师Dan Pritchett在其blog上的一篇文章You Scaled Your What?，对架构的高扩展性的维度要素进行了较为精辟的阐述: Transactional Data Operational Deployability Productivity Feature TTM 尤其值得注意的是他把系统的运营性、易部署作为架构扩展的重要指标提出，很好的实践性经验总结。对于大部分的互联网公司而言，“以软件作为服务”，运营效率、运营成本是核心的竞争力之一；在需求变更频繁、迭代时间较短、需要部署服务器众多的情况下，怎样在不影响生产系统业务运行的前提下，实现代码快速、安全的上线部署，直接影响能否及时响应需求变更和服务质量。因此在架构搭建、程序开发过程中一定要考虑系统的可维护性、可运营性以及部署上线的要求。 4.2、架构目标 高可用性、高可靠性、高扩展性、高安全性：支撑系统无缝的增长，保证大容量数据库和代码的扩展性 高可维护性，更快的产品交付：以加速度交付高质量的功能，更进一步精简和优化ebay的开发模型 为未来而架构：支撑10倍速的增长,支撑快速的业务革新 &#160; &#160; 4.3、架构 &#160; &#160; &#160; 4.4、软件设计模式实践 http://au.sun.com/events/dev_forum/files/best_practices.pdf http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf http://blog.spiralarm.com/richard/2006/12/billion-hits-a-day-ebay-javaone.pdf &#160; 5、架构最佳实践 • Scale Out, Not Up– Horizontal scaling at every tier.– Functional decomposition.• Prefer Asynchronous Integration– Minimize availability coupling.– Improve scaling options.• Virtualize Components– Reduce [...]]]></description>
			<content:encoded><![CDATA[<h3>4、ebay系统架构</h3>
<h3>4.1、架构度量标准</h3>
<p>搭建高扩展性的系统架构是每一个架构师的口号，又有几个实现了这样的承诺？什么叫架构的高扩展性，我自己一直也没有明确的答案，ebay的架构师<a href="http://addsimplicity.typepad.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://addsimplicity.typepad.com/');">Dan Pritchett</a>在其blog上的一篇文章<a title="http://www.addsimplicity.com/adding_simplicity_an_engi/2006/11/you_scaled_your.html" href="http://www.addsimplicity.com/adding_simplicity_an_engi/2006/11/you_scaled_your.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.addsimplicity.com/adding_simplicity_an_engi/2006/11/you_scaled_your.html');">You Scaled Your What?</a>，对架构的高扩展性的维度要素进行了较为精辟的阐述:</p>
<ul>
<li>Transactional
<li>Data
<li>Operational
<li>Deployability
<li>Productivity
<li>Feature TTM</li>
</ul>
<p>尤其值得注意的是他把系统的运营性、易部署作为架构扩展的重要指标提出，很好的实践性经验总结。对于大部分的互联网公司而言，“以软件作为服务”，运营效率、运营成本是核心的竞争力之一；在需求变更频繁、迭代时间较短、需要部署服务器众多的情况下，怎样在不影响生产系统业务运行的前提下，实现代码快速、安全的上线部署，直接影响能否及时响应需求变更和服务质量。因此在架构搭建、程序开发过程中一定要考虑系统的可维护性、可运营性以及部署上线的要求。</p>
<h3>4.2、架构目标</h3>
<p>高可用性、高可靠性、高扩展性、高安全性：支撑系统无缝的增长，保证大容量数据库和代码的扩展性
<p>高可维护性，更快的产品交付：以加速度交付高质量的功能，更进一步精简和优化ebay的开发模型
<p>为未来而架构：支撑10倍速的增长,支撑快速的业务革新
<p>&nbsp;
<p>&nbsp;<br />
<h3>4.3、架构</h3>
<p><a href="http://www.yeeach.com/wp-content/uploads/2007/10/image5.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="321" alt="image" src="http://www.yeeach.com/wp-content/uploads/2007/10/image-thumb5.png" width="410" border="0"></a> </p>
<p>&nbsp;<a href="http://www.yeeach.com/wp-content/uploads/2007/10/image6.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="132" alt="image" src="http://www.yeeach.com/wp-content/uploads/2007/10/image-thumb6.png" width="402" border="0"></a> </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>4.4、软件设计模式实践</h4>
<p><a title="http://au.sun.com/events/dev_forum/files/best_practices.pdf" href="http://au.sun.com/events/dev_forum/files/best_practices.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://au.sun.com/events/dev_forum/files/best_practices.pdf');">http://au.sun.com/events/dev_forum/files/best_practices.pdf</a></p>
<p><a title="http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf" href="http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf');">http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf</a></p>
<p><a title="http://blog.spiralarm.com/richard/2006/12/billion-hits-a-day-ebay-javaone.pdf" href="http://blog.spiralarm.com/richard/2006/12/billion-hits-a-day-ebay-javaone.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://blog.spiralarm.com/richard/2006/12/billion-hits-a-day-ebay-javaone.pdf');">http://blog.spiralarm.com/richard/2006/12/billion-hits-a-day-ebay-javaone.pdf</a></p>
<p><a href="http://www.yeeach.com/wp-content/uploads/2007/10/image7.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="293" alt="image" src="http://www.yeeach.com/wp-content/uploads/2007/10/image-thumb7.png" width="410" border="0"></a> </p>
<p><a href="http://www.yeeach.com/wp-content/uploads/2007/10/image8.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="292" alt="image" src="http://www.yeeach.com/wp-content/uploads/2007/10/image-thumb8.png" width="407" border="0"></a> </p>
<p>
<p><a title="http://blog.spiralarm.com/richard/2006/12/billion-hits-a-day-ebay-javaone.pdf" href="http://blog.spiralarm.com/richard/2006/12/billion-hits-a-day-ebay-javaone.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://blog.spiralarm.com/richard/2006/12/billion-hits-a-day-ebay-javaone.pdf');"></a></p>
<p>&nbsp;
</p>
<h3>5、架构最佳实践</h3>
<p>• Scale Out, Not Up<br />– Horizontal scaling at every tier.<br />– Functional decomposition.<br />• Prefer Asynchronous Integration<br />– Minimize availability coupling.<br />– Improve scaling options.<br />• Virtualize Components<br />– Reduce physical dependencies.<br />– Improve deployment flexibility.<br />• Design for Failure<br />– Automated failure detection and notification.<br />– “Limp mode” operation of business feature</p>
<p>&nbsp;</p>
<h4>5.1、Data Tier(数据层)</h4>
<h5>5.1.1、功能分段（Functional Segmentation）</h5>
<p>&nbsp; 通过对数据库数据按照功能进行分段（应该就是按照use case的领域模型或实体模型），可以将原来存储到一台数据库服务器的数据按照功能分布到不同数据库服务器上。例如User数据库、Item数据库、Account数据库等，ebay有多达70多种功能分类。 功能分段可以支持功能间的解耦和彼此独立性，在分段时候需要根据功能使用频率、扩展性等特征对不同数据进行分段。一个典型的例子就是应当把OLTP和OLAP的功能分段，分别在不同的服务器上进行处理。</p>
<p>&nbsp; 值得注意的是：ebay在应用服务器、数据库数据分区上是基于use case进行划分的，很好的度量标准，只是在use case的粒度定义上需要经验和技巧。</p>
<h5>5.1.2、水平切割（Horizontal Split）</h5>
<p>&nbsp; 按照所谓的主要存取路径“primary access path”进行水平切割。在模式上有多种。例如：写操作读取master数据库，读操作读取slave库；或者按照数据分段访问（按key、按Map to data location）</p>
<h5>5.1.3、逻辑数据库主机（Logical Database Hosts）</h5>
<p>&nbsp;&nbsp;&nbsp; 逻辑数据库主机应该是类似数据库中间件或统一的数据存取层以隔离数据的实际物理存储库。在自己实现时候最为简单的方案就是在应用层面各Use Case的DAO层应当能够使用不同的数据源（多个数据库），而不是只能使用统一的数据源配置信息。</p>
<h5>5.1.4、降低数据库资源占用（Minimize DB Resources）</h5>
<p>&nbsp;&nbsp; 不在数据库服务器处理具有业务逻辑的操作：无存储过程，只采用简单的触发器</p>
<p>&nbsp;&nbsp; 将CPU占用较大的操作移到应用程序来处理：包括对依赖完整性、Join、排序等操作都放到应用程序来处理。这也对，毕竟大部分应用数据库是瓶颈，而且应用服务器还是比数据库服务器配置低，成本也低。</p>
<p>&nbsp;&nbsp; 大量使用prepared statements 和绑定变量（bind variables）</p>
<h5>5.1.5、减少数据库事务处理（Minimize DB Transactions）</h5>
<p>&nbsp; 避免死锁情况，降低耦合性，并发更新，无缝处理切割数据的访问&nbsp; </p>
<p>&nbsp; 对于大部分的数据库操作采用Auto Commit方式。</p>
<p>&nbsp; 完全没有使用客户端事务（程序代码）：单数据库的事务采用数据库服务器端匿名的PL/SQL块来进行事务管理</p>
<p>&nbsp; 较少使用XA分布式事务。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<h4>5.2、Application Tier (应用层)</h4>
<h5>5.2.1、最大限度地扩展J2EE</h5>
<p>没有使用大部分的J2EE特性，主要使用了JDBC、servlet和rewrite过得connection pool</p>
<p>保持应用层无状态性：在应用层没有session状态，状态迁移在cookie或数据库存取。</p>
<p>Cache所有能够cache的：Cache公用的metadata，采用复杂的cache刷新机制；Cache从本地存储重新装载（memory db？）；Cache数据采用ThreadLocal模式，保证线程安全；</p>
<p>&nbsp;</p>
<h5>5.2.2、分层架构模型</h5>
<p>严格按照J2EE规范，把应用画风华展现层（Presentation）、业务层（Business）、集成层（Integration）</p>
<p>应用服务器将不相互通信，不采用cluster方案。</p>
<p>&nbsp;</p>
<h5>5.2.3、数据访问层（Data Access Layer ）</h5>
<p>采用了ebay内部的存Java OR mapping方案（类Hibernate）</p>
<p>所有的CRUD (Create Read Update Delete)操作都通过DAL的数据接口层操作。</p>
<p>在不变更代码的情况下支撑数据层的水平扩展（应该要修改配置文件吧？）</p>
<p>大量使用JDBC的Prepared Statements<br />动态的数据路由：<em>Dynamic Data Routing（DDR） hides the physical location of data from developers by providing a mapping from logical names to physical tables and database servers on which they reside. eBay uses some scalability patterns to reduce complexity/latency. For example, on any given day, there are roughly 40 million distinct items for sale on eBay. These items are split amongst 20 different database servers. These details are hidden from developers-they access an Item object using its id (ItemID)-the exact server from which it is fetched is computed by DDR and queries are routed to that host+table at runtime.</em></p>
<p>DAL的failover机制：可以通过自动或手动方式监控数据源的可用性，在数据源不可用情况下能够自动按照预设的规则把数据源切换到备用主机，据说是在切换过程中用户的操作不会有中断。DAL的failover机制应该有点类似HA或Clsuter的功能（是F5？），只是其实时性、动态性怎样实现的，值得学习。</p>
<h5>&nbsp;</h5>
<h5>5.2.4、代码垂直分区（Vertical Code Partitioning）</h5>
<p>按功能对代码进行分区：应用细粒度化，只操作单一区的数据（例如Selling，Buying等）；Domain包含了扩应用的公用业务逻辑（应该就是公用组件）</p>
<p>严格限定应用间的相互依赖性：应用最多只能依赖Domain，而不能依赖其他的应用；在公用的Domain间没有相互依赖关系</p>
<p><a href="http://www.yeeach.com/wp-content/uploads/2007/10/image9.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="220" alt="image" src="http://www.yeeach.com/wp-content/uploads/2007/10/image-thumb9.png" width="522" border="0"></a>
<p>&nbsp;<br />
<h5>5.2.5、功能分段（Functional Segmentation ）</h5>
<p>将功能切分层独立的应用池</p>
<p>降低或隔离DB的依赖性</p>
<p>允许平行的开发、部署和监控 </p>
<p>&nbsp;</p>
<h5>5.2.6、平台解耦（Platform Decoupling）</h5>
<p>将无事务操作的Domain从有事务的流程中解耦出来。</p>
<p>通过异步的EDA和同步的SOA模式对应用进行集成</p>
<p>采用JMS实现子系统之间和与数据库的松耦合。</p>
<p>&nbsp;</p>
<h5>&nbsp;</h5>
<h3>6、运营最佳实践</h3>
<h4>6.1、系统部署</h4>
<p>• Demanding Requirements<br />– Entire site rolled every 2 weeks<br />– All deployments require staged rollout with immediate rollback if necessary.<br />– More than 100 WAR configurations.<br />– Dependencies exist between pools during some deployment operations.<br />– More than 15,000 instances across eight physical data centers.<br />• Rollout Plan<br />– Custom application that works from dependencies provided by projects.<br />– Creates transitive closure of dependencies.<br />– Generates rollout plan for Turbo Roller.<br />• Automated Rollout Tool (“Turbo Roller”)<br />– Manages full deployment cycle onto all application servers.<br />– Executes rollout plan.<br />– Built in checkpoints during rollout, including approvals.<br />– Optimized rollback, including full rollback of dependent pool</p>
<h4>6.2、网管监控</h4>
<p>Centralized Activity Logging (CAL)<br />– Transaction oriented logging per application server<br />• Transaction boundary starts at request. Nested transactions supported.<br />• Detailed logging of all application activity, especially database and other external<br />resources.<br />• Application generated information and exceptions can be reported.<br />– Logging streams gathered and broadcast on a message bus.<br />• Subscriber to log to files (1.5TB/day)<br />• Subscriber to capture exceptions and generate operational alerts.<br />• Subscriber for real time application state monitoring.<br />– Extensive Reporting<br />• Reports on transactions (page and database) per pool.<br />• Relationships between URL’s and external resources.<br />• Inverted relationships between databases and pools/URL’s.<br />• Data cube reporting on several key metrics available in near real time.<br />
<h3>7、搜索优化（Scaling Search）</h3>
<p>eBay的搜索引擎系统原来使用的是Thunderstone的系统，但到2002年时候就遇到了性能瓶颈，当时更新一次索引需要9个小时，使用了最高档的设备也满足不了需求。eBay对全文检索的要求很高，产品列表、竞标等信息要求实时更新、很多查询要求返回所有结果、存储有按关键字、分类和结构化属性组织等多种形式。由于没有现成产品能满足所有需求，eBay开发了自己的全文检索系统。</p>
<p>实时供给器平台负责将更新从主数据库可靠广播到多个检索节点，索引支持实时更新，支持内存索引。</p>
<p>索引系统是高度分布式的，索引机有多组副本，一组又包含多台机器。</p>
<p>缓存技术也被应用于搜索系统中，主要是缓存常用搜索或非常耗资源的搜索的结果。</p>
<h3>8、平台开发接口</h3>
<p>&nbsp;</p>
<h3>9、网络解决方案</h3>
<p><a title="http://www.sinogrid.com/shownews.asp?news_id=72" href="http://www.sinogrid.com/shownews.asp?news_id=72" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.sinogrid.com/shownews.asp?news_id=72');">http://www.sinogrid.com/shownews.asp?news_id=72</a></p>
<p><a title="http://www.sinogrid.com/show_solution.asp?solution_id=43&amp;cat_id=15" href="http://www.sinogrid.com/show_solution.asp?solution_id=43&amp;cat_id=15" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.sinogrid.com/show_solution.asp?solution_id=43&amp;cat_id=15');">http://www.sinogrid.com/show_solution.asp?solution_id=43&amp;cat_id=15</a></p>
<h3>10、参考资料</h3>
<h4>10.1、产品研发相关</h4>
<p><a title="http://pages.ebay.com/community/chatter/2005november/insideebay.html" href="http://pages.ebay.com/community/chatter/2005november/insideebay.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2005november/insideebay.html');">http://pages.ebay.com/community/chatter/2005november/insideebay.html</a>
<p><a title="http://pages.ebay.com/community/chatter/2005december/insideebay.html" href="http://pages.ebay.com/community/chatter/2005december/insideebay.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2005december/insideebay.html');">http://pages.ebay.com/community/chatter/2005december/insideebay.html</a></p>
<p><a title="http://www.lukew.com/ff/entry.asp?318" href="http://www.lukew.com/ff/entry.asp?318" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.lukew.com/ff/entry.asp?318');">http://www.lukew.com/ff/entry.asp?318</a></p>
<p><a title="http://www.slideshare.net/lukew/design-patterns-defining-and-sharing-web-design-languages" href="http://www.slideshare.net/lukew/design-patterns-defining-and-sharing-web-design-languages" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.slideshare.net/lukew/design-patterns-defining-and-sharing-web-design-languages');">http://www.slideshare.net/lukew/design-patterns-defining-and-sharing-web-design-languages</a></p>
<h4>10.2、架构相关</h4>
<p><a title="http://www.artima.com/forums/flat.jsp?forum=106&amp;thread=188683" href="http://www.artima.com/forums/flat.jsp?forum=106&amp;thread=188683" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.artima.com/forums/flat.jsp?forum=106&amp;thread=188683');">http://www.artima.com/forums/flat.jsp?forum=106&amp;thread=188683</a></p>
<p><a title="http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf" href="http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf');">http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf</a></p>
<p><a title="http://www.addsimplicity.com/adding_simplicity_an_engi/2006/11/you_scaled_your.html" href="http://www.addsimplicity.com/adding_simplicity_an_engi/2006/11/you_scaled_your.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.addsimplicity.com/adding_simplicity_an_engi/2006/11/you_scaled_your.html');">http://www.addsimplicity.com/adding_simplicity_an_engi/2006/11/you_scaled_your.html</a></p>
<p><a title="http://www.eweek.com/article2/0,1759,2041437,00.asp" href="http://www.eweek.com/article2/0,1759,2041437,00.asp" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.eweek.com/article2/0,1759,2041437,00.asp');">http://www.eweek.com/article2/0,1759,2041437,00.asp</a></p>
<p><a title="http://highscalability.com/ebay-architecture" href="http://highscalability.com/ebay-architecture" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://highscalability.com/ebay-architecture');">http://highscalability.com/ebay-architecture</a></p>
<p><a title="http://www.infoq.com/interviews/dan-pritchett-ebay-architecture" href="http://www.infoq.com/interviews/dan-pritchett-ebay-architecture" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.infoq.com/interviews/dan-pritchett-ebay-architecture');">http://www.infoq.com/interviews/dan-pritchett-ebay-architecture</a></p>
<p><a title="http://glinden.blogspot.com/2006/12/talk-on-ebay-architecture.html" href="http://glinden.blogspot.com/2006/12/talk-on-ebay-architecture.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://glinden.blogspot.com/2006/12/talk-on-ebay-architecture.html');">http://glinden.blogspot.com/2006/12/talk-on-ebay-architecture.html</a></p>
<p><a title="http://www.ddj.com/blog/architectblog/archives/2007/08/ad_2007_the_eba.html" href="http://www.ddj.com/blog/architectblog/archives/2007/08/ad_2007_the_eba.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.ddj.com/blog/architectblog/archives/2007/08/ad_2007_the_eba.html');">http://www.ddj.com/blog/architectblog/archives/2007/08/ad_2007_the_eba.html</a></p>
<p><a title="http://blogs.zdnet.com/service-oriented/?p=675" href="http://blogs.zdnet.com/service-oriented/?p=675" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://blogs.zdnet.com/service-oriented/?p=675');">http://blogs.zdnet.com/service-oriented/?p=675</a></p>
<p><a title="http://itmanagement.earthweb.com/service/article.php/3531291" href="http://itmanagement.earthweb.com/service/article.php/3531291" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://itmanagement.earthweb.com/service/article.php/3531291');">http://itmanagement.earthweb.com/service/article.php/3531291</a></p>
<p><a title="http://article.pchome.net/content-123538.html" href="http://article.pchome.net/content-123538.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://article.pchome.net/content-123538.html');">http://article.pchome.net/content-123538.html</a></p>
<p><a title="http://pages.ebay.com/community/chatter/2005november/insideebay.html" href="http://pages.ebay.com/community/chatter/2005november/insideebay.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2005november/insideebay.html');">http://pages.ebay.com/community/chatter/2005november/insideebay.html</a></p>
<p><a title="http://designcult.typepad.com/designcult/files/Design_Patterns_IA_Summit_public.pdf" href="http://designcult.typepad.com/designcult/files/Design_Patterns_IA_Summit_public.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://designcult.typepad.com/designcult/files/Design_Patterns_IA_Summit_public.pdf');">http://designcult.typepad.com/designcult/files/Design_Patterns_IA_Summit_public.pdf</a></p>
<p><a title="http://au.sun.com/events/dev_forum/files/best_practices.pdf" href="http://au.sun.com/events/dev_forum/files/best_practices.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://au.sun.com/events/dev_forum/files/best_practices.pdf');">http://au.sun.com/events/dev_forum/files/best_practices.pdf</a></p>
<p><a title="http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf" href="http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf');">http://gceclub.sun.com.cn/java_one_online/2003/TS-3264CHI(USA,2003)/ts3264ch.pdf</a>&nbsp;</p>
<p><a title="http://download.oracle.com/oowsf2004/1235_wp.pdf" href="http://download.oracle.com/oowsf2004/1235_wp.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://download.oracle.com/oowsf2004/1235_wp.pdf');">http://download.oracle.com/oowsf2004/1235_wp.pdf</a></p>
</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e790ca73-30ea-4195-8085-392a9011a7c8" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati 标签:  		<a href="http://technorati.com/tags/%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1/');" rel="tag">电子商务</a> 		,  		<a href="http://technorati.com/tags/architecture/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/architecture/');" rel="tag">architecture</a> 		,  		<a href="http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8/');" rel="tag">高性能服务器</a> 		,  		<a href="http://technorati.com/tags/%e7%94%b5%e5%ad%90%e6%94%af%e4%bb%98/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e7%94%b5%e5%ad%90%e6%94%af%e4%bb%98/');" rel="tag">电子支付</a> 		,  		<a href="http://technorati.com/tags/ebay/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/ebay/');" rel="tag">ebay</a> 		</div>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; chuan liang for <a href="http://www.yeeach.com" >出家如初，成佛有余</a>, 2007. |
	  <a href="http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/" >Permalink</a> |
	  <a href="http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/#comments" >3 comments</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/&amp;title=ebay 电子商务平台研究（2）-ebay architecture" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://del.icio.us/post?url=http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/&amp;title=ebay 电子商务平台研究（2）-ebay architecture');">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.technorati.com/search/http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/');" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://www.yeeach.com/category/%e6%8a%80%e6%9c%af-%e8%bd%af%e4%bb%b6/"  title="查看 技术相关 的全部文章" rel="category tag">技术相关</a>, <a href="http://www.yeeach.com/category/web20-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1/"  title="查看 电子商务 的全部文章" rel="category tag">电子商务</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%882%ef%bc%89-ebay-architecture-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ebay 电子商务平台研究（1）-ebay 产品研发流程</title>
		<link>http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/</link>
		<comments>http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 16:45:11 +0000</pubDate>
		<dc:creator>chuan liang</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[电子商务]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[电子支付]]></category>
		<category><![CDATA[ebay]]></category>
		<category><![CDATA[高性能服务器]]></category>

		<guid isPermaLink="false">http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/</guid>
		<description><![CDATA[需要好好学习研究一下ebay的电子商务平台及paypal支付平台的开发方法论、系统架构模式，为搭建高可用性（high availability））、高可靠性（high reliability）、高扩展性（high scaliability））、高安全性（high security）、高性能（high performance）的电子支付及电子商务平台积累经验。 研究重点集中在两个方面： ebay的产品研发管理 软件架构 1、ebay业务情况 http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf 212 million registered users, 1 billion photos eBay users worldwide trade more than $1590 worth of goods every second eBay averages over 1 billion page views per day At any given time, there are approximately 105 million listings on the site eBay stores over [...]]]></description>
			<content:encoded><![CDATA[<p>需要好好学习研究一下ebay的电子商务平台及paypal支付平台的开发方法论、系统架构模式，为搭建高可用性（high availability））、高可靠性（high reliability）、高扩展性（high scaliability））、高安全性（high security）、高性能（high performance）的电子支付及电子商务平台积累经验。</p>
<p>研究重点集中在两个方面：</p>
<ul>
<li>ebay的产品研发管理
<li>软件架构</li>
</ul>
<h3>1、ebay业务情况</h3>
<p><a title="http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf" href="http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf');">http://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf</a></p>
<li>212 million registered users, 1 billion photos
<li>eBay users worldwide trade more than $1590 worth of goods every second
<li>eBay averages over 1 billion page views per day
<li>At any given time, there are approximately 105 million listings on the site
<li>eBay stores over 2 Petabytes of data – over 200 times the size of the Library of Congress!
<li>The eBay platform handles 3 billion API calls per month
<li>26 Billion SQL executions/day!
<li>On an average day, it runs through 26 billion SQL queries and keeps tabs on 100 million items available for purchase.
<li>In 33 countries, in seven languages, 24&#215;7
<li>300+ features per quarter，Roll 100,000+ lines of code every two weeks
<li>99.94% availability, measured as &#8220;all parts of site functional to everybody&#8221; vs. at least one part of a site not functional to some users somewhere
<p><a title="http://pages.ebay.com/community/chatter/2005december/insideebay.html" href="http://pages.ebay.com/community/chatter/2005december/insideebay.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2005december/insideebay.html');"></a>&nbsp;<br />
<h3>2、ebay电子商务平台演进历史</h3>
<p><a href="http://www.yeeach.com/wp-content/uploads/2007/10/image4.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="266" alt="image" src="http://www.yeeach.com/wp-content/uploads/2007/10/image-thumb4.png" width="362" border="0"></a> </p>
<h3></h3>
<p>&nbsp;</p>
<table cellspacing="0" cellpadding="2" width="755" border="0">
<tbody>
<tr>
<td valign="top" width="47">版本</td>
<td valign="top" width="120">时间</td>
<td valign="top" width="231">核心系统技术框架<br />（Language,Web Server,DB,OS）</td>
<td valign="top" width="355">备注</td>
</tr>
<tr>
<td valign="top" width="47">V1.0</td>
<td valign="top" width="120">1995-1997/9</td>
<td valign="top" width="231">Perl,Apache,GDBM,FreeBSD</td>
<td valign="top" width="355">
<p>• Built over a weekend in Pierre Omidyar’s living room in 1995<br />• System hardware was made up of parts that could be bought at Fry&#8217;s<br />• Every item was a separate file, generated by a Perl script<br />• No search functionality, only category browsing</p>
</td>
</tr>
<tr>
<td valign="top" width="47">V2.0 </td>
<td valign="top" width="120">1997/9-1999/2</td>
<td valign="top" width="231">C++,IIS,Oracle(Solaris),NT,</td>
<td valign="top" width="355">
<p>• 3-tiered conceptual architecture (separation of bus/pres and db access tiers)<br />• 2-tiered physical implementation (no application server)<br />• C++ Library (eBayISAPI.dll) running on IIS on Windows<br />• Microsoft index server used for search<br />• Items migrated from GDBM to an Oracle database on Solaris</p>
</td>
</tr>
<tr>
<td valign="top" width="47">V2.1 </td>
<td valign="top" width="120">1999/2-1999/11</td>
<td valign="top" width="231">C++,IIS,Oracle(Solaris),NT</td>
<td valign="top" width="355">
<p>• Servers grouped into pools (small soldiers)<br />• Resonate used for front end load balancing and failover<br />• Search functionality moved to the Thunderstone indexing system<br />• Back-end Oracle database server scaled vertically to a larger machine (Sun E10000)</p>
</td>
</tr>
<tr>
<td valign="top" width="47">V2.3 </td>
<td valign="top" width="120">1999/6-1999/11</td>
<td valign="top" width="231">C++,IIS,Oracle(Solaris),NT</td>
<td valign="top" width="355">
<p>• Second Database added for failover<br />• CGI pools, Listings, Pages, and Search continued to scale horizontally <br />• By November 1999, the database servers approached their limits of physical growth.</p>
</td>
</tr>
<tr>
<td valign="top" width="47">V2.4 </td>
<td valign="top" width="120">1999/11-2001/4</td>
<td valign="top" width="231">C++,IIS,Oracle(Solaris),NT</td>
<td valign="top" width="355">
<p>• Database &#8220;split&#8221; technology.<br />• Logically partition database into separate instances.<br />• Horizontal scalability through 2000, but not beyond</p>
</td>
</tr>
<tr>
<td valign="top" width="47">V2.5 </td>
<td valign="top" width="120">2001/4–2002/12</td>
<td valign="top" width="231">C++,IIS,Oracle(Solaris),NT</td>
<td valign="top" width="355">
<p>• Horizontal scalability through database splits<br />• Items split by category<br />• SPOF elimination</p>
</td>
</tr>
<tr>
<td valign="top" width="47">V3.0</td>
<td valign="top" width="120">2002/12-present</td>
<td valign="top" width="231">Java,Sun Java System Web Server,Oracle(Solaris),Solaris</td>
<td valign="top" width="355">
<p>• Replace C++/ISAPI with Java.Re-wrote the entire application in J2EE application server framework<br />• Leveraged the MSXML framework for the presentation layer<br />• Implemented a development kernel as a foundation for programmers</p>
</td>
</tr>
</tbody>
</table>
<h3>&nbsp;</h3>
<h3>3、ebay产品研发方法论</h3>
<h4>3.1、产品管理流程</h4>
<p><a title="http://pages.ebay.com/community/chatter/2005november/insideebay.html" href="http://pages.ebay.com/community/chatter/2005november/insideebay.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2005november/insideebay.html');">http://pages.ebay.com/community/chatter/2005november/insideebay.html</a>
<p><a title="http://pages.ebay.com/community/chatter/2005december/insideebay.html" href="http://pages.ebay.com/community/chatter/2005december/insideebay.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2005december/insideebay.html');">http://pages.ebay.com/community/chatter/2005december/insideebay.html</a></p>
<p><a title="http://pages.ebay.com/community/chatter/2003Apr/InsideeBay.html" href="http://pages.ebay.com/community/chatter/2003Apr/InsideeBay.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2003Apr/InsideeBay.html');">http://pages.ebay.com/community/chatter/2003Apr/InsideeBay.html</a></p>
<p><a title="http://pages.ebay.com/community/chatter/2005February/homevisits.html" href="http://pages.ebay.com/community/chatter/2005February/homevisits.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2005February/homevisits.html');">http://pages.ebay.com/community/chatter/2005February/homevisits.html</a></p>
<p><a title="http://creativityandinnovation.blogspot.com/2007/05/innovation-and-leadership-lessons-from.html" href="http://creativityandinnovation.blogspot.com/2007/05/innovation-and-leadership-lessons-from.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://creativityandinnovation.blogspot.com/2007/05/innovation-and-leadership-lessons-from.html');">http://creativityandinnovation.blogspot.com/2007/05/innovation-and-leadership-lessons-from.html</a></p>
<p>从软件产品管理流程的一级流程而言，ebay的产品管理流程与大部分软件公司的研发管理流程倒没有太多的差别，都大致遵循标准软件工程或CMMI之类的模型定义的流程，也即：项目策划（需求收集、业务需求规格说明书、市场分析、盈利分析等）-&gt;项目立项（产品需求规格说明书、立项评审会议、项目计划等）-&gt;需求分析设计-&gt;开发-&gt;测试-&gt;上线及市场推广。在核心流程定义清楚的情况下，软件开发流程至关重要的是执行力以及流程的持续完善，对此ebay的产品管理流程倒有很多值得借鉴的地方。</p>
<p align="center"><a href="http://www.yeeach.com/wp-content/uploads/2007/10/insidedec051.jpg" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="225" alt="InsideDec05" src="http://www.yeeach.com/wp-content/uploads/2007/10/insidedec05-thumb1.jpg" width="469" border="0"></a> </p>
<p align="center">ebay产品管理流程</p>
<p>&nbsp;</p>
<p>产品的管理流程的核心要素是对于需求的管理（需求的收集、组织、跟踪、审查、确认、变更和验证），ebay使用了“需求漏斗”的概念来描述需求在产品管理流程各个阶段中状态的迁移变化过程。通过对需求层层筛选过滤，保证</p>
<p><a href="http://www.yeeach.com/wp-content/uploads/2007/10/insideebay1nov051.png" ><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="137" alt="InsideeBay1Nov05" src="http://www.yeeach.com/wp-content/uploads/2007/10/insideebay1nov05-thumb1.png" width="408" border="0"></a> </p>
<ul>
<li>ebay需求收集渠道</li>
</ul>
<p>Strategic Analysis：</p>
<p>Community：除了通常的邮件、电话、社区论坛等沟通方式外，<a href="http://pages.ebay.com/community/chatter/2003Apr/InsideeBay.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2003Apr/InsideeBay.html');">eBay&#8217;s &#8220;Voices&#8221; program</a>类似于用户座谈会这样的重要的沟通形式</p>
<p><a href="http://pages.ebay.com/community/chatter/2005February/homevisits.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://pages.ebay.com/community/chatter/2005February/homevisits.html');">Visits program</a>：主要是侧重用户体验部分。 </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>3.2、软件开发方法论</h4>
<p>Our site is our product. We change it incrementally through implementing new features.<br />• Very predictable development process – trains leave on-time at regular intervals (weekly).<br />• Parallel development process with significant output &#8212; 100,000 LOC per release.<br />• Always on – over 99.94% available.</p>
<p>以此看来，ebay在开发方法上应该是采用了敏捷软件开发过程或RUP，采用迭代和增量开发方式。<br />
<h4>3.3、用户体验设计</h4>
<p><a title="http://designcult.typepad.com/designcult/files/Design_Patterns_IA_Summit_public.pdf" href="http://designcult.typepad.com/designcult/files/Design_Patterns_IA_Summit_public.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://designcult.typepad.com/designcult/files/Design_Patterns_IA_Summit_public.pdf');">http://designcult.typepad.com/designcult/files/Design_Patterns_IA_Summit_public.pdf</a></p>
<p><a title="http://www.lukew.com/ff/entry.asp?318" href="http://www.lukew.com/ff/entry.asp?318" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.lukew.com/ff/entry.asp?318');">http://www.lukew.com/ff/entry.asp?318</a></p>
<p><a title="http://www.lukew.com/resources/articles/DesignPatterns_LW.pdf" href="http://www.lukew.com/resources/articles/DesignPatterns_LW.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.lukew.com/resources/articles/DesignPatterns_LW.pdf');">http://www.lukew.com/resources/articles/DesignPatterns_LW.pdf</a></p>
<h4>3.4、开发者社区</h4>
<p>电子商务网站平台的开放性可以让更多的人参与到价值链的完善中来，这也是Facebook比Myspace能够吸引更多人气的原因所在。而开放性必须依赖于开发者去实现，因此和谐的开发者社区对于构建一个完整的电子商务的生态圈是至关重要的。</p>
<p><a title="http://www.cioinsight.com/article2/0,1540,2074253,00.asp" href="http://www.cioinsight.com/article2/0,1540,2074253,00.asp" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.cioinsight.com/article2/0,1540,2074253,00.asp');">http://www.cioinsight.com/article2/0,1540,2074253,00.asp</a></p>
<p><a title="http://blog.programmableweb.com/2007/01/04/how-ebay-scales-their-devnet/" href="http://blog.programmableweb.com/2007/01/04/how-ebay-scales-their-devnet/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://blog.programmableweb.com/2007/01/04/how-ebay-scales-their-devnet/');">http://blog.programmableweb.com/2007/01/04/how-ebay-scales-their-devnet/</a>&nbsp;</p>
</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e790ca73-30ea-4195-8085-392a9011a7c8" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati 标签:  		<a href="http://technorati.com/tags/%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1/');" rel="tag">电子商务</a> 		,  		<a href="http://technorati.com/tags/architecture/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/architecture/');" rel="tag">architecture</a> 		,  		<a href="http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8/');" rel="tag">高性能服务器</a> 		,  		<a href="http://technorati.com/tags/%e7%94%b5%e5%ad%90%e6%94%af%e4%bb%98/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e7%94%b5%e5%ad%90%e6%94%af%e4%bb%98/');" rel="tag">电子支付</a> 		,  		<a href="http://technorati.com/tags/ebay/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/ebay/');" rel="tag">ebay</a> 		</div>
</p>
</li>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; chuan liang for <a href="http://www.yeeach.com" >出家如初，成佛有余</a>, 2007. |
	  <a href="http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/" >Permalink</a> |
	  <a href="http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/#comments" >No comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/&amp;title=ebay 电子商务平台研究（1）-ebay 产品研发流程" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://del.icio.us/post?url=http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/&amp;title=ebay 电子商务平台研究（1）-ebay 产品研发流程');">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.technorati.com/search/http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/');" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://www.yeeach.com/category/%e6%8a%80%e6%9c%af-%e8%bd%af%e4%bb%b6/"  title="查看 技术相关 的全部文章" rel="category tag">技术相关</a>, <a href="http://www.yeeach.com/category/web20-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1/"  title="查看 电子商务 的全部文章" rel="category tag">电子商务</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.yeeach.com/2007/10/21/ebay-%e7%94%b5%e5%ad%90%e5%95%86%e5%8a%a1%e5%b9%b3%e5%8f%b0%e7%a0%94%e7%a9%b6%ef%bc%881%ef%bc%89-ebay-%e4%ba%a7%e5%93%81%e7%a0%94%e5%8f%91%e6%b5%81%e7%a8%8b-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KOSMOS DISTRIBUTED FILE SYSTEM (KFS)</title>
		<link>http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/</link>
		<comments>http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 16:35:10 +0000</pubDate>
		<dc:creator>chuan liang</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[distribute file system]]></category>
		<category><![CDATA[高性能服务器]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[mapreduce]]></category>

		<guid isPermaLink="false">http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/</guid>
		<description><![CDATA[http://kosmosfs.sourceforge.net/ 来自startup的垂直搜索引擎http://www.kosmix.com/的开源项目，又一个开源的类似google mapreduce 的分布式文件系统，可以应用在诸如图片存储、搜索引擎、网格计算、数据挖掘这样需要处理大数据量的网络应用中。与hadoop集成得也比较好，这样可以充分利用了hadoop一些现成的功能，基于C++。 Introduction Applications that process large volumes of data (such as, search engines, grid computing applications, data mining applications, etc.) require a backend infrastructure for storing data. Such infrastructure is required to support applications whose workload could be characterized as: Primarily write-once/read-many workloads Few millions of large files, where each file is [...]]]></description>
			<content:encoded><![CDATA[<p><a title="http://kosmosfs.sourceforge.net/" href="http://kosmosfs.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://kosmosfs.sourceforge.net/');">http://kosmosfs.sourceforge.net/</a></p>
<p>来自startup的垂直搜索引擎<a title="http://www.kosmix.com/" href="http://www.kosmix.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.kosmix.com/');">http://www.kosmix.com/</a>的开源项目，又一个开源的类似google mapreduce 的分布式文件系统，可以应用在诸如图片存储、搜索引擎、网格计算、数据挖掘这样需要处理大数据量的网络应用中。与hadoop集成得也比较好，这样可以充分利用了hadoop一些现成的功能，基于C++。</p>
<h5>Introduction</h5>
<p>Applications that process large volumes of data (such as, search engines, grid computing applications, data mining applications, etc.) require a backend infrastructure for storing data. Such infrastructure is required to support applications whose workload could be characterized as:
<ul>
<li>Primarily write-once/read-many workloads </li>
<li>Few millions of large files, where each file is on the order of a few tens of MB to a few tens of GB in size </li>
<li>Mostly sequential access </li>
</ul>
<p>We have developed the Kosmos Distributed File System (KFS), a high performance distributed file system to meet this infrastructure need.</p>
<p>The system consists of 3 components:</p>
<ol>
<li><b>Meta-data server</b> : a single meta-data server that provides a global namespace </li>
<li><b>Block server</b>: Files are split into blocks or <em>chunks</em> and stored on block servers. Blocks are also known as chunk servers. Chunkserver store the chunks as files in the underlying file system (such as, XFS on Linux) </li>
<li><b>Client library</b>: that provides the file system API to allow applications to interface with KFS. To integrate applications to use KFS, applications will need to be modified and relinked with the KFS client library. </li>
</ol>
<p>KFS is implemented in C++. It is built using standard system components such as, TCP sockets, aio (for disk I/O), STL, and boost libraries. It has been tested on 64-bit x86 architectures running Linux FC5.</p>
<p>While KFS can be accessed natively from C++ applications, support is also provided for Java applications. JNI glue code is included in the release to allow Java applications to access the KFS client library APIs. </p>
<h5>Features</h5>
<ul>
<li>Incremental scalability: New chunkserver nodes can be added as storage needs increase; the system automatically adapts to the new nodes. </li>
<li>Availability: Replication is used to provide availability due to chunk server failures. Typically, files are replicated 3-way. </li>
<li>Per file degree of replication: The degree of replication is configurable on a per file basis, with a max. limit of 64. </li>
<li>Re-replication: Whenever the degree of replication for a file drops below the configured amount (such as, due to an extended chunkserver outage), the metaserver forces the block to be re-replicated on the remaining chunk servers. Re-replication is done in the background without overwhelming the system. </li>
<li>Re-balancing: Periodically, the meta-server may rebalance the chunks amongst chunkservers. This is done to help with balancing disk space utilization amongst nodes. </li>
<li>Data integrity: To handle disk corruptions to data blocks, data blocks are checksummed. Checksum verification is done on each read; whenever there is a checksum mismatch, re-replication is used to recover the corrupted chunk. </li>
<li>File writes: The system follows the standard model. When an application creates a file, the filename becomes part of the filesystem namespace. For performance, writes are cached at the KFS client library. Periodically, the cache is flushed and data is pushed out to the chunkservers. Also, applications can force data to be flushed to the chunkservers. In either case, once data is flushed to the server, it is available for reading. </li>
<li>Leases: KFS client library uses caching to improve performance. Leases are used to support cache consistency. </li>
<li>Chunk versioning: Versioning is used to detect stale chunks. </li>
<li>Client side fail-over: The client library is resilient to chunksever failures. During reads, if the client library determines that the chunkserver it is communicating with is unreachable, the client library will fail-over to another chunkserver and continue the read. This fail-over is transparent to the application. </li>
<li>Language support: KFS client library can be accessed from C++, Java, and Python. </li>
<li>FUSE support on Linux: By mounting KFS via FUSE, this support allows existing linux utilities (such as, ls) to interface with KFS. </li>
<li>Tools: A shell binary is included in the set of tools. This allows users to navigate the filesystem tree using utilities such as, cp, ls, mkdir, rmdir, rm, mv. Tools to also monitor the chunk/meta-servers are provided. </li>
<li>Deploy scripts: To simplify launching KFS servers, a set of scripts to (1) install KFS binaries on a set of nodes, (2) start/stop KFS servers on a set of nodes are also provided. </li>
<li>Job placement support: The KFS client library exports an API to determine the location of a byte range of a file. Job placement systems built on top of KFS can leverage this API to schedule jobs appropriately. </li>
<li>Local read optimization: When applications are run on the same nodes as chunkservers, the KFS client library contains an optimization for reading data locally. That is, if the chunk is stored on the same node as the one on which the application is executing, data is read from the local node. </li>
</ul>
<h5>KFS with Hadoop</h5>
<p>KFS has been integrated with Hadoop using Hadoop&#8217;s filesystem interfaces. This allows existing Hadoop applications to use KFS seamlessly. The integration code has been submitted as a patch to Hadoop-JIRA-1963 (this will enable distribution of the integration code with Hadoop). In addition, the code as well as instructions will also be available for download from the KFS project page shortly.     <br />As part of the integration, there is job placement support for Hadoop. That is, the Hadoop Map/Reduce job placement system can schedule jobs on the nodes where the chunks are stored.</p>
<h3>参考资料：</h3>
<ul>
<li>distribute file system </li>
</ul>
<p><a title="http://lucene.apache.org/hadoop/" href="http://lucene.apache.org/hadoop/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://lucene.apache.org/hadoop/');">http://lucene.apache.org/hadoop/</a></p>
<p><a title="http://www.danga.com/mogilefs/" href="http://www.danga.com/mogilefs/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.danga.com/mogilefs/');">http://www.danga.com/mogilefs/</a></p>
<p><a title="http://www.lustre.org/" href="http://www.lustre.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.lustre.org/');">http://www.lustre.org/</a></p>
<p><a title="http://oss.sgi.com/projects/xfs/" href="http://oss.sgi.com/projects/xfs/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://oss.sgi.com/projects/xfs/');">http://oss.sgi.com/projects/xfs/</a></p>
<p>&#xA0;</p>
<p><a title="http://www.megite.com/discover/filesystem" href="http://www.megite.com/discover/filesystem" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.megite.com/discover/filesystem');">http://www.megite.com/discover/filesystem</a></p>
<p><a title="http://swik.net/distributed+cluster" href="http://swik.net/distributed+cluster" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://swik.net/distributed+cluster');">http://swik.net/distributed+cluster</a></p>
<ul>
<li>cluster&amp;high availability </li>
</ul>
<p><a title="http://www.gluster.org/index.php" href="http://www.gluster.org/index.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.gluster.org/index.php');">http://www.gluster.org/index.php</a></p>
<p><a title="http://www.linux-ha.org/" href="http://www.linux-ha.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.linux-ha.org/');">http://www.linux-ha.org/</a></p>
<p><a title="http://openssi.org/cgi-bin/view?page=openssi.html" href="http://openssi.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://openssi.org');">http://openssi.org</a></p>
<p><a title="http://kerrighed.org/" href="http://kerrighed.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://kerrighed.org/');">http://kerrighed.org/</a></p>
<p><a title="http://openmosix.sourceforge.net/" href="http://openmosix.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://openmosix.sourceforge.net/');">http://openmosix.sourceforge.net/</a></p>
<p>&#xA0;</p>
<p><a title="http://www.linux.com/article.pl?sid=06/09/12/1459204" href="http://www.linux.com/article.pl?sid=06/09/12/1459204" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.linux.com/article.pl?sid=06/09/12/1459204');">http://www.linux.com/article.pl?sid=06/09/12/1459204</a></p>
<p><a title="http://labs.google.com/papers/mapreduce.html" href="http://labs.google.com/papers/mapreduce.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://labs.google.com/papers/mapreduce.html');">http://labs.google.com/papers/mapreduce.html</a></p>
<p>&#xA0;</p>
<p>&#xA0;</p>
</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c14bfde6-5dd5-489c-ab1d-9e1c412a7a9d" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati 标签:  		<a href="http://technorati.com/tags/mapreduce/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/mapreduce/');" rel="tag">mapreduce</a> 		,  		<a href="http://technorati.com/tags/distribute%20file%20system/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/distribute%20file%20system/');" rel="tag">distribute file system</a> 		,  		<a href="http://technorati.com/tags/hadoop/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/hadoop/');" rel="tag">hadoop</a> 		,  		<a href="http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technorati.com/tags/%e9%ab%98%e6%80%a7%e8%83%bd%e6%9c%8d%e5%8a%a1%e5%99%a8/');" rel="tag">高性能服务器</a> 		</div>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; chuan liang for <a href="http://www.yeeach.com" >出家如初，成佛有余</a>, 2007. |
	  <a href="http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/" >Permalink</a> |
	  <a href="http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/#comments" >No comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/&amp;title=KOSMOS DISTRIBUTED FILE SYSTEM (KFS)" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://del.icio.us/post?url=http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/&amp;title=KOSMOS DISTRIBUTED FILE SYSTEM (KFS)');">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.technorati.com/search/http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/');" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://www.yeeach.com/category/%e6%8a%80%e6%9c%af-%e8%bd%af%e4%bb%b6/"  title="查看 技术相关 的全部文章" rel="category tag">技术相关</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.yeeach.com/2007/10/09/kosmos-distributed-file-system-kfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
