<?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>Web Development Notes &#187; Architecture</title>
	<atom:link href="http://blog.eood.cn/category/architecture/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.eood.cn</link>
	<description>PHP, Drupal, Erlang, MySQL, Java, MongoDB, Linux, vim, ssh, screen etc</description>
	<lastBuildDate>Sat, 31 Dec 2011 12:49:49 +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>Why Drupal is not popular in China</title>
		<link>http://blog.eood.cn/why-drupal-is-not-popular-in-china</link>
		<comments>http://blog.eood.cn/why-drupal-is-not-popular-in-china#comments</comments>
		<pubDate>Fri, 30 Dec 2011 05:35:11 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[My Thinking]]></category>
		<category><![CDATA[China]]></category>
		<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/why-drupal-is-not-popular-in-china</guid>
		<description><![CDATA[I have developed based on Drupal stack for more than 4 years. In my opinion: The learning curve of Drupal is higher than other stacks, since It&#8217;s flexibility.&#160; Server environment in China is very poor. Drupal can works well at least installed in VPS. The requirement is very simple in China, you can just install [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>I have developed based on Drupal stack for more than 4 years. In my opinion:</p>
<ul>
<li>The learning curve of Drupal is higher than other stacks, since It&#8217;s flexibility.&nbsp;</li>
<li>Server environment in China is very poor. Drupal can works well at least installed in VPS.</li>
<li>The requirement is very simple in China, you can just install something like DZ forum or DEDE cms to accomplish the goal. Since the feature requirement is not comes from business requirement, they just want a simple web page to display there company profile etc.</li>
<li>Lots of teams want to build there own framework. (I disagree with this idea, it is wasting resource and time.)</li>
<li>The traffic of the website in China almost 100x larger than EU or US, but the value of the traffic is very low. So you need do more performance optimization for the Drupal site in China.</li>
<li>Most developers in China works on a Windows PC. So no drush, varnish, memcache, cron, etc.</li>
<li>Lots of developers installed Drupal and thought that Drupal is a blog :)</li>
</ul>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/why-drupal-is-not-popular-in-china/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enter Django Development</title>
		<link>http://blog.eood.cn/enter_django_python_development</link>
		<comments>http://blog.eood.cn/enter_django_python_development#comments</comments>
		<pubDate>Mon, 17 Oct 2011 08:55:13 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Development Story]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/?p=1751</guid>
		<description><![CDATA[Introduction: Django is the modern base stack for web development. Compared with Ruby on Rails, I think I like Django better: Build-in ready to use admin interface Written in Python, with better performance Simpler and reasonable project struct Smaller base stack, but you can add what you want (ajax, south, REST, oauth &#8230;) Essential tools [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float: right;" src="http://blog.eood.cn/wp-content/uploads/2011/10/django_serious-pony-331x300.jpg" alt="Django" width="331" height="300" /></p>
<p><strong><span style="font-size: large;">Introduction:</span></strong></p>
<p>Django is the modern base stack for web development. Compared with Ruby on Rails, I think I like Django better:</p>
<ul>
<li>Build-in ready to use admin interface</li>
<li>Written in Python, with better performance</li>
<li>Simpler and reasonable project struct</li>
<li>Smaller base stack, but you can add what you want (ajax, south, REST, oauth &#8230;)</li>
</ul>
<p><strong><span style="font-size: large;">Essential tools for Django development:</span></strong></p>
<p><span style="color: #000000;"><strong>virtualenv</strong></span></p>
<p>We use this to manage the library for the project. You can have different environments (different python modules, different python versions) for every projects.</p>
<blockquote><p><strong>Create new clean environment foobar</strong></p>
<p>virtualenv &#8211;no-site-packages foobar</p>
<p><strong>Active the environment foobar</strong></p>
<p>source foobar/bin/activate</p>
<p><strong>Then install library in the environment foobar</strong></p>
<p>pip &#8230;</p>
<p><strong>At the end leave the environment foobar</strong></p>
<p>deactivate</p>
</blockquote>
<p><strong>pip or easy_install</strong></p>
<p><em></em>To install python libraries.</p>
<p><strong> Django south</strong></p>
<p>Database migration tool. Alertanative tool for syncdb</p>
<p><strong>Create migration for your app</strong></p>
<p><em> ./manage.py schemamigration myapp &#8211;initial</em></p>
<p><strong>Apply the migration</strong></p>
<p><em> ./manage.py migrate myapp</em></p>
<p><strong> Then change the model myapp, and make a new migratation</strong></p>
<p><em> ./manage.py schemamigration myapp &#8211;auto</em></p>
<p><strong> And apply it</strong></p>
<p><em> ./manage.py migrate myapp django-annoying</em></p>
<p><strong> Useful decorators:</strong></p>
<p><em> rederto ajaxrequest JSONField getobjectorNone</em></p>
<p><strong>django-compressor</strong></p>
<p>Compresses linked and inline javascript or CSS into a single cached file. And support coffeescript and less css framework.</p>
<p><strong>django-pagination</strong></p>
<p>pagination tools</p>
<p><strong>django-piston</strong></p>
<p><strong></strong>A mini-framework for Django for creating RESTful APIs.</p>
<p><strong>django-celery</strong></p>
<p>Celery integration for Django.</p>
<p>Celery is a task queue/job queue based on distributed message passing.</p>
<p><strong>django-mongodb</strong></p>
<p>MongoDB backend</p>
<p><strong>django-admin-tools</strong></p>
<p>Custom user interface, customizable dashboard</p>
<p><strong>django-socialauth</strong></p>
<p>oauth for social sites, login with twitter account, facebook account or gmail account</p>
<p><strong>django-storages</strong></p>
<p>Amazon S3, MogileFS file storage</p>
<p><strong>django-grappelli</strong></p>
<p>A jazzy skin for the Django Admin-Interface</p>
<p><strong>django-profiles</strong></p>
<p>A simple application which provides basic features for working with custom user profiles in Django projects.</p>
<p><strong>django-registration</strong></p>
<p>User registration and login</p>
<p><strong>simplejson</strong></p>
<p>JSON encoding and decoding</p>
<p><strong>django-imagekit</strong></p>
<p>Image process, support S3.</p>
<p><strong>Beautiful Soup</strong></p>
<p>Web Scrapping tool</p>
<p><strong>django-workflows</strong></p>
<p>django-workflows provides a generic workflow engine for Django.</p>
<p><span style="font-size: large;">The Django development environment steps:</span></p>
<p><strong>How to install the virtualenv &amp; django:</strong></p>
<blockquote><p>sudo apt-get install python-virtualenv</p>
<p>virtualenv &#8211;no-site-packages env_nm</p>
<p>source env_nm/bin/activate</p>
<p>pip install django</p>
<p>&#8230; ( install other modules )</p>
<p>deactivate</p>
<p>Export the libraries of the environment to a configuration file</p>
<p>pip freeze &gt; requirements.txt</p>
<p>Install the environment in a clean environment</p>
<p>pip install -r requirements.txt</p>
</blockquote>
<p><strong>The missing part of Django settings.py</strong></p>
<blockquote><p><span style="font-size: small;">import os</span></p>
<p><span style="font-size: small;">ROOT_PATH = os.path.dirname(file)</span></p>
<p><span style="font-size: small;">MEDIAROOT = os.path.join(ROOTPATH, &#8216;static&#8217;)</span></p>
<p><span style="font-size: small;">TEMPLATE_DIRS = (</span></p>
<p><span style="font-size: small;">os.path.join(ROOT_PATH, &#8216;templates&#8217;)</span></p>
<p><span style="font-size: small;">)</span></p>
</blockquote>
<p><strong>Django Signals &#8211; You should pay attentation to this</strong></p>
<p>This is the ECA (Aka: Event Condition Action) part of Django.&nbsp;</p>
<p>ECA is the essentail part of modern web appliactions.</p>
<p><strong><span style="font-size: large;">Other useful modules:</span></strong></p>
<p>SQLAlchemy &#8211; use this when the django ORM is not enough.</p>
<p>Haystack &#8211; Modular search for Django.</p>
<p>Django-mptt &#8211; Preorder tree management</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/enter_django_python_development/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is new in Drupal 7</title>
		<link>http://blog.eood.cn/what-is-new-in-drupal-7</link>
		<comments>http://blog.eood.cn/what-is-new-in-drupal-7#comments</comments>
		<pubDate>Sun, 19 Jun 2011 03:35:50 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[D7]]></category>
		<category><![CDATA[Drupal7]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/?p=1673</guid>
		<description><![CDATA[User experience The design process can see at http://www.d7ux.org/ Drupal 7 UX design principles: 1. Make the most frequent tasks easy and less frequent tasks achievable. 2. Design for the 80% 3. Privilege the Content Creator 4. Make the default settings smart Learned from D7 AI: Less clicks is not nessarlly better. Few options show [...]]]></description>
			<content:encoded><![CDATA[<h2><a href="http://blog.eood.cn/wp-content/uploads/2011/06/drupal7logo.jpg"><img class="alignright size-full wp-image-1676" title="drupal7logo" src="http://blog.eood.cn/wp-content/uploads/2011/06/drupal7logo.jpg" alt="" width="225" height="180" /></a>User experience</h2>
<p>The design process can see at <a href="http://www.d7ux.org/">http://www.d7ux.org/</a></p>
<p><strong>Drupal 7 UX design principles: </strong></p>
<p>1. Make the most frequent tasks easy and less frequent tasks achievable.</p>
<p>2. Design for the 80%</p>
<p>3. Privilege the Content Creator</p>
<p>4. Make the default settings smart</p>
<p><strong>Learned from D7 AI:</strong></p>
<p>Less clicks is not nessarlly better.</p>
<p>Few options show = more decision made.</p>
<p>Order by frequency use</p>
<p><strong>Dashboard module</strong> provide the simple way to organizing administrative tasks and tracking information within your site.</p>
<h2>Database layer</h2>
<p><strong>New database API</strong></p>
<p>1. New in D7 is the placeholder and placeholder array</p>
<blockquote><p>$node = db_query(&#8220;SELECT * FROM {node} WHERE nid = <span style="color: #ff0000;">:nid</span>&#8220;, <span style="color: #0000ff;">array(&#8216;:nid&#8217; =&gt; $nid)</span>)-&gt;fetchObject();</p>
<p>$title = db_query(&#8220;SELECT title FROM {node} WHERE nid = <span style="color: #ff0000;">:nid</span>&#8220;, <span style="color: #0000ff;">array(&#8216;:nid&#8217; =&gt; $nid)</span>)-&gt;fetchField();</p></blockquote>
<p>2. New result set loop functions</p>
<blockquote><p>$result = db_query(&#8220;SELECT nid, title FROM {node}&#8221;);</p>
<p>foreach ($result as $record) {<br />
$record = $result-&gt;fetch();            // Use the default fetch mode.<br />
//$record = $result-&gt;fetchObject();  // Fetch as a stdClass object.<br />
//$record = $result-&gt;fetchAssoc();   // Fetch as an associative array.<br />
}</p></blockquote>
<p>see more: <a href="http://drupal.org/node/310072">http://drupal.org/node/310072</a></p>
<p>3. Dynamic queries</p>
<p>This is the big change in D7, see from <a href="http://drupal.org/node/310075">http://drupal.org/node/310075</a></p>
<p><strong>Support for master/slave replication</strong></p>
<blockquote><p>$result = db_query(&#8220;SELECT nid, title FROM {node}&#8221;, array(), array(<br />
<span style="color: #ff0000;"> &#8216;target&#8217; =&gt; &#8216;slave&#8217;,</span><br />
&#8216;fetch&#8217; =&gt; PDO::FETCH_ASSOC,<br />
));</p></blockquote>
<p><strong>Support for Transactions</strong></p>
<p>A function simply calls &#8220;$txn = db_transaction();&#8221; as its first (or nearly first) operation to make itself transactional.</p>
<p><strong>Nosql (Mongodb) support</strong></p>
<p>D7 has a mongodb module provide the mongodb API.</p>
<p><strong>Other</strong></p>
<p>Default to InnoDB engine</p>
<h2>Semantic Web support</h2>
<p>Support RDF</p>
<h2>More</h2>
<p>More secure password system, MD5 is no longer used.</p>
<p>More can see from <a href="http://drupal.org/about/new-in-drupal-7">http://drupal.org/about/new-in-drupal-7</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/what-is-new-in-drupal-7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>谈一谈 Scalability 和可扩展的架构设计模式</title>
		<link>http://blog.eood.cn/scalable_system_patterns</link>
		<comments>http://blog.eood.cn/scalable_system_patterns#comments</comments>
		<pubDate>Sat, 16 Apr 2011 10:37:27 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Scale]]></category>
		<category><![CDATA[可伸缩]]></category>
		<category><![CDATA[架构]]></category>
		<category><![CDATA[模式]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/scalable_system_patterns</guid>
		<description><![CDATA[Scalability 系统的可扩展性是指系统可以平稳的支持增长的业务量。 扩展性很容易理解，比如开发团队的扩展性：一个程序员扩展为 7 人团队，7 人团队扩展为 20 人团队。比如公司业务的扩展性，从几十万的交易额扩展多几百万几千万的交易额。大家都很推崇互联网商业项目的主要原因即是它有很强的扩展性，同样的业务可以从几万的营业额扩展到几亿的营业额，目标客户可以从一个城市扩展到全国或者全世界，这是传统商业无法快速实现的。 WEB 系统的扩展包括： 纵向扩展 硬件方面可以更换更强劲的服务器，增加 CPU ，内存， 使用高速磁盘。 软件方面可以对现有代码的优化，重构。使用 Non-Blocking 非阻塞 IO 模式，或者异步 IO 模式，使用线程模式或者改用 事件驱动形模式。 目标是提高单机 qps ，连接数，来支持更多的连接，更多的用户，更多的业务量。 横向扩展 使用集群，更多的服务器代替单一服务器。 可扩展系统设计模式 负载均衡 这种模式将请求分发到并行的处理机上。要求程序 无状态 ，请求对于每个处理机都应该是相同的。比如常见的 REST 模式既是 无状态 模式。 分散聚集模式 这种模式将请求分发到多个处理机上，然后收集每个处理机返回的结果，得到整合的结果。比如Map-reduce也可以看做这种模式。 结果缓存 这种模式，首先查看请求是不是发生过，如果发生过则直接返回之前的结果，来节约处理时间。这种模式非常常见比如静态页面的 反向代理 ，各层级的 CACHE。 共享空间 所有的处理机监控共享空间中的未处理信息，处理完后将结果提交到共享空间，直到整个任务完成。 MAP REDUCE 这种模式通常用来解决 IO 密集型的业务，通过并行化的分布式系统来解决 IO 瓶颈。 队列模式 每个处理机从待处理队列提取任务进行处理然后将结果保存到已处理队列，多个处理机可以并行处理队列任务。 [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>Scalability </strong></span>系统的可扩展性是指系统可以平稳的支持增长的业务量。</p>
<p>扩展性很容易理解，比如开发团队的扩展性：一个程序员扩展为 7 人团队，7 人团队扩展为 20 人团队。比如公司业务的扩展性，从几十万的交易额扩展多几百万几千万的交易额。大家都很推崇互联网商业项目的主要原因即是它有很强的扩展性，同样的业务可以从几万的营业额扩展到几亿的营业额，目标客户可以从一个城市扩展到全国或者全世界，这是传统商业无法快速实现的。</p>
<p><strong><span style="font-size: medium;">WEB 系统的扩展包括：</span></strong></p>
<p><strong>纵向扩展</strong></p>
<p>硬件方面可以更换更强劲的服务器，增加 CPU ，内存， 使用高速磁盘。</p>
<p>软件方面可以对现有代码的优化，重构。使用 Non-Blocking 非阻塞 IO 模式，或者异步 IO 模式，使用线程模式或者改用 事件驱动形模式。</p>
<p>目标是提高单机 qps ，连接数，来支持更多的连接，更多的用户，更多的业务量。</p>
<p><strong>横向扩展</strong></p>
<p>使用集群，更多的服务器代替单一服务器。</p>
<p><strong><span style="font-size: medium;">可扩展系统设计模式</span></strong></p>
<p><strong>负载均衡</strong></p>
<p>这种模式将请求分发到并行的处理机上。要求程序 <strong>无状态 </strong>，请求对于每个处理机都应该是相同的。比如常见的 REST 模式既是 <strong>无状态</strong> 模式。</p>
<p><strong>分散聚集模式</strong></p>
<p>这种模式将请求分发到多个处理机上，然后收集每个处理机返回的结果，得到整合的结果。比如Map-reduce也可以看做这种模式。</p>
<p><strong>结果缓存</strong></p>
<p>这种模式，首先查看请求是不是发生过，如果发生过则直接返回之前的结果，来节约处理时间。这种模式非常常见比如静态页面的 反向代理 ，各层级的 CACHE。</p>
<p><strong>共享空间</strong></p>
<p>所有的处理机监控共享空间中的未处理信息，处理完后将结果提交到共享空间，直到整个任务完成。</p>
<p><strong>MAP REDUCE</strong></p>
<p>这种模式通常用来解决 IO 密集型的业务，通过并行化的分布式系统来解决 IO 瓶颈。</p>
<p><strong>队列模式</strong></p>
<p>每个处理机从待处理队列提取任务进行处理然后将结果保存到已处理队列，多个处理机可以并行处理队列任务。</p>
<p><span style="font-size: medium;"><strong>可扩展系统设计的要点</strong></span></p>
<p>1. 快速失效并返回错误</p>
<p>2. 将复杂的大的请求分解成多个小请求</p>
<p>3. 利用 超时</p>
<p>4. 利用 缓存</p>
<p>5. 用队列来做缓冲</p>
<p>6. 精确测量每个步骤，记录详细日志</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/scalable_system_patterns/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSON JSON-RPC 和 JSONP</title>
		<link>http://blog.eood.cn/json-json-rpc-%e5%92%8c-jsonp</link>
		<comments>http://blog.eood.cn/json-json-rpc-%e5%92%8c-jsonp#comments</comments>
		<pubDate>Sat, 16 Apr 2011 09:31:44 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[JSON-RPC]]></category>
		<category><![CDATA[JSONP]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/?p=1655</guid>
		<description><![CDATA[虽然用文本格式来通信比较昂贵，但是如今这方面的费用越来越便宜。应该在游戏这样数据量很大的应用中使用二进制数据进行通信，而在普通 WEB 应用中使用文本格式的数据来通信。在架构中应该尽量使用 JSON 而不是 XML 作为通信协议。 用 JSON 作为文本通信格式有很多好处： JSON 就是 Javascript 中的一个对象，很容易把一个 JS 对象转换成 JSON 格式的数据 在JS 中进行对象和 JSON 的转换： var myJSONText = JSON.stringify(myObject, replacer); var myObject = eval('(' + myJSONtext + ')'); 在 jQuery中进行对象和 JSON 的转换： var obj = jQuery.parseJSON('{"name":"John"}'); alert( obj.name === "John" ); 用 JSON-RPC 替代 XML-RPC 通常会把数据减小到 30% 左右 [...]]]></description>
			<content:encoded><![CDATA[<p>虽然用文本格式来通信比较昂贵，但是如今这方面的费用越来越便宜。应该在游戏这样数据量很大的应用中使用二进制数据进行通信，而在普通 WEB 应用中使用文本格式的数据来通信。在架构中应该尽量使用 JSON 而不是 XML 作为通信协议。</p>
<p>用 JSON 作为文本通信格式有很多好处：</p>
<p><strong>JSON 就是 Javascript 中的一个对象，很容易把一个 JS 对象转换成 JSON 格式的数据</strong></p>
<p>在JS 中进行对象和 JSON 的转换：</p>
<pre class="prettyprint">
var myJSONText = JSON.stringify(myObject, replacer);
var myObject = eval('(' + myJSONtext + ')');
</pre>
<p>在 jQuery中进行对象和 JSON 的转换：</p>
<pre class="prettyprint">
var obj = jQuery.parseJSON('{"name":"John"}');
alert( obj.name === "John" );
</pre>
<p><strong>用 JSON-RPC 替代 XML-RPC 通常会把数据减小到 30% 左右</strong></p>
<p>JSON-RPC 请求的例子</p>
<pre class="prettyprint">
Client: { "method": "echo", "params": ["blog.eood.cn", "Hello JSON-RPC"], "id": 1}
Server: { "result": "Hello JSON-RPC", "error": null, "id": 1}
</pre>
<p><strong>nodeJS 中对 JSON-RPC 做了支持</strong></p>
<p>见 https://github.com/ericflo/node-jsonrpc</p>
<p>在 nodeJS 中创建 JSON-RPC 的服务端</p>
<pre class="prettyprint">
var rpc = require('jsonrpc');
function add(first, second) {
&nbsp;&nbsp; &nbsp;return first + second;
}
rpc.expose('add', add);
rpc.listen(8000, 'localhost');
</pre>
<p>在 nodeJS 中创建 JSON-RPC 的客户端</p>
<pre class="prettyprint">
var rpc = require('jsonrpc');
var sys = require('sys');
var client = rpc.getClient(8000, 'localhost');
client.call('add', [1, 2], function(result) {
sys.puts('1 + 2 = ' + result);
});
</pre>
<p><strong>PHP 中也有支持 JSON-RPC 的类库 </strong></p>
<p>见 http://www.jsonrpcphp.org/?page=example&amp;lang=en</p>
<p><strong>关于 JSONP</strong></p>
<p>JSONP 是跨域 AJAX 通信的方式</p>
<p>jQuery 做 JSONP 请求和普通 AJAX 请求几乎一致</p>
<pre class="prettyprint">
$.ajax({
&nbsp;&nbsp;&nbsp; url: "http://blog.eood.cn/jsonp.json",
&nbsp;&nbsp;&nbsp; dataType: '<strong>jsonp</strong>',
&nbsp;&nbsp;&nbsp; success: function(results){
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...
&nbsp;&nbsp;&nbsp; }
});
</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/json-json-rpc-%e5%92%8c-jsonp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scale Your Web Service Database With Amazon SimpleDB</title>
		<link>http://blog.eood.cn/scale-your-web-service-database-with-amazon-simpledb</link>
		<comments>http://blog.eood.cn/scale-your-web-service-database-with-amazon-simpledb#comments</comments>
		<pubDate>Fri, 25 Feb 2011 09:38:48 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[NoSql]]></category>
		<category><![CDATA[SimpleDB]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/?p=1593</guid>
		<description><![CDATA[Amazon SimpleDB is a good choice for your Web application for its scalable, high avaliable, zero-configuration, schemaless. It&#8217;s ready to use. SimpleDB is written in Erlang. Pricing Utilization-based pricing. No charge for up to 1GB of ingres+egress, 25 machine hours, and 1GB storage. Performance Average put rate: 70 singleton puts/domain/sec Netflix staff has forklift 1 [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon SimpleDB is a good choice for your Web application for its scalable, high avaliable, zero-configuration, schemaless. It&#8217;s ready to use. SimpleDB is written in Erlang.</p>
<p><strong>Pricing</strong></p>
<p>Utilization-based pricing.</p>
<p>No charge for up to 1GB of ingres+egress, 25 machine hours, and 1GB storage.</p>
<p><strong>Performance</strong></p>
<p>Average put rate: 70 singleton puts/domain/sec</p>
<p><a href="http://practicalcloudcomputing.com/post/284222088/forklift-1b-records">Netflix staff</a> has forklift 1 billion rows into SimpleDB with a average rate: 10-11K items/sec.</p>
<p><strong>Limits</strong></p>
<table style="border: 0.25px solid #cccccc;" border="0" cellspacing="0">
<thead>
<tr>
<th style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #333333; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top; background-color: #eeeeee; font-weight: bold; text-align: left;">Parameter</th>
<th style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #333333; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top; background-color: #eeeeee; font-weight: bold; text-align: left;">Restriction</th>
</tr>
</thead>
<tbody>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Domain size</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">10 GB per domain</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Domain size</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">1 billion attributes per domain</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Domain name</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">3-255 characters (a-z, A-Z, 0-9, &#8216;_&#8217;, &#8216;-&#8217;, and &#8216;.&#8217;)</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Domains per account</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">100</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Attribute name-value pairs per item</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">256</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Attribute name length</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">1024 bytes</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Attribute value length</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">1024 bytes</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Item name length</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">1024 bytes</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Attribute name, attribute value, and item name allowed characters</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">
<p class="simpara" style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; margin-bottom: 1em; margin-top: 0px;">All UTF-8 characters that are valid in XML documents.</p>
<p class="simpara" style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; margin-bottom: 0px; margin-top: -0.4em;">Control characters and any sequences that are not valid in XML are returned Base64-encoded. For more information, see<span class="Apple-converted-space">&nbsp;</span><a class="xref" style="color: #004b91; text-decoration: none; padding: 3px;" title="Working with XML-Restricted Characters" href="http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/InvalidCharacters.html">Working with XML-Restricted Characters</a>.</p>
</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Attributes per<span class="Apple-converted-space">&nbsp;</span><code class="code" style="font-family: 'Courier New',Courier,mono; font-size: 12px;">PutAttributes</code><span class="Apple-converted-space">&nbsp;</span>operation</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">256</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Attributes requested per<span class="Apple-converted-space">&nbsp;</span><code class="code" style="font-family: 'Courier New',Courier,mono; font-size: 12px;">Select</code><span class="Apple-converted-space">&nbsp;</span>operation</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">256</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Items per<span class="Apple-converted-space">&nbsp;</span><code class="code" style="font-family: 'Courier New',Courier,mono; font-size: 12px;">BatchPutAttributes</code>operation</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">25</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Maximum items in<span class="Apple-converted-space">&nbsp;</span><code class="code" style="font-family: 'Courier New',Courier,mono; font-size: 12px;">Select</code>response</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">2500</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Maximum query execution time</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">5 seconds</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Maximum number of unique attributes per<code class="code" style="font-family: 'Courier New',Courier,mono; font-size: 12px;">Select</code>expression</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">
<p class="simpara" style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; margin-bottom: 0px; margin-top: 0px;">20</p>
</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Maximum number of comparisons per<code class="code" style="font-family: 'Courier New',Courier,mono; font-size: 12px;">Select</code>expression</td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">
<p class="simpara" style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; margin-bottom: 0px; margin-top: 0px;">20</p>
</td>
</tr>
<tr>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">Maximum response size for<span class="Apple-converted-space">&nbsp;</span><code class="code" style="font-family: 'Courier New',Courier,mono; font-size: 12px;">Select</code></td>
<td style="font-family: verdana,sans-serif,arial; font-size: 12px; color: #000000; padding: 5px; border: 0.25px solid #cccccc; vertical-align: top;">1MB</td>
</tr>
</tbody>
</table>
<p>And not support for joins, full text search.</p>
<p><strong>Query examples:</strong></p>
<blockquote><p>select itemName() from log where itemName() like &#8220;77-11232%&#8221;</p>
<p>select * from log where itemName() like &#8220;%:1169:%&#8221; order by itemName() asc</p>
<p>SELECT * FROM songs WHERE Year BETWEEN &#8217;1980&#8242; AND &#8217;2000&#8242;</p>
<p>SELECT * FROM songs WHERE itemName() IS NOT NULL ORDER BY itemName() DESC</p>
<p>SELECT count(*) FROM songs WHERE Year &lt; &#8217;2000&#8242;</p>
</blockquote>
<p><strong>Firefox SimpleDB management extension:</strong></p>
<p>SDB Tool: <a href="http://code.google.com/p/sdbtool/">http://code.google.com/p/sdbtool/</a></p>
<p>&nbsp;</p>
<ul>
<li>Amazon SimpleDB PHP class:&nbsp; <a href="http://sourceforge.net/projects/php-sdb/">http://sourceforge.net/projects/php-sdb/</a></li>
<li>Examples of usage of SimpleDB PHP class: <a href="http://webmasterinresidence.ca/simpledb/">http://webmasterinresidence.ca/simpledb/</a></li>
<li>Amazon S3 PHP class: <a href="http://undesigned.org.za/2007/10/22/amazon-s3-php-class">http://undesigned.org.za/2007/10/22/amazon-s3-php-class</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/scale-your-web-service-database-with-amazon-simpledb/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal 高效部署和维护</title>
		<link>http://blog.eood.cn/drupal-server-admin</link>
		<comments>http://blog.eood.cn/drupal-server-admin#comments</comments>
		<pubDate>Sun, 09 Jan 2011 03:00:17 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/?p=1529</guid>
		<description><![CDATA[Drupal 是由很小的核心和几千个实现不同功能的模块组成，无论要实现什么功能，几乎都可以通过找到模块来实现。但是一个中等的系统会需要几十个或者上百个模块。所以Drupal 模块的部署和维护必须通过高效的方式来实现。 Drupal 提供了两种不同的部署方式，你可以通过命令行来部署，或者通过传统的WEB界面来维护。 本文只介绍命令行的方式。Drupal 有命令行维护工具 Drush 。通过Drush来维护系统是Drupal众多优秀的特性之一，它类似于Django中命令行自动生成数据库结构，或者PECL安装PHP的扩展模块，或者yum来维护Linux软件包。只需要一行命令就可以安装系统，或者下载一个模块。 1. Drush的安装： 对于Drupal6.x,下载Drush模块，并且解压即可： $ cd ~ $ wget http://ftp.drupal.org/files/projects/drush-6.x-3.3.tar.gz $ tar zxvf drush-6.x-3.3.tar.gz $ ln -s /path/to/drush/drush /usr/local/bin/drush 这样你可以在任何目录执行drush命令。 2. 用Drush来下载安装Drupal： 你不需要从Drupal网站下载安装包，上传到FTP，再配置数据库，从WEB界面安装： 下载并且解压Drupal包： $ drush dl 安装Drupal $ drush is 安装CCK $ drush dl cck $ drush en cck 清空cache可能是开发中最常用的功能： $ drush cc 查看watchdog信息： $ drush [...]]]></description>
			<content:encoded><![CDATA[<p>Drupal 是由很小的核心和几千个实现不同功能的模块组成，无论要实现什么功能，几乎都可以通过找到模块来实现。但是一个中等的系统会需要几十个或者上百个模块。所以Drupal 模块的部署和维护必须通过高效的方式来实现。</p>
<p>Drupal 提供了两种不同的部署方式，你可以通过命令行来部署，或者通过传统的WEB界面来维护。</p>
<p>本文只介绍命令行的方式。Drupal 有命令行维护工具 <a href="http://drupal.org/project/drush" target="_blank">Drush</a> 。通过Drush来维护系统是Drupal众多优秀的特性之一，它类似于Django中命令行自动生成数据库结构，或者PECL安装PHP的扩展模块，或者yum来维护Linux软件包。只需要一行命令就可以安装系统，或者下载一个模块。</p>
<p><strong>1. Drush的安装：</strong></p>
<p>对于Drupal6.x,下载Drush模块，并且解压即可：</p>
<p>$ cd ~</p>
<p>$ wget http://ftp.drupal.org/files/projects/drush-6.x-3.3.tar.gz</p>
<p>$ tar zxvf drush-6.x-3.3.tar.gz</p>
<p>$ ln -s /path/to/drush/drush /usr/local/bin/drush</p>
<p>这样你可以在任何目录执行drush命令。</p>
<p><strong>2. 用Drush来下载安装Drupal：</strong></p>
<p>你不需要从Drupal网站下载安装包，上传到FTP，再配置数据库，从WEB界面安装：</p>
<p>下载并且解压Drupal包：</p>
<p>$ drush dl</p>
<p>安装Drupal</p>
<p>$ drush is</p>
<p>安装CCK</p>
<p>$ drush dl cck</p>
<p>$ drush en cck</p>
<p>清空cache可能是开发中最常用的功能：</p>
<p>$ drush cc</p>
<p>查看watchdog信息：</p>
<p>$ drush ws</p>
<p>执行cron</p>
<p>$ drush cron</p>
<p>更多drush命令：http://drush.ws</p>
<p><strong>推荐用Drush来部署和维护Drupal</strong></p>
<p>所有模块的安装维护仅仅需要1-2行命令,不必在忍受WEB界面网速的问题。我们需要用最好最快的方式来节约时间，提高效率。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/drupal-server-admin/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Redis beginner&#8217;s guide</title>
		<link>http://blog.eood.cn/redis-beginners-guide</link>
		<comments>http://blog.eood.cn/redis-beginners-guide#comments</comments>
		<pubDate>Tue, 28 Dec 2010 12:46:51 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[NoSql]]></category>
		<category><![CDATA[Redis]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/redis-beginners-guide</guid>
		<description><![CDATA[1. Redis web admin UI Redis-admin: &#160;&#160;&#160; The only redis admin ui written in php found till now. But lake of testing, personally not run it successful. Ref url: http://code.google.com/p/redis-admin/ PHP RedisAdminUI: &#160;&#160;&#160; This project based on C# and ajax, so you should run under Windows server, or install mono under Linux. &#160;&#160;&#160; But you [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: arial black,avant garde;">1. Redis web admin UI</span><br />
 <strong>Redis-admin:</strong><br />
 &nbsp;&nbsp;&nbsp; The only redis admin ui written in php found till now. But lake of testing, personally not run it successful.<br />
 Ref url: http://code.google.com/p/redis-admin/ PHP<br />
 <strong>RedisAdminUI:</strong><br />
 &nbsp;&nbsp;&nbsp; This project based on C# and ajax, so you should run under Windows server, or install mono under Linux.<br />
 &nbsp;&nbsp;&nbsp; But you can simply put XSP under the project directory to setup it.<br />
 &nbsp;&nbsp;&nbsp; Ref url: http://www.servicestack.net/mythz_blog/?p=381 .net + XSP<br />
 &nbsp;&nbsp;&nbsp; Online Example: http://www.servicestack.net/RedisAdminUI/AjaxClient/#<br />
 <strong>Redweb:</strong><br />
 &nbsp;&nbsp;&nbsp; Web interface of Redis written in Python.<br />
 &nbsp;&nbsp;&nbsp; Ref url: https://github.com/kennyshen/redweb<br />
 <strong>RedisCover:</strong><br />
 &nbsp;&nbsp;&nbsp; Web interface of Redis written in Ruby.</p>
<p><span style="font-family: arial black,avant garde;">2. Advantage of Redis</span><br />
 <strong>Get Unique IDs just one query:</strong><br />
 &nbsp;&nbsp;&nbsp; INCR &lt;object&gt;<br />
 <strong>Atomic Opertion:</strong><br />
 &nbsp;&nbsp;&nbsp; MULTI<br />
 &nbsp;&nbsp;&nbsp; &#8230;<br />
 &nbsp;&nbsp;&nbsp; EXEC<br />
 <strong>Multiple Databases:</strong><br />
 &nbsp;&nbsp;&nbsp; SELECT 3<br />
 &nbsp;&nbsp;&nbsp; The default database will be 0.<br />
 <strong>Pub/Sub Asynchronous message</strong><br />
 &nbsp;&nbsp;&nbsp; SUBSCRIBE room:a<br />
 &nbsp;&nbsp;&nbsp; PUBLISH room &#8220;message&#8221;<br />
 &nbsp;&nbsp;&nbsp; UNSUBSCRIBE room<br />
 <strong>Simple FIFO Queue</strong><br />
 &nbsp;&nbsp;&nbsp; LPUSH queue1 a<br />
 &nbsp;&nbsp;&nbsp; &#8230;<br />
 &nbsp;&nbsp;&nbsp; RPOP queue1</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/redis-beginners-guide/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>增强沟通技巧和提高开发效率</title>
		<link>http://blog.eood.cn/improve_communication_skills_and_development_efficiency</link>
		<comments>http://blog.eood.cn/improve_communication_skills_and_development_efficiency#comments</comments>
		<pubDate>Fri, 24 Dec 2010 14:58:48 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Project Manament]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/?p=1482</guid>
		<description><![CDATA[时常回顾team的开发过程, 虽然总体还算非常顺利, 但是仍然有很多可以改进的地方, 找出其中的问题可以大大提高开发的效率。 项目开发中遇到的问题，或许也是很多团队遇到的问题： 通常一个feature需要比计划更多的时间来完成； 孤立看一个feature，很难估计相关联的任务量，所以通常一个看起来简单的特性需要更多的时间来完成。Bug产生和解决的反复会延长估计的时间。将一个feature放到整个项目中还需要考虑到context的分析的工作量。 不能孤立的分析一个feature, 一个feature的增加，可能需要对之前很多feature的修改，一个feature的变化，可能需要对之前更多的feature进行改进。 有些时候程序员的效率会比平时低； 这常发生在task频繁切换的时候，假如一个任务正在进行，又增加了另一个任务，同一个人做的情况下就会遇到task的切换，很多时间浪费在环境的分析回忆上。 文档过多或者过少； 文档过多会浪费很多时间在写文档上，这是敏捷开发的大忌，但是完全不写文档很难做到协同开发，即使是自己写的代码时间久了也会忘记细节。 会议不能有效解决问题； 会议需要进行日程计划，每次例会需要所有人了解议题，提前熟悉相关内容，否则复制的问题沟通会很困难。 PM认为问题很简单，而开发团队认为很难解决。 应该把问题分离到程序解决和业务流程解决两部分，有时候单纯用自动化的方式不比人工流程效率高。其实难题往往通过第三种方式来解决，需要花更多的时间在问题分析上。 程序员和非程序员思维有很大区别(实际参与编码的程序员)： 程序员会考虑一个feature是不是会失败，而非程序员想的是一个feature是不是会成功，可以加上去。所以往往后者会不断的添加feature，前者会经常说实现这个很难，实现那个几乎没可能。 项目的开发，解决所有问题其实都是在一个现有的堆栈上进行的，这基于先前的开发经验或者网上能找到的参考的经验。也许问题是很简单，但是假如这方面的经验非常缺少，就会导致更大的开发风险，更大的难度。 非程序员往往从问题难度本身来看待开发的难度，而程序员则会根据经验来看待问题，比如现有技术堆栈和现有经验。 总之 项目的开发过程其实是ROI的控制和对细小任务风险的评估的过程，只有所有人能高效沟通，正确不断评估风险，正确审视投入产出比，才能真正做到开发的高效率。 转载请保留原文链接 http://blog.eood.cn/improve_communication_skills_and_development_efficiency]]></description>
			<content:encoded><![CDATA[<blockquote><p>时常回顾team的开发过程, 虽然总体还算非常顺利, 但是仍然有很多可以改进的地方, 找出其中的问题可以大大提高开发的效率。</p></blockquote>
<p><img class="alignright size-medium wp-image-1487" title="DSC8510" src="http://blog.eood.cn/wp-content/uploads/2010/12/DSC8510-300x199.jpg" alt="" width="300" height="199" /></p>
<h4 style="text-align: left;">项目开发中遇到的问题，或许也是很多团队遇到的问题：</h4>
<h4>通常一个feature需要比计划更多的时间来完成；</h4>
<p>孤立看一个feature，很难估计相关联的任务量，所以通常一个看起来简单的特性需要更多的时间来完成。Bug产生和解决的反复会延长估计的时间。将一个feature放到整个项目中还需要考虑到context的分析的工作量。</p>
<p>不能孤立的分析一个feature, 一个feature的增加，可能需要对之前很多feature的修改，一个feature的变化，可能需要对之前更多的feature进行改进。</p>
<h4>有些时候程序员的效率会比平时低；</h4>
<p>这常发生在task频繁切换的时候，假如一个任务正在进行，又增加了另一个任务，同一个人做的情况下就会遇到task的切换，很多时间浪费在环境的分析回忆上。</p>
<h4>文档过多或者过少；</h4>
<p>文档过多会浪费很多时间在写文档上，这是敏捷开发的大忌，但是完全不写文档很难做到协同开发，即使是自己写的代码时间久了也会忘记细节。</p>
<h4>会议不能有效解决问题；</h4>
<p>会议需要进行日程计划，每次例会需要所有人了解议题，提前熟悉相关内容，否则复制的问题沟通会很困难。</p>
<h4>PM认为问题很简单，而开发团队认为很难解决。</h4>
<p>应该把问题分离到程序解决和业务流程解决两部分，有时候单纯用自动化的方式不比人工流程效率高。其实难题往往通过第三种方式来解决，需要花更多的时间在问题分析上。</p>
<h4>程序员和非程序员思维有很大区别(实际参与编码的程序员)：</h4>
<p>程序员会考虑一个feature是不是会失败，而非程序员想的是一个feature是不是会成功，可以加上去。所以往往后者会不断的添加feature，前者会经常说实现这个很难，实现那个几乎没可能。</p>
<p>项目的开发，解决所有问题其实都是在一个现有的堆栈上进行的，这基于先前的开发经验或者网上能找到的参考的经验。也许问题是很简单，但是假如这方面的经验非常缺少，就会导致更大的开发风险，更大的难度。</p>
<p>非程序员往往从问题难度本身来看待开发的难度，而程序员则会根据经验来看待问题，比如现有技术堆栈和现有经验。</p>
<h4>总之</h4>
<p>项目的开发过程其实是ROI的控制和对细小任务风险的评估的过程，只有所有人能高效沟通，正确不断评估风险，正确审视投入产出比，才能真正做到开发的高效率。</p>
<p>转载请保留原文链接 <a href="http://blog.eood.cn/improve_communication_skills_and_development_efficiency">http://blog.eood.cn/improve_communication_skills_and_development_efficiency</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/improve_communication_skills_and_development_efficiency/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>如何正确处理www域名和无www域名</title>
		<link>http://blog.eood.cn/www_domain_and_non_www_domain_settings</link>
		<comments>http://blog.eood.cn/www_domain_and_non_www_domain_settings#comments</comments>
		<pubDate>Fri, 10 Dec 2010 12:48:26 +0000</pubDate>
		<dc:creator>Bruce Dou</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[Htaccess]]></category>

		<guid isPermaLink="false">http://blog.eood.cn/?p=1465</guid>
		<description><![CDATA[一般我们常用www.eood.cn这样的域名作为主站域名, 但是无www前缀的域名也很常见。假如只设置www域名,有些人直接输入无www的域名将找不到你的网站,这样会损失很大一部分流量。但是如果将有无www前缀的域名都指向自己的网站，又会造成SEO中重复文章的问题, 你将会发现搜索引擎中一部分是带www前缀的url,另一部分则没带。还会出现文章索引减少等很多问题。所以我们必须了解如何正确使用这两个域名。 正确的做法是将一个域名301重定向的另一个域名 比如你使用带www前缀的域名作为主域名，可以将无www前缀的域名下的所有请求301重定向到主域名下对应的URL上。 将无www域名指向空白的目录,目录下只保留一个.htaccess文件, 文件内容为(以eood.cn为例) RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^eood.cn RewriteRule (.*) http://www.eood.cn/$1 [R=301,L] 这样所有流量会引向正确的URL，还不会造成重复内容的问题。 这种设置方法还可以用在更换域名的情况下，比如你要更换老域名www.a.com为www.b.com, 将主站域名换成www.b.com后，将www.a.com指向空白目录,目录下只保留一个.htaccess文件，文件内容为 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www.a.com RewriteRule (.*) http://www.b.com/$1 [R=301,L] 这样设置后无论搜索引擎爬虫还是用户都会自动跳转到正确的URL上。老网站的PR会逐步向新网站迁移。]]></description>
			<content:encoded><![CDATA[<p>一般我们常用www.eood.cn这样的域名作为主站域名, 但是无www前缀的域名也很常见。假如只设置www域名,有些人直接输入无www的域名将找不到你的网站,这样会损失很大一部分流量。但是如果将有无www前缀的域名都指向自己的网站，又会造成SEO中重复文章的问题, 你将会发现搜索引擎中一部分是带www前缀的url,另一部分则没带。还会出现文章索引减少等很多问题。所以我们必须了解如何正确使用这两个域名。</p>
<p><strong>正确的做法是将一个域名301重定向的另一个域名</strong></p>
<p>比如你使用带www前缀的域名作为主域名，可以将无www前缀的域名下的所有请求301重定向到主域名下对应的URL上。</p>
<p>将无www域名指向空白的目录,目录下只保留一个.htaccess文件, 文件内容为(以eood.cn为例)</p>
<p>RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} ^eood.cn<br />
RewriteRule (.*) http://www.eood.cn/$1 [R=301,L]</p>
<p>这样所有流量会引向正确的URL，还不会造成重复内容的问题。</p>
<p>这种设置方法还可以用在更换域名的情况下，比如你要更换老域名www.a.com为www.b.com, 将主站域名换成www.b.com后，将www.a.com指向空白目录,目录下只保留一个.htaccess文件，文件内容为</p>
<p>RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} ^www.a.com<br />
RewriteRule (.*) http://www.b.com/$1 [R=301,L]</p>
<p>这样设置后无论搜索引擎爬虫还是用户都会自动跳转到正确的URL上。老网站的PR会逐步向新网站迁移。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eood.cn/www_domain_and_non_www_domain_settings/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.278 seconds. -->
<!-- File not cached! Super Cache Couldn't write to: wp-content/cache/wp-cache-4302990f47fbc639ac356334444d8c13.html -->

