<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/feedsky6.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xg="http://www.xianguo.com/schemas/reader/rss" version="2.0"><channel><atom:link href="http://feed.feedsky.com/readshare" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/readshare" type="application/rss+xml"></fs:self_link><lastBuildDate>Thu, 20 Nov 2008 03:10:30 GMT</lastBuildDate><title>ReadShare</title><description>分享我的阅读</description><link>http://www.xianguo.com/service/sharerss/6365</link><language>zh-cn</language><pubDate>Thu, 20 Nov 2008 04:41:07 GMT</pubDate><category>article</category><dc:subject>article</dc:subject><item><title>(译)理解“渐进增强(Progressive Enhancement)”</title><link>http://ued.taobao.com/blog/2008/10/09/understanding-progressiveen-hancement-chs-translation/</link><xg:id>384446107</xg:id><description>原文：Understanding Progressive Enhancement

作者：Aaron Gustafson

译者：空帷 @ Taobao UED

自 1994 年开始，Web 开发社群就擂起了名为“平稳退化 (Graceful Degradation)”的大鼓。这是一个从工程界引入的概念，其主旨是为那些最新最好的浏览器提供更全方位的浏览体验，而对不幸使用 Netscape 4 的人们仅提供很少的一些基本功能。这个方法的确能够奏效，但它却并不真正符合 Tim Berners-Lee （译注：万维网之父）对“普及的可访问型  Web (Universally Accessible Web)”的设计初衷。

大约十年之后，一些聪明的人开始对“平稳退化”产生质疑，并最终发现它在许多层面上都存在着缺陷。他们致力于改善内容可利用性 (Content Availability)、全局可访问性 (Overall Accessibility) 和移动设备浏览器的能力，并为 Web 开发寻觅到一条新的途径 —— 一条聚焦于内容并能为旧设备提供更多实际支持的途径。

在 2003 年度的 SXSW （译注：西南偏南节庆及会议，South by Southwest Festivals + Conferences，这里特指其中的“交互”主题会议，除此之外还有“电影”和“音乐”两个主题）上，Steve Champeon 和 Nick Finck 发表了题为《展望 Web 设计的未来 (Inclusive Web ...</description><pubDate>Thu, 20 Nov 2008 11:10:30 +0800</pubDate><guid isPermaLink="false">http://ued.taobao.com/blog/2008/10/09/understanding-progressiveen-hancement-chs-translation/</guid><fs:srclink>http://ued.taobao.com/blog/2008/10/09/understanding-progressiveen-hancement-chs-translation/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418743/4060402</fs:itemid></item><item><title>网页的栅格系统设计</title><link>http://ued.taobao.com/blog/2008/09/17/grid_systems/</link><xg:id>356899459</xg:id><description>栅格系统的形成
1692年，新登基的法国国王路易十四感到法国的印刷水平强差人意，因此命令成立一个管理印刷的皇家特别委员会。他们的首要任务是设计出科学的、合理的， 重视功能性的新字体。委员会由数学家尼古拉斯加宗（Nicolas Jaugeon）担任领导，他们以罗马体为基础，采用方格为设计依据，每个字体方格分为64个基本方各单位，每个方各单位再分成36个小格，这样，一个印 刷版面就有 2304个小格组成，在这个严谨的几何网格网络中设计字体的形状，版面的编排，试验传达功能的效能，这是是世界上最早对字体和版面进行科学实验的活动，也 是栅格系统最早的雏形。

栅格系统英文为“grid systems”，也有人翻译为“网格系统”，其实是一回事。不过从定义上说，栅格更为准确些，从维基百科查到栅格的定义为：栅格设计系统（又称网格设计系统、标准尺寸系统、程序版面设计、瑞士平面设计风格、国际主义平面设计风格），是一种平面设计的方法与风格。运用固定的格子设计版面布局，其风格工整简洁，在二战后大受欢迎，已成为今日出版物设计的主流风格之一。

网页设计中的栅格系统 
我给网页栅格系统下的定义为：以规则的网格阵列来指导和规范网页中的版面布局以及信息分布。
网页栅格系统是从平面栅格系统中发展而来。对于网页设计来说，栅格系统的使用，不仅可以让网页的信息呈现更加美观易读，更具可用性。而且，对于前端开发来说，网页将更加的灵活与规范。





栅格系统在现在的网页设计中应用越来越多，从网络上搜罗了一篇关于栅格系统应用的文章：30个最顶尖的基于栅格系统的博客网站设计。

栅格系统的设计原理及应用
那么如何设计一个栅格系统？接下来我们将通过实例，详细的介绍一下网页栅格系统的原理与应用：



在网页设计中，我们把宽度为“W”的页面分割成n个网格单元“a”，每个单元与单元之间的间隙设为“i”,此时我们把“a+i”定义“A”。他们之间的关系如下：
W =（a×n）+（n-1）i
由于a+i=A，
可得：(A×n) - i = W
这个公式表述了网页的布局与网页“背后”的栅格系统之间的某种关系。我们拿yahoo作例，来看一下栅格系统的应用：



yahoo的网站页面宽度为W=950px，每个区块与区块的间隔为i=10px；如果应用上面的公式，可以推出A=40px，既yahoo首页横向版式设计采用的栅格系统为：
（40×n）- 10 = W
下面我们列出当n等于不同数值时W变化的数值表格 ：



从表格可以看出：yahoo首页的布局完全是按照栅格系统进行设计的，每个区块的宽度对应的n值分别为：4，11，9。在这里我们看到一个很有意思 的事情：只要保证一个横向维度的各个区块的n值相加等于24，则即可保证页面的宽度一定是950px。然而，950px的宽度也恰好就是当n=24的时 候，W的宽度值。由此我们得出以下的应用模式：



在栅格系统中，设计师根据需要制定不同的版式或者划分区块，他们的依据将是上面的那张对应表进行设计。这样，一个栅格系统的应用就从此开始了。我们 看到，使用栅格系统的网页设计，非常的有条理性；看上去也很舒服。最重要的是，它给整个网站的页面结构定义了一个标准。对于视觉设计师来说，他们不用再为 设计一个网站每个页面都要想一个宽度或高度而烦恼了。对于前端开发工程师来说，页面的布局设计将完全是规范的和可重用的，这将大大节约了开发成本。对于内 容编辑或广告销售来说，所有的广告都是规则的，通用的，他们再也不用做出一套N张不同尺寸的广告图了……

当然只要你愿意，我们可以衍生出任何一种栅格系统，只要改变A和i的值，这个根据网站的实际情况来制定。那么如何选择合适栅格系统，主要通过“构成 要素与程序、限制与选择、构成要素的比例、组合、虚空间与组合、四边联系与轴的联系、三的法则、圆与构成、水平构成这些设计元素规划，来实现比例和谐的平 面设计”。比较深奥，我们在这里就不详细阐述了。

呵呵，说了一堆栅格系统的优点。大家可能会问：难道栅格系统真的是完美的么？答案是否定的：对于内容信息不确定导致高度不确定的页面，在高度层面上就无法做到栅格了。当然，具体的情况还需具体的分析与解决，这就需要设计师们在实际的应用中不断的总结经验，不断实践了。</description><pubDate>Thu, 20 Nov 2008 11:10:30 +0800</pubDate><guid isPermaLink="false">http://ued.taobao.com/blog/2008/09/17/grid_systems/</guid><fs:srclink>http://ued.taobao.com/blog/2008/09/17/grid_systems/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418746/4060402</fs:itemid></item><item><title>The New 2.7 Dashboard</title><link>http://wordpress.org/development/2008/10/the-new-27-dashboard/</link><xg:id>397406843</xg:id><description>&lt;p&gt;First, I’d like to say that I’m glad the majority response to the &lt;a title=&quot;The Visual Design of 2.7&quot; href=&quot;http://wordpress.org/development/2008/10/the-visual-design-of-27/&quot; target=&quot;_blank&quot;&gt;screenshots we posted last week&lt;/a&gt; was so positive. With a community as vocal as this one, it’s always a little nerve-wracking to introduce change, but this time it seems like the change was welcomed, which has been great. I’m hopeful that as we introduce the new features of 2.7 over the coming weeks, the good feelings will continue. As promised, here’s a rundown of what’s going to happen to the Dashboard over the next couple of weeks before launch.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Menus&lt;/strong&gt;&lt;br /&gt;
I described the menu functions last week, but I forgot to mention something. By default, when you arrive at your Dashboard the first time, two sections of the navigation will be expanded: the Dashboard section (because it is active, so it will have the color highlight) and the Posts section (because it has often-accessed screens in it, and will serve as a cue that you can view other section menus without loading new screens). Once you start clicking menus open and closed, your browser will cookie you, and will remember your menu state. So if you open Posts and Comments, when you come back the next time, Posts and Comments will be open. If you click into your Settings, Posts and Comments will still be open. You’ll need to manually close nav sections. We went back and forth on this, and there was community discussion about perhaps only allowing two sections to be open at a time, but ultimately those approaches would have removed control from the user. And since the mantra of 2.7 is to give the user control over his/her admin interface, we chose to keeps things open if the user had opened them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contextual Access Tabs&lt;/strong&gt;&lt;br /&gt;
In the upper right, drop-tabs provide access to contextual features displayed in a layer that appears between the header and the main working area. Screen Options will allow you to choose which modules to display on the current screen. Don’t like seeing the Incoming Links module because no one links to you? A simple checkbox in the Options tab will remove the module from your Dashboard until you decide to reinstate it. Help will highlight some of the changes since the previous version, and provide links to help resources such as FAQ/Forums/Contact Support for .com and Documentation/Support Forums for .org.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Module Layout&lt;/strong&gt;&lt;br /&gt;
In addition to using the Options tab to decide which modules to display on the Dashboard, all the modules on the Dashboard may be moved up or down or between columns using drag and drop. Modules also may be collapsed or expanded by clicking the title bar, allowing another level of screen customization. In 2.8, we also hope to make every single module configurable in terms of what content it displays… we ran out of time for this in 2.7, so for now only the newsfeed modules will be configurable. When you hover over the module, a link will appear in the module header  allowing access to the configuration view.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Right Now&lt;/strong&gt;&lt;br /&gt;
The Right Now module contains the same data as before, but it’s been rearranged to provide a clearer display. This list style, as opposed to the previous sentence style, will also make translation for non-English sites easier. Color cues help to highlight things that are not good (red), things that are pending (yellow/orange), and things that are good to go (green).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stats&lt;/strong&gt;&lt;br /&gt;
I’d like to apologize for having a non-core piece of functionality on the Dashboard comp. It’s my fault… when we were working on the comps, we used my wireframes and my live 2.7 Dashboard to assemble our elements, and I forgot that I had the &lt;a title=&quot;WordPress.com stats plugin&quot; href=&quot;http://wordpress.org/extend/plugins/stats/&quot; target=&quot;_blank&quot;&gt;WordPress.com stats plugin&lt;/a&gt; installed and a module on my Dashboard. So even though it’s not in core and it turns out the WordPress.com stats plugin is undergoing some reworking of its own, we made the Dashboard stats module easier to scan than the one I currently see when I log in. For those of you on .org who got excited when you saw the Dashboard comp with stats, again, I apologize for the oversight on my part. If you want the candy-like stats goodness we comped up you’d need to install the plugin (or another stats plugin with candy-like elements). There should be a fine-looking Dashboard module as part of the update they release. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;QuickPress&lt;/strong&gt;&lt;br /&gt;
QuickPress is a new feature that provides the ability to start (or publish) a simple post from the Dashboard when you don’t need the full feature set of the Add New Post screen. Currently, these posts can contain title, text, media and tags. In 2.8 we hope to make the module configurable, so that each user can decide which few fields make the most sense to display. If you Save as Draft, you will see the new draft appear in the Recent Drafts module right away. Clicking Cancel will clear the form. Publish publishes the post. Posts made using QuickPress are the same as other posts and may be editing by going to Posts &amp;gt; Edit and selecting the post in question. One last thing: both in this module and on the Add New post screen, we’ve put as much space as possible between the Save Draft and Publish buttons, so for all of you who’ve asked at WordCamps or emailed or posted somewhere to request this, ta da! Hopefully this will reduce accidental publications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recent Drafts&lt;/strong&gt;&lt;br /&gt;
During the summer testing, one thing we heard over and over was the desire to access recent drafts more easily, preferably with one click from the Dashboard (as opposed to clicking on Drafts from the Right Now module, waiting for page to load, then clicking on a specific draft title and waiting for a second page load). The Recent Drafts module is meant to address that need, displaying the five most recent drafts with the date they were created. In a future version, this module will be configurable as well. In the meantime, if you’re a crosswords-in-pen kind of person and you don’t write drafts, just use the Options tab at the top to hide the Drafts module, and it won’t take up space on your Dashboard.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Feeds&lt;/strong&gt;&lt;br /&gt;
News feeds of WordPress-related news will function largely the same as they did in 2.6 in terms of configurability, and will simply have a new look. You can still specify the URL of the feed, how many items to display, whether to show headline vs excerpt, author, date, etc.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Incoming Links&lt;/strong&gt;&lt;br /&gt;
Just getting a face lift. Or maybe not a face lift, more like a visit to the Clinique counter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hooks&lt;/strong&gt;&lt;br /&gt;
Plugins can still add modules to the Dashboard. They also still can add top-level menu items if necessary (as opposed to having them in Tools, Plugins, Settings or wherever…like Posts if it’s post-specific). Because we’ll be using iconography in the collapsed menu state, plugins that create top-level menus can create an icon for use in the menu system. When there’s no icon associated with the plugin, a default will be used (kind of the way some blogs show default avatars when no Gravatar is associated with a commenter on your blog). Hopefully, though, most plugins will fit within existing section headers, since our “top level” is not actually made up of menu items, but section headers that open to reveal the real menu items that have screens associated with them. Plugins can also put themselves into the Shortcuts/Favorites menu in the header. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recent Comments&lt;/strong&gt;&lt;br /&gt;
This module, as in 2.6, displays the most recent comments. However, you now can moderate comments directly from this Dashboard module, including the new Comment Reply feature. For now it will show only the last x number of comments, as it does currently, though in 2.8 we hope to add more configurability to this, or roll it into the Inbox concept.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bye-Bye Inbox&lt;/strong&gt;&lt;br /&gt;
For those who were at WordCamp SF or who were using the nightly builds while there was still an Inbox placeholder, sorry, no Inbox in 2.7. It turned out to be far more complex than anticipated, and rather than including something rushed and clunky, we’re holding off until a later version. We added the comment moderation to the Comments module to make up for it, so you don’t have to wait for that, at least.&lt;/p&gt;
&lt;p&gt;So that’s the new Dashboard. A little more usable, a little prettier, a little more you, a little cooler. Or maybe a lot of all those things. We’ll let you be the judge.&lt;/p&gt;</description><pubDate>Tue, 21 Oct 2008 02:09:35 +0800</pubDate><author>Jane Wells</author><guid isPermaLink="false">http://wordpress.org/development/?p=349</guid><dc:creator>Jane Wells</dc:creator><fs:srclink>http://wordpress.org/development/2008/10/the-new-27-dashboard/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418740/4060402</fs:itemid></item><item><title>视觉对交互的帮助——提升可用性</title><link>http://ued.taobao.com/blog/2008/10/15/visual-can-be-useful-in-helping-interaction/</link><xg:id>391029145</xg:id><description>&lt;p&gt;在整个产品设计的过程中，视觉设计与交互设计的“工序”非常紧密，两者关系也是相辅相成，互相影响。而视觉界面作为最直接与用户交流的层面，如何把交互设计以良好表现形态展现给用户，这里主要集中探讨视觉在提升交互的可用性方面的作用：&lt;br /&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;strong&gt;&lt;br /&gt;
1.提升可浏览性&lt;br /&gt;
2.精确与高效地传递信息与任务&lt;br /&gt;
3.贴合用户的心智模型&lt;br /&gt;
4.让交互富有情感&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;strong&gt;1.提升可浏览性：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;1）信息结构的良好表现&lt;br /&gt;
视觉设计在对交互的帮助中，首要满足对产品与交互信息结构的展现，展现信息的清晰可读性，然后才是品牌，情感的传达。视觉语言可以通过分层，分类，对比等语言手段对产品概念及信息进行处理。&lt;br /&gt;
例：&lt;br /&gt;
pic.01&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081015_03.jpg&quot; alt=&quot;081015_03&quot; /&gt;&lt;/p&gt;
&lt;p&gt;pic.02&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081015_04.jpg&quot; alt=&quot;081015_04&quot; /&gt;&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; title=&quot;11111111&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081013_01.jpg&quot; alt=&quot;&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; title=&quot;081013_01&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081013_01.jpg&quot; alt=&quot;&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; title=&quot;081013_01&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081013_01.jpg&quot; alt=&quot;&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; title=&quot;01&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081013_01.jpg&quot; alt=&quot;&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;&lt;br /&gt;
对上面两图进行对比，同样都是文章详情页面，相信没有多少用户在浏览pic01时能快速准确地知道网站想给他什么信息，或者让用户做什么。信息主次的分布，层级，色彩，均无做好有效分布，用户一边迷惑，一边迷路。而pic02对内容按主次程度来划分，最重要的文章详情信息一目了然，结构有序，条理清晰。&lt;br /&gt;
我们能感受到视觉语言的有效干预，能对信息结构的展现起到很大的帮助作用。&lt;span id=&quot;more-250&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;2）增强信噪比&lt;br /&gt;
信噪比（Signal to Noise Ratio）又称为讯噪比，原义是电声学里输出信号的电压与同时输出的噪声电压的比。&lt;br /&gt;
一般来说，信噪比越大，说明混在信号里的噪声越小，否则相反。类比到界面设计中，有效的视觉元素就是信号，而其他干扰元素，就是噪音。&lt;br /&gt;
界面的噪音是由多余的干扰信息造成的，会分散用户注意力，使用户不能把注意力集中到直接表达产品功能和行为的元素上，导致给用户带来认知压力和妨碍导航的速度和精确度。不合适的字体，表义不明确的ICON，不必要的装饰等等，都是界面噪音。在视觉设计中如果保持最高的信噪比来展现信息，能增强界面的可浏览性。换句话说，如果去掉这些次要的或者干扰的设计元素，并没有使功能有所影响，那强烈建议缩小这些元素的应用比例，或者直接去掉！&lt;br /&gt;
例：&lt;br /&gt;
pic.03&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; title=&quot;07&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pic.yupoo.com/cauliflower/8207864e9a96/medium.jpg&quot; alt=&quot;&quot; width=&quot;267&quot; height=&quot;200&quot; /&gt;&lt;br /&gt;
图pic.03中原本需要表述的几个柱状数据信息，结果被埋藏在一堆花哨，文字信息堆杂的背景中，典型的信噪比过低。&lt;/p&gt;
&lt;div&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;strong&gt;2.精确与高效地传递信息与任务&lt;/strong&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;良好的视觉设计，能增强信息条理的清晰度。这里的清晰度有两方面的含义：清晰的视觉引导，和视觉引导元素本身的精确性。&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;1）信息引导&lt;br /&gt;
良好的视觉设计能用色彩和层次等语言，自然而又清晰的罗列出一条视觉的“路线”，引导用户流畅的阅读，而不用自己费力的去疏通条理，或者在密密麻麻信息的忙海中寻找未知的方向。这条指引的路线，我们称他为“视觉流”。&lt;br /&gt;
例：表单中视觉流的形成&lt;br /&gt;
pic.04&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; title=&quot;081014_01&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081014_01.jpg&quot; alt=&quot;&quot; width=&quot;292&quot; height=&quot;484&quot; /&gt;&lt;br /&gt;
表单是个关键有效信息集中，需要让用户集中注意力完成操作以提交数据的地方。各种类型的数据，控件，信息的展现方式都会堆积一起，常给浏览和填写带来干扰和不顺畅感。&lt;br /&gt;
通过让多种信息分类，统一规范处理后的效果有没有好一点呢？（pic.04）&lt;br /&gt;
所有的lab标签与input输入框居中轴线对齐，一个表单中，有且只有一条中轴线——这是视觉引导的关键。让用户需要查看的信息与填写的内容整齐划一地罗列下来。视觉引导的形成很好的帮助了用户在填写过程中的顺畅感。&lt;/p&gt;
&lt;p&gt;2）准确直观的信息符号&lt;br /&gt;
有了清晰的视觉引导还不够，这些视觉引导元素本身需要遵循一定规范，和富有准确的语义，才能起到有效引导的作用。&lt;br /&gt;
例：&lt;br /&gt;
pic.05&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081015_05.jpg&quot; alt=&quot;081015_05&quot; /&gt;&lt;br /&gt;
pic.06&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081015_06.jpg&quot; alt=&quot;081015_06&quot; /&gt;&lt;/p&gt;
&lt;p&gt;精确规范的视觉元素的运用，使得pic.05的阅读浏览清晰，流畅，加强了网页的可扫描性。绿色的标题设计使用户很轻易得在板块间快速跳转，并且结合使用了文案，以问题标题的形式，让用户迅速的知晓板块的内容和有无必要再进行下去。&lt;br /&gt;
而Bar没有语义定义及运用规则的pic.06，则在浏览阅读中给用户造成了不必要的干扰和混乱感。并没有起到引导的作用。&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;strong&gt;&lt;br /&gt;
3.贴合用户的心智模型：&lt;br /&gt;
&lt;/strong&gt;将现实生活中的影子，借鉴模拟到产品设计中来，是交互设计中常用的方法，而视觉设计，也能在这方面更好的起到贴近用户感受的作用。增强用户的认知熟悉度，和适应性，能让用户感受到无缝而舒服的用户体验。&lt;br /&gt;
&lt;/span&gt;1）尊重用户体验&lt;br /&gt;
例:&lt;br /&gt;
pic.07&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pics.taobaocdn.com/bao/album/chl/mall/081015_07.jpg&quot; alt=&quot;081015_07&quot; /&gt;&lt;br /&gt;
上图的窗口关闭、放大、缩小按钮，是常被拿来当典型的一个例子。明显的，是将现实生活中的红绿信号灯演的，延续到了这里。由于在现实生活中，红色被用来代表警示，警告，危险等语义，用户已经潜移默化的被影响。当看到红色按钮时，不需仔细思考，潜意识会小心谨慎点击该按钮，以免带来不好的结果。&lt;/p&gt;
&lt;p&gt;1）体现交互的统一性&lt;br /&gt;
苹果公司在PC,MP3,TOUCH,IPHONE等平台界面上，都沿用了相同的视觉风格设计，并且每个不同产品本身的工业设计，也近乎一致，让用户在“切换”每个不同产品时，又能找到产品身上相当多的共同语言。&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;strong&gt;&lt;br /&gt;
4.让交互富有情感：&lt;br /&gt;
&lt;/strong&gt;如果说交互是产品的骨骼，视觉就是他美丽的外衣，让产品看起来有血有肉有性格。也使得产品能和 用户产生情感上的交流互动。而抓住目标用户的情感场景而做出的视觉表现，能有效触动和推进产品和用户间的交流更顺畅。熟悉，亲切，喜爱甚至贴心的情感，都由此而建立起来了。&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; color: #000000; font-family: 宋体;&quot;&gt;&lt;br /&gt;
1）符合目标用户的场景&lt;br /&gt;
例：&lt;br /&gt;
pic.08&lt;br /&gt;
&lt;/span&gt;&lt;img class=&quot;alignnone&quot; title=&quot;09&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pic.yupoo.com/cauliflower/5838364e9ec6/medium.jpg&quot; alt=&quot;&quot; width=&quot;267&quot; height=&quot;200&quot; /&gt;&lt;br /&gt;
淘宝网搜索页面无结果时，改良后代设计，用很配合用户心情，甚至更夸张、可爱的旺旺可怜鬼图案来表达。让产品主动站到了用户这一边，使用户觉得，你是理解我，体谅我的，而不是冷冰冰很官方的，化解了用户本来会产生的不爽情绪。&lt;/p&gt;
&lt;p&gt;我们由以上，大体看到了视觉会从哪几个方面对交互和产品产生积极的影响。那么，是不是说只要交互无法完成的使命，需要填补的空缺，有视觉来完善，最后都会OK呢？视觉是不是万能的包装杀手呢？&lt;br /&gt;
答案使否定的！视觉设计不是神话。&lt;br /&gt;
我们要知道，一个产品的完成是由“创意＋行为＋外观”这几个主要的关键步骤来完成的，反映到产品设计里面，就是产品的创意概念，交互设计，和视觉设计。&lt;br /&gt;
&lt;img class=&quot;alignnone&quot; title=&quot;08&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://pic.yupoo.com/cauliflower/4461464e9dce/medium.jpg&quot; alt=&quot;&quot; width=&quot;267&quot; height=&quot;200&quot; /&gt;&lt;/p&gt;
&lt;p&gt;每个步骤都是至关重要，并且有着先后顺序的。就像一个流水线作业，前一道工序完成与否与质量好坏，影响着后续工序的进行。也就是说，在产品设计里面，如果遇到失败的产品创意，或者糟糕的交互设计，即使赋予再优秀的视觉设计，最终也是个失败的产品，视觉设计不能改变产品的命运。而在失败的产品创意与糟糕的交互设计之上进行的视觉设计，被称为“尸体彩绘”。&lt;br /&gt;
我们要努力让视觉设计最大程度的发挥能动作用，并且我们也要努力不能让一个产品中，只有视觉设计。&lt;/p&gt;</description><pubDate>Wed, 15 Oct 2008 18:16:48 +0800</pubDate><author>飞飞</author><guid isPermaLink="false">http://ued.taobao.com/blog/?p=250</guid><dc:creator>飞飞</dc:creator><fs:srclink>http://ued.taobao.com/blog/2008/10/15/visual-can-be-useful-in-helping-interaction/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418741/4060402</fs:itemid></item><item><title>毕业生该怎么找互联网行业的工作?</title><link>http://www.dbanotes.net/jobs/how_to_find_a_good_jobs.html</link><xg:id>385674333</xg:id><description>&lt;p&gt;作者：&lt;a href=&quot;http://www.dbanotes.net/&quot; target=&quot;_blank&quot;&gt;Fenng&lt;/a&gt; 发布在 &lt;a href=&quot;http://www.dbanotes.net/&quot; target=&quot;_blank&quot;&gt;dbanotes.net&lt;/a&gt;. &lt;a href=&quot;http://www.dbanotes.net/index.xml&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://www.dbanotes.net/feedsky.gif&quot; style=&quot;border: 0pt none ;&quot; alt=&quot;BLOG 订阅数量,点击则可进行订阅&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&quot;小样，才参加几场招聘会就想给同学们指路啊? &quot; 尽管有的人或这样质疑，但还是在这里唠叨几句。&lt;strong&gt;IT 相关毕业生应该怎么找工作?&lt;/strong&gt;其实这个话题我真的考虑了一段时间了。 &lt;/p&gt;

&lt;h4&gt;基础课程不能丢掉&lt;/h4&gt;
&lt;p&gt;操作系统、数据结构、数据库理论这些基础课程不能学过之后就丢掉，温故而知新，这些是将来找工作面试时候的基础，而不靠什么《面试宝典》打通关。&lt;/p&gt;

&lt;p&gt;学校里会学到很多有用的理论，但是学到一个理论一定要尽量尝试实践一下。我曾经问一个信息安全方面的同学公钥私钥是怎么回事，然后再问自称熟悉 Linux 的他是否尝试配置过 OpenSSH ，公钥私钥对应里面的哪些东西...结果还是让我挺失望的。&lt;/p&gt;

&lt;h4&gt;业余时间投入小创业团队&lt;/h4&gt;
&lt;p&gt;任何一个城市都有很多起步中的互联网公司，尽可能的加入到他们的团队中锻炼一下自己，毛遂自荐，做了就比不做要好，跑去和他们聊一下也比你窝在宿舍玩一天游戏要好得多。&lt;/p&gt;

&lt;p&gt;一旦能够加入这样的团队，哪怕干活不要钱也值得，何况从中能接触到整个网站各个环节的东西，能够很好的开拓技术视野，这些将来都是你的财富。&lt;/p&gt;

&lt;p&gt;Tips: 比如南京地区就有&lt;a href=&quot;http://www.junchenwu.com/2008/10/tuniu_2008_zhaopin_2.html&quot; target=&quot;_blank&quot;&gt;途牛&lt;/a&gt; ... &lt;/p&gt;

&lt;h4&gt;积极投入一些开源软件的开发、实践中去&lt;/h4&gt;
&lt;p&gt;Sourceforge.net 上的项目一抓一大把，优秀的项目更是比比皆是。加入其中，熟悉一下版本控制、文档书写、多人协作，看看分布在全世界的牛人、准牛人的代码是怎么写的，远比给导师做的那些小作坊项目更有价值(当然，你最好不要读研究生了)。&lt;/p&gt;

&lt;h4&gt;多留心企业招聘的职位描述&lt;/h4&gt;

&lt;p&gt;恐怕很少学校会专门设置有&quot;配置管理&quot;、&quot;软件测试&quot;之类的课程，但是企业需要这样的人。那些招聘需求上怎么写的? 那就可以是你的学习目标啊！现在网络这么发达，什么学习资料找不到?&lt;/p&gt;

&lt;h4&gt;形成差异化竞争&lt;/h4&gt;

&lt;p&gt;一个年级假定有 100 人，所有人的课程都是一样的。那么你认为和 99 人竞争 5 个岗位容易，还是 5 个人竞争一个岗位容易? &lt;/p&gt;

&lt;p&gt;如果做不到 100 人中的 Top 5，那或许可以尝试做一下100人之外的 Top5。一些看似偏门的东西其实挺管用的，学校的课程其实只是基础，现实却是复杂的。毕竟互联网行业不只是需要写代码的人。&lt;/p&gt;

&lt;h4&gt;建立一个个人站点&lt;/h4&gt;

&lt;p&gt;尝试记录一些学习心得，分享更多才能发现更多，才能得到更多，也锻炼一下自己的文档写作能力。&lt;/p&gt;

&lt;p&gt;学习一下如何写 HTML、CSS 这些看似很土的东西，实践一下 TCP/IP 相关的东西。&lt;/p&gt;

&lt;p&gt;再写下去就老生常谈了，或许以上这几个建议对要进入 IT 行业的同学有点帮助。&lt;/p&gt;

&lt;p&gt;这篇文章不适用于如下几类同学：&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;天才 (没毕业就一堆公司排队请的同学)&lt;/li&gt;
&lt;li&gt;立志做研究的人(一心想设计出中国自己的操作系统，自认为有能力自己从头打造一个 Linux 的)&lt;/li&gt;
&lt;li&gt;家里足够有银子，毕业后自己做老板去招聘别人的&lt;/li&gt;
&lt;li&gt;看了以上的建议觉得完全是胡说八道的同学&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;--EOF--&lt;/p&gt;

&lt;p&gt;补充一下，关于&quot;差异化&quot;的观点，&lt;strong&gt;我不是说要所有人都这样做&lt;/strong&gt;。更多是对非科班的同学一个提醒。同时，以上所有的建议并不是即时收效的，需要提前做一点准备。&lt;/p&gt;

&lt;p&gt;延伸阅读：&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.yeeyan.com/articles/view/34817/16365&quot; target=&quot;_blank&quot;&gt;计算机科学系该教些什么?&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;hr&gt;&lt;/hr&gt;
&lt;p&gt;&lt;strong&gt;相关文章|Related Articles&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;


&lt;li class=&quot;module-list-item&quot;&gt;&lt;a href=&quot;http://www.dbanotes.net/review/headhunter_jobs_and_others.html&quot; target=&quot;_blank&quot;&gt;招聘信息及求职建议&lt;/a&gt; - Feb 23, 2006&lt;/li&gt;

&lt;li class=&quot;module-list-item&quot;&gt;&lt;a href=&quot;http://www.dbanotes.net/mylife/alibaba_look_for_dba.html&quot; target=&quot;_blank&quot;&gt;本周浙大阿里巴巴招聘会. 面向应届生招聘 DBA&lt;/a&gt; - Oct 18, 2006&lt;/li&gt;

&lt;li class=&quot;module-list-item&quot;&gt;&lt;a href=&quot;http://www.dbanotes.net/review/fresh_graduates_impression.html&quot; target=&quot;_blank&quot;&gt;招聘会见闻&lt;/a&gt; - Oct 20, 2006&lt;/li&gt;

&lt;li class=&quot;module-list-item&quot;&gt;&lt;a href=&quot;http://www.dbanotes.net/jobs/yahoo_look_for_a_fuermosi.html&quot; target=&quot;_blank&quot;&gt;雅虎寻找搜索竞价的福尔摩斯--竞价防作弊分析工程师&lt;/a&gt; - Nov 10, 2006&lt;/li&gt;

&lt;/ul&gt;


&lt;p&gt;&lt;strong&gt;评论数(35)|&lt;a href=&quot;http://www.dbanotes.net/jobs/how_to_find_a_good_jobs.html#comments&quot; title=&quot;Comment on: 毕业生该怎么找互联网行业的工作?&quot; target=&quot;_blank&quot;&gt;添加评论&lt;/a&gt;&lt;/strong&gt; | 最近作者还说了什么? Follow &lt;a href=&quot;http://www.twitter.com/fenng&quot; target=&quot;_blank&quot;&gt;Fenng@Twitter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;本文网址：&lt;a class=&quot;permalink&quot; href=&quot;http://www.dbanotes.net/jobs/how_to_find_a_good_jobs.html&quot; target=&quot;_blank&quot;&gt;http://www.dbanotes.net/jobs/how_to_find_a_good_jobs.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;DBA Notes 理念: 用最简约的技术取得最大的收益...&lt;/p&gt;
&lt;div name=&quot;ClickComments&quot;&gt;&lt;/div&gt;</description><pubDate>Fri, 10 Oct 2008 18:57:50 +0800</pubDate><author>dbanotes@gmail.com(Fenng)</author><guid isPermaLink="false">http://www.dbanotes.net/jobs/how_to_find_a_good_jobs.html</guid><dc:creator>dbanotes@gmail.com(Fenng)</dc:creator><fs:srclink>http://www.dbanotes.net/jobs/how_to_find_a_good_jobs.html</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418742/4060402</fs:itemid></item><item><title>译文：50个有助于Blogging的在线工具 (via Blog)</title><link>http://riku.me/2008/10/09/50_blogging_tools.html</link><xg:id>383651379</xg:id><description>&lt;div style=&quot;font-size:10pt;font-family:Arial,sans-serif;color:#222222&quot;&gt;&lt;a href=&quot;http://friendfeed.com/riku?service=blog&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://friendfeed.com/static/images/icons/blog.png?v=d3fe9e9d1dd09839623e597a92ecbb00&quot; alt=&quot;Blog&quot; class=&quot;icon&quot; /&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://friendfeed.com/static/images/icons/blog.png?v=d3fe9e9d1dd09839623e597a92ecbb00&quot; alt=&quot;Blog&quot; class=&quot;icon&quot; /&gt;&lt;/a&gt;
posted an entry on &lt;a rel=&quot;nofollow&quot; href=&quot;http://riku.me/&quot; target=&quot;_blank&quot;&gt;Riku&lt;/a&gt;&lt;div style=&quot;margin-bottom:0.6em&quot;&gt;&lt;div&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://riku.me/2008/10/09/50_blogging_tools.html&quot; class=&quot;main&quot; target=&quot;_blank&quot;&gt;译文：50个有助于Blogging的在线工具&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-top:1px;color:gray&quot;&gt;&lt;a href=&quot;http://friendfeed.com/e/0dca28c2-ed35-279d-6eb0-12ec5583bbf2/50-Blogging/&quot; style=&quot;color:#7777cc&quot; target=&quot;_blank&quot;&gt;October 8 at 5:00 pm&lt;/a&gt; - &amp;amp;Comment&lt;/div&gt;&lt;div style=&quot;margin-left:12px;color:gray&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><pubDate>Thu, 09 Oct 2008 08:00:00 +0800</pubDate><guid isPermaLink="false">tag:friendfeed.com,2007:0dca28c2-ed35-279d-6eb0-12ec5583bbf2</guid><fs:srclink>http://riku.me/2008/10/09/50_blogging_tools.html</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418744/4060402</fs:itemid></item><item><title>心流与情感设计(上)</title><link>http://ued.taobao.com/blog/2008/09/24/flow-and-emotion-design/</link><xg:id>366409449</xg:id><description>&lt;div&gt;
&lt;p&gt;我们使用软件，我们使用网站，这一切的活动事实上都是在围绕着一个东西：信息。扩展开来，我们的一切活动都是在围绕着信息做交互。所有的这些信息都能产生 一些影响，但同时也带来的挑战。Simon如是说：“信息消耗是显而易见的；它消耗了受众的注意力……富载的信息导致了注意力的贫乏。” 我们为了处理信息，其实一直在消耗我们的注意力。当注意力成为了一种稀缺资源后，我们也该认真地对待它，善用它。这也是我们信息架构师和交互设计师的责任。&lt;/p&gt;
&lt;p&gt;心理学家齐客森米哈里(Mihaly Csikszentmihalyi)将这种关注的注意力称为“精神能量 psychic energy”。就像我们日常生活中的能量一样，没有能量就没法工作，每次工作就会消耗能量。我们都应该有过这样的体验：有段时间，我们会全身心地投入到 某种事情中，将我们的集中注意力完全集中在这件事情上，所谓的废寝忘食。齐客森米哈里把这个状态称为“心流 flow”。心流是：忘我、忘记时间、忘记其他所有不相关的东西，完全沉静在某项事物或情境中。就像是自己极端的专注于做某件喜欢做的事，完全没有因为迷 惑、重复、繁杂的任务而引起的烦躁或无聊。关于心流的更多内容，例如心流的状态，心流的产生条件等在&lt;a id=&quot;nloc&quot; title=&quot;Jim Ramsey的Design for Flow&quot; href=&quot;http://alistapart.com/articles/designingforflow&quot; target=&quot;_blank&quot;&gt;Jim Ramsey的Design for Flow&lt;/a&gt; 、&lt;a id=&quot;dddf&quot; title=&quot;JunChen的心流理论和设计&quot; href=&quot;http://www.junchenwu.com/2007/12/flow_phycology_design.html&quot; target=&quot;_blank&quot;&gt;JunChen的心流理论和设计&lt;/a&gt; 和&lt;a id=&quot;i69j&quot; title=&quot;Wikipedia&quot; href=&quot;http://zh.wikipedia.org/wiki/%E5%BF%83%E6%B5%81%E7%90%86%E8%AB%96&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt; 上都有详细的说明。我这里就不多转载了，不过建议大家可以先阅读JunChen的心流理论和设计。&lt;/p&gt;
&lt;h3&gt;为心流而设计&lt;/h3&gt;
&lt;p&gt;我们并不需要去学习专门的课程或者使用新的软件来为心流而设计。事实上你也许已经踏上了为心流而设计的道路。开始心流设计之路，就是去考虑每一步交互之后应该出现的结果，然后，去掉那些影响用户达到这个预期结果的所有阻碍。亦，去除噪声，去除无用的东西，提高信噪比。&lt;/p&gt;
&lt;p&gt;我们就从剔除分散注意力和阻碍交互的元素开始。无论是现实的产品还是互动产品，这都需要我们减少或者消灭掉那些造成类似心理沮丧的反应或者是生理不适的反应的元素。这些该消灭的元素分为：外在的，如环境因素等；内在的，如痛苦、不适、焦虑等等两方面。情感是需要用户集中他们的注意力才能加深体会的。为所有用户行为提供即时反馈能够减少用户的焦虑感。有效地使用布局、信息设计、排版、交互设计和信息架构可以平衡挑战感和用户的技能等级。&lt;/p&gt;
&lt;p&gt;这里我们需要介绍“挑战感”和“技能等级”两个要点。挑战感指的是某个交互行为中，用户的目标对用户产生的挑战难易度的感知。例如我们所说的某事情很有挑战，就是指这件事对我们来说感觉到了高的挑战感。技能等级描述的是用户在进行交互过程中的用户的技能水平。也就是我们完成某事的能力。我们来看下面这张关于心流的图:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://docs.google.com/File?id=dhn8gfnw_454dngz6hcq_b&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;上图是齐客森米哈里根据他的研究经验构筑的一张图。图上根据了各种不同的挑战感和技能水平高低分出了八个区，分别是：心流、控制、放松、无聊、冷漠、忧虑、焦虑和激励。这张图的&lt;a id=&quot;v4xj&quot; title=&quot;简化版&quot; href=&quot;http://www.uespace.com/upload/2007-12-10_02.gif&quot; target=&quot;_blank&quot;&gt;简化版&lt;/a&gt;在&lt;a id=&quot;nl62&quot; title=&quot;兔�的心流理论和用户体验&quot; href=&quot;http://www.uespace.com/post/113.html&quot; target=&quot;_blank&quot;&gt;兔子的心流理论和用户体验&lt;/a&gt;这篇文章可以看到。&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;心流&lt;/strong&gt;：当用户在完成交互行为时需要高技能水平，并且通知感知到高挑战，且两者达到某种平衡时就会有心流的体验产生。最生动的例子莫过于玩游戏。任何游戏一定会提供一定的难度给玩家，并常常伴有过关打boss等设计来让玩家感知挑战。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;控制：&lt;/strong&gt;在驾车的时候，是需要高的技能——驾驶的，但是挑战感并不强，这时，能够感觉的就是控制感。当然，提高挑战感，例如赛车，能让某些人着迷，从图上可以看出原因，因为他们进入了心流状态。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;放松：&lt;/strong&gt;放松性的阅读和品美食就属于高技能和低挑战。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;无聊：&lt;/strong&gt;做家务，需要有一定的技能水平，但是却不能让人感觉到挑战，所以做家务事一件很无聊的事情。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;冷漠：&lt;/strong&gt;当交互行为的技巧低而面对的挑战也低的时候，但是这样就无法产生持续上升的心流，也会出现心流体验。这种情况下是一种冷漠。例如看电视，我们沉浸于其中，但事实上整个身体、心理并没有很激动地参与，而表现出了冷漠、无感情。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;忧虑：&lt;/strong&gt;在不参加太多逻辑的争论的过程中(当然不是参加辩论赛)，有一定的挑战却没有要求很高的技能。表现出的就是忧虑的情感。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;焦虑：&lt;/strong&gt;在做一些例如重复性的工作，死记硬背文章的时候，由于技能水平低却完成高挑战的任务，就会出现焦虑。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;激励：&lt;/strong&gt;当工作技能提升或者学习水平提高等，有一定的驾轻就熟之感，这时，工作和学习就有一种激励的感觉。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;下面这张图是描述了心流通道的概念。&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://docs.google.com/File?id=dhn8gfnw_455d4btp4fs_b&quot; alt=&quot;&quot; width=&quot;500&quot; height=&quot;459&quot; /&gt;&lt;/p&gt;
&lt;p&gt;这张图相对于上图来说是个理想化的图示。左上角区域高挑战感低技能水平的是&lt;strong&gt;焦虑&lt;/strong&gt;，右下角区域低挑战感高技能水平的是&lt;strong&gt;无聊&lt;/strong&gt;。我们在图中可以看出随着我们面对的挑战越来越难，我们会越来越感觉到焦虑并且失去心流(到达红色点)。这时，如果我们增加我们自身的合适于挑战感的技能水平，我们就会重新进入心流状态。同样的，我们如果增加我们的技能水平却获得不了更高的挑战感，那么我们就会感到无聊(到达紫色点)。&lt;/p&gt;
&lt;p&gt;为了更好地将心流理论应用到我们的实践中去，我在这里根据心流产生的原因来一一阐述。&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;清晰的目标&lt;/strong&gt;&lt;br /&gt;
首先，我们要理清我们设计的流程，将我们的逻辑信息构架、导航、搜索路径尽可能清晰地展示给用户。尽量的让每一个页面只完成一个目标，且清晰。减少选择，让用户能够很快地做决策。强大的网站应该是像在一个高档的餐厅，客户用餐，除了体验到美食，也同时体验到了优质的服务。可惜，现在的大多数网站都像是在做自助餐，在你面前摆上无数种选择，认为这是在尊重用户意愿。就像自助餐一年难得吃几次一样(大部分人认为自助餐是性价比高，在利益的驱动下去吃。)，这样的自助餐模式网站开始看起来不错，但他们忽略了用户总是懒惰的这个事实，用户总是期望有人一步步告诉他该做些什么，于是慢慢地用户就会失去兴趣——因为他们总是不知道该干些什么。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;提供及时的反馈&lt;/strong&gt;&lt;br /&gt;
Donald博士在&lt;a id=&quot;d3g2&quot; title=&quot;《设计心理�》&quot; href=&quot;http://www.douban.com/subject/1288844/&quot; target=&quot;_blank&quot;&gt;《设计心理学》&lt;/a&gt;这本书中 在说明执行/评估周期(Excution/Evaluation Action Cycle)时，有对反馈做比较深入的阐述。在这个周期的评估阶段，用户会去比较现实发生的和他们预期发生的事件之间的差别。及时的反馈有助于用户评估之 前所作的操作是否有助于更进一步地接近目标，以便用户重新调整操作或者进入下一个操作步骤。所以在页面上我们会关注页面加载速度，加快反馈时间。另外，我们应当尽量及时且清晰地让用户了解计算当前在做些什么，用户刚才的操作有哪些影响。例如在进行某些操作的时候，用户总能获得刚才的操作成功与否的反馈。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;尽量设计相应的挑战以迎合用户的操作技能&lt;/strong&gt;&lt;br /&gt;
在上述关于心流通道的概念中，我们已经解释了在一定的挑战感结合一定的用户的操作技能下，用户才能进入“心流”状态。在&lt;a id=&quot;xnvi&quot; title=&quot;《软件观念革命》&quot; href=&quot;http://www.douban.com/subject/1392475/&quot; target=&quot;_blank&quot;&gt;《软件观念革命》&lt;/a&gt;中 所述的针对新手、中间用户和专家用户设计的观点与这点其实是类似的。这就要求我们在每个流程、每个页面设计之初要理解该页面为谁设计，以便来制定界面的复 杂程度。对新手访问的页面，设计简单、清晰的结构，以便他们迅速学会界面。对于专家用户，除了增加页面的复杂度，同时可以加入页面定制的功能。在白鸦的&lt;a id=&quot;x2ys&quot; title=&quot;只把20%拿出来&quot; href=&quot;http://uicom.net/blog/?p=662&quot; target=&quot;_blank&quot;&gt;只把20%拿出来&lt;/a&gt;中，白鸦说：“不要试图一下子把什么都抛给用户，他们根本接受不了。需要用你20%的对用户最有吸引力的东西在0.3秒内搞定她的神经，然后勾引她自己去发现另外的80%”。这也是在平衡挑战感和用户操作技能。广泛地，&lt;a id=&quot;rs1h&quot; title=&quot;《和谐界面》&quot; href=&quot;http://www.douban.com/subject/2306849/&quot; target=&quot;_blank&quot;&gt;《和谐界面》&lt;/a&gt;提出的“5W+H启发式(5W+H heuristic)”中的“谁/为什么(Who/Why)”也如出一辙。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;下一篇，我们将继续顺着“心流”理论，探讨关于心流与情感设计的问题。欢迎各位踊跃留言批判。&lt;/p&gt;
&lt;/div&gt;</description><pubDate>Wed, 24 Sep 2008 17:55:07 +0800</pubDate><author>宗羲</author><guid isPermaLink="false">http://ued.taobao.com/blog/?p=247</guid><dc:creator>宗羲</dc:creator><fs:srclink>http://ued.taobao.com/blog/2008/09/24/flow-and-emotion-design/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418745/4060402</fs:itemid></item><item><title>国外的个人支票托收的方法</title><link>http://www.williamlong.info/archives/1500.html</link><xg:id>356391024</xg:id><description>&lt;p&gt;&lt;a href=&quot;http://feedads.googleadservices.com/%7Ea/gFWof7tPCf4yrL1M7AqL8IwlMN4/a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://feedads.googleadservices.com/%7Ea/gFWof7tPCf4yrL1M7AqL8IwlMN4/i&quot; border=&quot;0&quot; ismap=&quot;true&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;　　经常有人发邮件问我一些关于&lt;a target=&quot;_blank&quot; href=&quot;http://www.williamlong.info/archives/1492.html&quot;&gt;网络在线支付&lt;/a&gt;的简单问题，今天就开一个普及话题，讲一下个人用户如何托收国外的个人支票。&lt;/p&gt;&lt;p&gt;　　通常Google AdSense的主要收款方法就是支票托收，当用户收入超过100美元，Google会将一张支票邮寄给用户，支票是出票人签发的委托办理支票存款业务的银行或者其他金融机构在见票时无条件支付确定的金额给收款人或持票人的票据。月光博客的AdSense就是使用支票进行托收的。&lt;/p&gt;&lt;p&gt;　　&lt;strong&gt;托收银行的选择&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;　　支票的托收可以选择任何有国际托收业务的银行完成，我个人推荐中国银行和工商银行，这两家银行在国外的网点较多，因此托收速度较快，费用也较低（一般只需要20-30元人民币的手续费）。其他的银行我也曾经尝试过，有的银行如果国外网点少，可能银行会通过中转行来完成交易，托收就会出现中间行扣费问题，产生一些额外的费用，比如有次我在农业银行托收，结果就被香港的中转行扣掉10美元额外费用。&lt;/p&gt;&lt;p&gt;　　&lt;strong&gt;支票背书&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;　　托收支票钱，需要在支票背面写上个人姓名（支票上的名字）和个人身份证号码，就是支票背书，用于做原始凭证。字迹要工整，不要写的潦草。写完后，沿虚线撕下的支票。&lt;/p&gt;&lt;p&gt;　　&lt;strong&gt;银行办理托收&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;　　选择工作日的上班时间去银行办理托收的手续，需要带上支票、身份证、银行卡或存折，直接到对公柜台办理，普通的柜台不会办理外汇业务的。办理前需要填写表格，将个人姓名、支票号码、银行帐号写入，然后将全部东西交予银行。每笔托收需要手续费，2000美元以下为20元人民币手续费（以工商银行为例）。&lt;/p&gt;&lt;p&gt;　　&lt;strong&gt;相关注意事项&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;　　对于有些外汇管理比较严格的银行来说，如果第一次托收的话，有的银行人员会问，开发票的是公司还是个人，最好回避，因为目前制度上似乎有限制国外公司向个人发送支票，有的银行甚至会要求用户提供对方开具的劳务证明，如果碰到这种情况，最好换一个银行再试试。&lt;/p&gt;&lt;p&gt;　　一年托收美元总额为5万美元，一年超过5万最好换用其他人名字托收，或者等到下一年托收。&lt;/p&gt;&lt;p&gt;　　一次托收的金额最好不要超过2000美元，超过后会被银行要求额外填写一张收入申报表格，告知你的收入来源是什么。如果银行问，就说是“其他”。不过即使你说这是“劳动收入”，目前银行也不会额外扣税。&lt;/p&gt;&lt;p&gt;　　一切办理好了之后，托收手续就算完成了。&lt;/p&gt;&lt;p&gt;　　&lt;strong&gt;托收速度&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;　　托收的时间长短和发票行地址有关，例如AdSense通过香港汇丰银行出票，在深圳托收的话，一个星期内款项就能到帐。欧美地区的支票托收速度就很慢，通常要一个月左右的时间，有一次我托收一张欧洲的支票，竟然花了两个月的时间才到帐。&lt;/p&gt;&lt;p&gt;　　总的来说，托收支票是一种费用比较低廉的海外支付收款方式，大公司开的支票通常比较安全，不会出现退票的情况，如果对方开具空头支票，银行拒付，则会发生退票，退票后相关的费用通常由个人来承担。&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1500.html&quot; target=&quot;_blank&quot;&gt;继续阅读《国外的个人支票托收的方法》的全文内容...&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;相关文章:&lt;/h3&gt;&lt;ul&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1335.html&quot; target=&quot;_blank&quot;&gt;国际信用卡使用的安全技巧和经验&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1254.html&quot; target=&quot;_blank&quot;&gt;招商证券推出手机证券&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1223.html&quot; target=&quot;_blank&quot;&gt;招商银行网上银行专业版的使用技巧&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1149.html&quot; target=&quot;_blank&quot;&gt;人民币对美元和欧元汇率&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/943.html&quot; target=&quot;_blank&quot;&gt;个人结汇的一点小技巧&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://img.tongji.cn.yahoo.com/707050/ystat.gif&quot; alt=&quot;Yahoo Stat&quot; border=&quot;0&quot; /&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://s49.sitemeter.com/meter.asp?site=s49williamlong&quot; alt=&quot;Site Meter&quot; border=&quot;0&quot; /&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://feedproxy.google.com/%7Er/williamlong/%7E4/1FNmIU-B6cA&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description><pubDate>Tue, 16 Sep 2008 23:58:44 +0800</pubDate><author>webmaster@williamlong.dot.info (williamlong)</author><guid isPermaLink="false">http://www.williamlong.info/archives/1500.html</guid><dc:creator>webmaster@williamlong.dot.info (williamlong)</dc:creator><fs:srclink>http://www.williamlong.info/archives/1500.html</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418747/4060402</fs:itemid></item><item><title>找一个简洁而又漂亮的Ubuntu主题真难</title><link>http://snsnow.com/blog/looking-for-a-succinct-ubuntu-theme/</link><xg:id>345839851</xg:id><description>&lt;p&gt;&lt;a title=&quot;Ubuntu&quot; href=&quot;http://www.ubuntu.com/&quot; target=&quot;_blank&quot;&gt;Ubuntu&lt;/a&gt;在所有Linux发行版中算是相当不错的了，只是最近一直为找不到一款合适的主题而感到有点郁闷。&lt;/p&gt;&lt;p&gt;以Ubuntu 8.04为例，自带的Human主题一般般，黄色的主色调和黄色的图标看久了容易视觉疲劳，当然这款主题还有一款Blue的，但也很一般。&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.gnome-look.org/&quot; target=&quot;_blank&quot;&gt;GNOME-Look.org&lt;/a&gt; 上有不少漂亮的主题，但大多数与 Ubuntu 8.04 配合的不是很好，似乎是Ubuntu采用了新的主题引擎的缘故。简单的验证方法就是打开”新立得软件包管理器”，看到那老土的，像Windows经典主题的样子没有。居然没有样式渲染，一些对话款和设置菜单也同样存在这个问题,但是Ubuntu自带的Human就工作的很好。或许是那些主题比较早，而作者也没有更新，以至于它们不适合最新的引擎。&lt;/p&gt;&lt;p&gt;前几天我将Ubuntu 8.04 升级到了 8.10，过程很顺利，只是我的Nvidia显卡找不到合适的驱动，只好手动安装。Ubuntu 8.10自带了一个New-Human主题，咖啡色的桌面是顺眼多了，但是工具栏还有菜单就不怎么样了，像Firefox设置选项菜单上的那行字就看不清。&lt;/p&gt;&lt;p&gt;我现在的主题用的就是Human配合一款Emerald主题+AWN，这样就不会看到右上角那难看的三个按钮了。说到AWN我顺便说一下宽屏显示器的问题，本来屏幕高度就不太够，再加上上下两个面板，中间就只有可怜的那么点空间了。就这一点来说，苹果的Dock很优秀，而且能提高不少效率，在Linux中AWN是一个很好的替代。&lt;/p&gt;&lt;p&gt;找一个简洁而又漂亮，适用于Ubuntu的主题真的那么难吗？&lt;/p&gt;&lt;p&gt;我的要求有以下3个：&lt;/p&gt;&lt;ol&gt;&lt;li&gt;最小化、最大化、关闭 三个按钮好看一点，不要就“_ 口 X”的那种。&lt;/li&gt;&lt;li&gt;滚动条的配色要适中，不要看不清或太扎眼。&lt;/li&gt;&lt;li&gt;与Ubuntu兼容性要好，不要出现渲染问题。&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;哪位有看到符合以上要求的主题吗，帮忙推荐一下。&lt;/p&gt;&lt;p&gt;评论数量(2) | &lt;a href=&quot;http://snsnow.com/blog/looking-for-a-succinct-ubuntu-theme/#comments&quot; target=&quot;_blank&quot;&gt;我想对这篇文章说几句&lt;/a&gt;&lt;br /&gt;
	本文网址：&lt;a href=&quot;http://snsnow.com/blog/looking-for-a-succinct-ubuntu-theme/&quot; target=&quot;_blank&quot;&gt;http://snsnow.com/blog/looking-for-a-succinct-ubuntu-theme/&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;border-top: 1px solid #ccc;padding:8px 20px 0 0;margin:20px 0 0 0;&quot;&gt;©  &lt;a href=&quot;http://snsnow.com/blog/&quot; target=&quot;_blank&quot;&gt;不谢的紫藤花&lt;/a&gt;, 2008. | Add to &lt;a href=&quot;http://delicious.com/save?url=http%3A//snsnow.com/blog/looking-for-a-succinct-ubuntu-theme/&amp;amp;title=%E6%89%BE%E4%B8%80%E4%B8%AA%E7%AE%80%E6%B4%81%E8%80%8C%E5%8F%88%E6%BC%82%E4%BA%AE%E7%9A%84Ubuntu%E4%B8%BB%E9%A2%98%E7%9C%9F%E9%9A%BE&quot; target=&quot;_blank&quot;&gt;del.icio.us&lt;/a&gt;&lt;/p&gt;</description><pubDate>Mon, 08 Sep 2008 09:16:54 +0800</pubDate><author>Freeman</author><guid isPermaLink="false">http://snsnow.com/blog/?p=134</guid><dc:creator>Freeman</dc:creator><fs:srclink>http://snsnow.com/blog/looking-for-a-succinct-ubuntu-theme/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418748/4060402</fs:itemid></item><item><title>解决WordPress 2.6日志ID不连续的方法</title><link>http://www.williamlong.info/archives/1491.html</link><xg:id>345792748</xg:id><description>&lt;p&gt;&lt;a href=&quot;http://feedads.googleadservices.com/%7Ea/qLNx40yXwGa3BAwpZ9X_KJULXrg/a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://feedads.googleadservices.com/%7Ea/qLNx40yXwGa3BAwpZ9X_KJULXrg/i&quot; border=&quot;0&quot; ismap=&quot;true&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;　　已经发布的&lt;a target=&quot;_blank&quot; href=&quot;http://www.williamlong.info/archives/1415.html&quot;&gt;WordPress 2.6版&lt;/a&gt;有一个很讨厌的功能，就是Post Revisions（文章的版本控制），在默认的情况下，日志的ID将不再连续，使用ID做为Permalink结构的用户将会看到一个地址越来越混乱的WordPress，现在我给一个解决WordPress的ID不连续的方法。&lt;/p&gt;&lt;p&gt;　　按照&lt;a target=&quot;_blank&quot; href=&quot;http://www.williamlong.info/archives/1416.html&quot;&gt;此文&lt;/a&gt;的方法，在wp-config.php文件中增加一行define('WP_POST_REVISIONS', false)，同时安装“&lt;a target=&quot;_blank&quot; href=&quot;http://www.williamlong.info/download/disable-autosave.zip&quot;&gt;禁用WordPress自动保存的插件&lt;/a&gt;”，在WordPress后台启用此插件。&lt;/p&gt;&lt;p&gt;　　请注意这两个操作缺一不可，如果不启用“禁用WordPress自动保存的插件”，那么每篇文章都会出现一个自动保存的记录。&lt;/p&gt;&lt;p&gt;　　另外，对于数据库有“洁癖”的WordPress用户来说，可能想要删除由于Post Revisions导致的表内的垃圾信息，同时将ID设置为连续，下面是我写的一段SQL脚本，请在phpmyadmin中使用。&lt;/p&gt;&lt;p&gt;　　删除是Post Revisions垃圾信息，请执行：&lt;/p&gt;&lt;p&gt;delete from wp_posts where post_type = 'revision';&lt;/p&gt;&lt;p&gt;　　将ID重新设置为连续，这个比较麻烦，设置一个ID就要4条SQL语句，我仅仅举一个例子，将ID为59的文章修改为ID为58，需要执行以下语句。&lt;/p&gt;&lt;p&gt;update wp_posts set id = 58 where id = 59;&lt;br /&gt;update wp_term_relationships set object_id = 58 where object_id = 59;&lt;br /&gt;update wp_postmeta set post_id = 58 where post_id = 59;&lt;br /&gt;update wp_comments set comment_post_ID = 58 where comment_post_ID = 59;&lt;/p&gt;&lt;p&gt;　　如果用户需要修改的文章较多，需要批量复制、修改和执行上面四行。&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1491.html&quot; target=&quot;_blank&quot;&gt;继续阅读《解决WordPress 2.6日志ID不连续的方法》的全文内容...&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;相关文章:&lt;/h3&gt;&lt;ul&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1498.html&quot; target=&quot;_blank&quot;&gt;WordCamp China 2008报名开始&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1416.html&quot; target=&quot;_blank&quot;&gt;禁用WordPress自动保存的插件&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1415.html&quot; target=&quot;_blank&quot;&gt;WordPress 2.6发布&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1355.html&quot; target=&quot;_blank&quot;&gt;在Windows IIS下配置WordPress MU环境&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1322.html&quot; target=&quot;_blank&quot;&gt;十大最佳WordPress插件推荐&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://img.tongji.cn.yahoo.com/707050/ystat.gif&quot; alt=&quot;Yahoo Stat&quot; border=&quot;0&quot; /&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://s49.sitemeter.com/meter.asp?site=s49williamlong&quot; alt=&quot;Site Meter&quot; border=&quot;0&quot; /&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://feedproxy.google.com/%7Er/williamlong/%7E4/A17hoskiPDo&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description><pubDate>Mon, 08 Sep 2008 09:12:34 +0800</pubDate><author>webmaster@williamlong.dot.info (williamlong)</author><guid isPermaLink="false">http://www.williamlong.info/archives/1491.html</guid><dc:creator>webmaster@williamlong.dot.info (williamlong)</dc:creator><fs:srclink>http://www.williamlong.info/archives/1491.html</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418749/4060402</fs:itemid></item><item><title>网站的视觉设计</title><link>http://ued.taobao.com/blog/2008/08/14/%e7%bd%91%e7%ab%99%e7%9a%84%e8%a7%86%e8%a7%89%e8%ae%be%e8%ae%a1/</link><xg:id>316524613</xg:id><description>&lt;p&gt;自己从工艺品设计到平面设计到网络设计，虽然设计原则不离其宗，但经验下来的心得告诉自己，设计媒介的变化带来很多媒介自身的特殊性，下面总结下网站视觉设计的一些要点，有他人经验，也有自己的心得：&lt;br /&gt;
1—&lt;strong&gt;logo：&lt;br /&gt;
&lt;/strong&gt;基本logo特征，符合logo设计基础（平面设计通用）显示器效果：清晰度，最小尺寸（因显示器分辨率而带来的，等同线下平面设计的印刷效果）&lt;br /&gt;
2—&lt;strong&gt;文字：&lt;br /&gt;
&lt;/strong&gt;内容等级决定字体、字号大小、粗细；状态决定颜色（默认或者根据网站特殊统一）&lt;br /&gt;
3—&lt;strong&gt;广告、内容图片：&lt;br /&gt;
&lt;/strong&gt;尺寸样式的定位，同一页面的和谐性，图片的优化，位置的节奏，大小对比。&lt;br /&gt;
4—&lt;strong&gt;icon：&lt;br /&gt;
&lt;/strong&gt;品牌性，表达准确合理，设计手法（依据品牌性），一致性，作用：吸引，醒目，方便识别、理解、操作、记忆。&lt;br /&gt;
5—&lt;strong&gt;可点击（button)：&lt;br /&gt;
&lt;/strong&gt;区别（不可点击），根据人的生活经验：厚度，可按，质感（实体联想），色彩（品牌性、统一性、对比性）；统一的样式大小（依据里面文字的内边距统一）&lt;br /&gt;
6—&lt;strong&gt;背景图片：&lt;br /&gt;
&lt;/strong&gt;氛围效果营造，同产品的统一性，优化（品质大小，色彩信息，实现方案），&lt;br /&gt;
7—&lt;strong&gt;图文排版：&lt;br /&gt;
&lt;/strong&gt;主图次文，图文节奏，空隙，模块化。&lt;br /&gt;
8—&lt;strong&gt;当前状态：&lt;br /&gt;
&lt;/strong&gt;放大（形状），变色（反色、对比色、明度纯度区别色），链进链出后指定内容提示。&lt;br /&gt;
9—&lt;strong&gt;交互控件：&lt;/strong&gt;样式合理准确性（人对系统默认的认知和生活常规认知），状态（视觉表现样式和动作过程优化），创意。&lt;br /&gt;
10—&lt;strong&gt;loading：&lt;br /&gt;
&lt;/strong&gt;内容关联性（loading前后的内容关联），无聊等待的乐趣，体积、面积优化，创意。&lt;br /&gt;
11—&lt;strong&gt;用户反馈_ 成功、出错、提示、无结果：&lt;br /&gt;
&lt;/strong&gt;文案（明确、合理、人性化、创意），图形（明确、醒目、色彩的心理认知准确度）。&lt;br /&gt;
12—&lt;strong&gt;动画效果：&lt;br /&gt;
&lt;/strong&gt;过程合理（模拟真实环境的合理化），连续，节奏感，用户日常动作表现，音效配合，创意。&lt;br /&gt;
13—&lt;strong&gt;首尾设计：&lt;br /&gt;
&lt;/strong&gt;首（品牌宣传、自身特点、明确内容、气氛表达、创意。尾：呼应、节奏（与首），创意。&lt;br /&gt;
14—&lt;strong&gt;适应屏设计（全屏设计）：&lt;br /&gt;
&lt;/strong&gt;最大最小屏幕的考虑（文字、图片的位置、折行效果）&lt;br /&gt;
15—&lt;strong&gt;固定尺寸的栅格设计：&lt;br /&gt;
&lt;/strong&gt;合理的单元格（考虑黄金分割），单元格面积节奏，边距统一性&lt;br /&gt;
16—&lt;strong&gt;demo设计样稿：&lt;br /&gt;
&lt;/strong&gt;对内容最多最少的考虑。&lt;br /&gt;
17—&lt;strong&gt;页面：&lt;br /&gt;
&lt;/strong&gt;品牌性，基调元素一致性，复用性，节奏感、面积感，视觉第一吸引，引导浏览，点线面关系，素描原理（运用素描的基本规律来做页面）。&lt;br /&gt;
18—&lt;strong&gt;阅读：&lt;br /&gt;
&lt;/strong&gt;背景对阅读（视力）的舒适度，内容与背景的对比舒适度。&lt;br /&gt;
&lt;span id=&quot;more-239&quot;&gt;&lt;/span&gt;&lt;br /&gt;
其实还有很多设计的点比如交互设计，比如代码设计，我们可以展示给用户看到的这些综上所述，构成了用户体验设计的一个大过程，自己在做的很多时候其实也不是都能估计到每个点的，总结出来以帮助随时审视！&lt;/p&gt;</description><pubDate>Thu, 14 Aug 2008 22:27:08 +0800</pubDate><author>定侯</author><guid isPermaLink="false">http://ued.taobao.com/blog/?p=239</guid><dc:creator>定侯</dc:creator><fs:srclink>http://ued.taobao.com/blog/2008/08/14/%e7%bd%91%e7%ab%99%e7%9a%84%e8%a7%86%e8%a7%89%e8%ae%be%e8%ae%a1/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418750/4060402</fs:itemid></item><item><title>修改PayPal帐户姓名的方法</title><link>http://www.williamlong.info/archives/1456.html</link><xg:id>312835588</xg:id><description>&lt;p&gt;　　PayPal是eBay公司的在线付款解决方案，快速、安全而又方便，是跨国交易的理想解决方案。PayPal国际网站允许用户向55个国家和地区的用户发送和接收付款。PayPal贝宝只能向中国用户发送和接收付款。&lt;br /&gt;只能用人民币交易。我的PayPal国际账户注册的时间比较早，一开始并没有太注意帐户名称的问题，在支付上也没什么问题，只是无法&lt;a target=&quot;_blank&quot; href=&quot;http://www.williamlong.info/archives/531.html&quot;&gt;关联银行卡收款&lt;/a&gt;，但是可以通过PayPal支票收款，只是速度有些慢。&lt;/p&gt;&lt;p&gt;　　目前PayPal国际网站目前已经支持添加三个中国本地银行（包括招行、工行和建行），使得提现收款更为方便快捷。但是我在关联银行的时候，提示银行账户姓名和PayPal姓名不符合，我这才意识到PayPal帐户姓名的问题。&lt;/p&gt;&lt;p&gt;　　修改PayPal帐户的姓名较为复杂，需要提交不少资料给PayPal的客户服务，不过我提交后一个工作日就成功改名了，因此我就介绍一下修改PayPal姓名的经验。&lt;/p&gt;&lt;p&gt;　　首先准备好数码相机和一些证明资料，我准备的地址证明资料包括，我的二代身份证（身份证上有住址），中国护照（可有可无），电费单（用于地址证明），水费单，有线电视费用单，招行的信用卡账单，招行的信用卡实物（拍摄背面的中文签名）。&lt;/p&gt;&lt;p&gt;　　然后就用数码相机拍摄这些资料，注意分辨率不要太大，1280×900即可，因为PayPal提供的上传空间只有几兆，文件太大的话，最好用PhotoShop压缩一下。拍摄的信息要清晰，以证明自己的真实姓名和地址。这些地址应该和关联信用卡地址或者成功托收PayPal支票的地址相同。&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&lt;img alt=&quot;修改PayPal帐户姓名的方法&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://www.williamlong.info/upload/1456_1.jpg&quot; /&gt;&lt;/p&gt;&lt;p&gt;　　之后登录PayPal网站，登录到自己的PayPal账户。点击“联系我们”链接；点击“通过电子邮件获取帮助”标题下的“联系客户服务”链接；在“选择主题”下，选择“我的账户档案”；在“选择副主题”下，选择“名称变更”；或者直接点击&lt;a target=&quot;_blank&quot; href=&quot;https://www.paypal.com/row/wf/f=ap_namechg&quot;&gt;这个地址&lt;/a&gt;进入修改姓名的安全表格。PayPal会提示我们提交如下信息：&lt;/p&gt;&lt;p&gt;&lt;em&gt;　　商家联系名称变更：&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;　　为了处理您的名称变更申请，您需要将附加信息传真给我们。请提供带有照片的有效证件以及其他下列文件之一：&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;　　显示您的新姓名的带有照片的有效证件的复印件。可接受的带有照片的有效证件包括：驾照、护照，或任何其他州或政府颁发的附有照片的证件。&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;　　近期家用水电煤气账单的复印件，上面显示的您的新姓名和地址要与在PayPal账户上的完全一致。&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;　　您的 PayPal 账户（如果有）上所列的银行账户的近期银行对账单复印件。&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;　　您的 PayPal 账户（如果有）上所列的信用卡的近期信用卡账单复印件。&lt;/em&gt;&lt;/p&gt;&lt;p&gt;　　将上面拍摄的图片上传到PayPal，在上传资料的备注中注明住址和上次托收PayPal支票的住址相同。注意在修改PayPal姓名的日子里不要进行转账或支付等操作，否则&lt;a target=&quot;_blank&quot; href=&quot;http://www.williamlong.info/archives/732.html&quot;&gt;PayPal帐号可能会被冻结&lt;/a&gt;，&lt;a target=&quot;_blank&quot; href=&quot;http://www.williamlong.info/archives/1307.html&quot;&gt;解冻起来可费事多了&lt;/a&gt;。&lt;/p&gt;&lt;p&gt;　　提交完成资料后，大约一两个工作日的时间，就可以完成姓名更改。最终更改后的PayPal姓名为用户姓名的“拼音”，而不是中文名，但是在关联中文的银行卡时候不会有问题，因此PayPal帐户已经是拼音姓名就不需要修改名称了。&lt;/p&gt;&lt;p&gt;　　关联银行卡后，PayPal会发送两笔小额的转账到用户银行卡上，将转账的数字填写在PayPal银行卡认证的界面，就可以完成银行卡的认证。&lt;/p&gt;&lt;p&gt;　　认证完成银行卡后，付款和提款的限额将取消，并可以使用借记卡进行付款，成为认证的PayPal用户。&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&lt;img alt=&quot;修改PayPal帐户姓名的方法&quot; src=&quot;http://xgimg.com/downloadPicture.php?http://www.williamlong.info/upload/1456_2.jpg&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1456.html&quot; target=&quot;_blank&quot;&gt;继续阅读《修改PayPal帐户姓名的方法》的全文内容...&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;相关文章:&lt;/h3&gt;&lt;ul&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/1307.html&quot; target=&quot;_blank&quot;&gt;PayPal帐号的冻结和解冻&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/888.html&quot; target=&quot;_blank&quot;&gt;PayPal界面全部中文化&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/732.html&quot; target=&quot;_blank&quot;&gt;防止PayPal帐号冻结和解冻的经验&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/722.html&quot; target=&quot;_blank&quot;&gt;通过PayPal实现美元现钞转换为现汇&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.williamlong.info/archives/709.html&quot; target=&quot;_blank&quot;&gt;PayPal支持电汇提现&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://img.tongji.cn.yahoo.com/707050/ystat.gif&quot; alt=&quot;Yahoo Stat&quot; border=&quot;0&quot; /&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://s49.sitemeter.com/meter.asp?site=s49williamlong&quot; alt=&quot;Site Meter&quot; border=&quot;0&quot; /&gt;&lt;p&gt;&lt;a href=&quot;http://feeds.feedburner.com/%7Ea/williamlong?a=caFrFe&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://feeds.feedburner.com/%7Ea/williamlong?i=caFrFe&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;feedflare&quot;&gt;&lt;a href=&quot;http://feeds.feedburner.com/%7Ef/williamlong?a=jSbI0K&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://feeds.feedburner.com/%7Ef/williamlong?i=jSbI0K&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://feeds.feedburner.com/%7Er/williamlong/%7E4/361954623&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description><pubDate>Mon, 11 Aug 2008 15:12:00 +0800</pubDate><guid isPermaLink="false">http://www.williamlong.info/archives/1456.html?</guid><fs:srclink>http://www.williamlong.info/archives/1456.html</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418751/4060402</fs:itemid></item><item><title>奥运要开始了</title><link>http://blog.sina.com.cn/s/blog_46e9d5da0100anxw.html</link><xg:id>310436374</xg:id><description>&lt;div class=&quot;Section0&quot; style=&quot;LAYOUT-GRID: 15.6pt none&quot;&gt;
&lt;p class=&quot;0&quot;&gt;&lt;a href=&quot;http://creativecommons.org/licenses/by/3.0/deed.zh&quot; target=&quot;_blank&quot;&gt;&lt;font color=&quot;#11779F&quot;&gt;版权声明&lt;/font&gt;&lt;/a&gt;&lt;font color=&quot;#11779F&quot;&gt;：可以任意转载，转载时请务必以&lt;strong&gt;超链接形式&lt;/strong&gt;标明文章原始出处和作者信息及&lt;/font&gt;&lt;a href=&quot;http://www.chedong.com/blog/archives/001249.html&quot; target=&quot;_blank&quot;&gt;&lt;font color=&quot;#11779F&quot;&gt;本声明&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;a href=&quot;http://www.my1510.cn/article.php?749099a12de350e1&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;
&lt;p class=&quot;0&quot;&gt;&lt;a href=&quot;http://www.my1510.cn/article.php?749099a12de350e1&quot; target=&quot;_blank&quot;&gt;http://www.my1510.cn/article.php?749099a12de350e1&lt;/a&gt;&lt;a href=&quot;http://www.my1510.cn/article.php?749099a12de350e1&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;

&lt;/span&gt;&lt;/p&gt;
&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;一大早，趁着封路封楼前进入临时演播室，演播室的地点不错，可以俯瞰鸟巢，当然也有不好的地方，窗户前面划了一道警戒线，提醒大家，开幕式开始之后，不要跨越这个距离，不要让狙击手认为别有企图。&lt;/font&gt;&lt;/span&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;
从楼下看下去，鸟巢和水立方周边聚集了不少民众，骑着自行车来的，带着自己的字画来和大家分享的，还有拿着自制的横幅的，想当热闹。不过，中午过后，鸟巢周边清场，周边的道路也开始分段开始封路，政府昨天晚上就透过电视广播呼吁民众，如果没有票，就不要到这些道路管制的地方去看焰火，为了保障奥运会开幕式圆满成功，请大家理解。&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;
大家应该都很理解，来的路上，出租车司机说，原本打算干脆也休息一天，但是想想这天的份钱还是要交，不过我就告诉她，还好有他们，不然的话，我们这些对北京公交系统不熟悉，但是又要周围走的人，那怎麽办呢？刚刚同事就打电话来求救，她在鸟巢封锁区之外采访，但是找不到出租车。&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;
开幕式大家都高兴，但是高兴的上纲上线就不好了，有观众投诉我们有人做节目的时候穿了黑色的衣服，马上有管理层来警告，看看自己身上，红衬衣，黑西装，不知道是不是就是观众投诉的起源，不过选择黑西装肯定没有任何政治含义，只是因为自己的虚荣心，深色西装，特别是黑色的，显得自己瘦一些而已。&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;
看来喜欢联想的人很多，不单单是观众，还有记者。看到美国运动员戴口罩，就认为这是在抗议北京空气不好，用这样阴险的招数表达不满。其实，我觉得运动员挺无辜的，他其实就是很简单很自私的为了保养好自己的身体，没有想到变成了如此有政治含义的事情。美国运动员道歉了，美国奥委会也批评运动员了，不过我想不通了，既然批评，那又为何当初发口罩给他们呢？不过运动员可以道歉，我可是现在心慌慌的，被封锁在楼里面不能出去，还要做一晚上的节目，不知道到时候那个投诉的人，是否觉得黑色的衣服不换，就等于我用心西险恶，还知错不改呢？越想越害怕。&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;
昨天采访福娃的设计者韩美林，听了不少有意思的故事，原本因为福娃而产生的不好印象一扫而空。总之，整个访问，让我印象最深刻的是，对于这五个福娃，他也不满意，如果没有干扰，也就是不同的人不同要求和指挥还有拍脑袋的灵感，他觉得，自己肯定会设计出更好玩的吉祥物。虽然做出了很多的妥协，他说，他还是坚持了底线，比如，坚决不用拨浪鼓做吉祥物。总之，和他聊完天，发现虽然不少艺术家充满了热情参与，但是中间也有不少的委屈，有的妥协，有的放弃，当然，也有的坚持下来了，当然，这和每个人的个性，追求，有着直接的关系。&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;
昨天看到洪晃写的张艺谋对她的问题的答案，大概意思是，开幕式如果口碑不错，那就是靠谱的事情，如果不靠谱，那他就会说，政府干预太多了。这段话太好玩了，很经典，而且具有中国特色。&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;
说到张艺谋，那天看彩排，已经发现主题歌一定是男女两个人，于是开始猜测，到底会是谁。外界有很多的揣测，现在看起来，这两位是相当保险的选择，不像之前外界猜测的那些人选，会引发很多的争议。这是因为，刘欢的歌艺还有在歌坛以及听众心目中的地位，让他足以站在舞台中央，至于莎拉布莱曼，对于中国观众，也有亲切感。她是英国人，还有承上启下的象征。加上他们两个人的声音和唱法，也属于适合大型活动，可以很高雅，很艺术。&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'SimSun'; mso-spacerun: 'yes'&quot;&gt;&lt;font face=&quot;SimSun&quot;&gt;
所以，听到这两个名字，我的第一个反应，很张艺谋。看完开幕式的彩排，这是我总结出来的感受。很多人一说到很张艺谋，马上就会联想到四年前雅典奥运闭幕式上的中国八分钟，因为开幕式进行前，不够能透露节目的内容，我只能够这样说，那个八分钟，很有张艺谋在导演大红灯笼高高挂那个阶段的感觉，而四年之后的张艺谋，已经走出了那种类型的中国形式，就好像他之后的作品，从英雄到满城尽带黄金甲，不管是视觉，还是场面，都已经走向了另外一种中国形式，但是依然很张艺谋。&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;p class=&quot;0&quot;&gt; &lt;/p&gt;
&lt;/div&gt;</description><pubDate>Fri, 08 Aug 2008 06:17:57 +0800</pubDate><author>闾丘露薇</author><guid isPermaLink="false">http://blog.sina.com.cn/s/blog_46e9d5da0100anxw.html</guid><dc:creator>闾丘露薇</dc:creator><fs:srclink>http://blog.sina.com.cn/s/blog_46e9d5da0100anxw.html</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418752/4060402</fs:itemid></item><item><title>memcached全面剖析–5. memcached的应用和兼容程序</title><link>http://tech.idv2.com/2008/07/31/memcached-005/</link><xg:id>300153602</xg:id><description>&lt;p&gt;发表日：2008/7/30 &lt;br /&gt;
作者：长野雅广(Masahiro Nagano) &lt;br /&gt;
原文链接：&lt;a href=&quot;http://gihyo.jp/dev/feature/01/memcached/0005&quot; target=&quot;_blank&quot;&gt;http://gihyo.jp/dev/feature/01/memcached/0005&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;前几次的文章在这里：&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;第1次：&lt;a href=&quot;http://tech.idv2.com/2008/07/10/memcached-001/&quot; target=&quot;_blank&quot;&gt;http://tech.idv2.com/2008/07/10/memcached-001/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;第2次：&lt;a href=&quot;http://tech.idv2.com/2008/07/11/memcached-002/&quot; target=&quot;_blank&quot;&gt;http://tech.idv2.com/2008/07/11/memcached-002/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;第3次：&lt;a href=&quot;http://tech.idv2.com/2008/07/16/memcached-003/&quot; target=&quot;_blank&quot;&gt;http://tech.idv2.com/2008/07/16/memcached-003/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;第4次：&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/&quot; target=&quot;_blank&quot;&gt;http://tech.idv2.com/2008/07/24/memcached-004/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;我是Mixi的长野。memcached的连载终于要结束了。
到&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/&quot; target=&quot;_blank&quot;&gt;上次&lt;/a&gt;为止，
我们介绍了与memcached直接相关的话题，本次介绍一些mixi的案例和
实际应用上的话题，并介绍一些与memcached兼容的程序。&lt;/p&gt;
&lt;div class=&quot;contents&quot;&gt;
&lt;a id=&quot;contents_28&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_0&quot; target=&quot;_blank&quot;&gt;  mixi案例研究&lt;/a&gt;
&lt;ul class=&quot;list2&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_1&quot; target=&quot;_blank&quot;&gt;  服务器配置和数量&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_2&quot; target=&quot;_blank&quot;&gt;  memcached进程&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_3&quot; target=&quot;_blank&quot;&gt;  memcached使用方法和客户端&lt;/a&gt;
&lt;ul class=&quot;list3&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_4&quot; target=&quot;_blank&quot;&gt;  通过Cache::Memcached::Fast维持连接&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_5&quot; target=&quot;_blank&quot;&gt;  公共数据的处理和rehash&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_6&quot; target=&quot;_blank&quot;&gt;  memcached应用经验&lt;/a&gt;
&lt;ul class=&quot;list2&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_7&quot; target=&quot;_blank&quot;&gt;  通过daemontools启动&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_8&quot; target=&quot;_blank&quot;&gt;  监视&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_9&quot; target=&quot;_blank&quot;&gt;  memcached的性能&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_10&quot; target=&quot;_blank&quot;&gt;  兼容应用程序&lt;/a&gt;
&lt;ul class=&quot;list2&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_11&quot; target=&quot;_blank&quot;&gt;  Tokyo Tyrant案例&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/31/memcached-005/#content_28_12&quot; target=&quot;_blank&quot;&gt;  总结&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;

&lt;h2 id=&quot;content_28_0&quot;&gt;mixi案例研究&lt;/h2&gt;
&lt;p&gt;mixi在提供服务的初期阶段就使用了memcached。
随着网站访问量的急剧增加，单纯为数据库添加slave已无法满足需要，因此引入了memcached。
此外，我们也从增加可扩展性的方面进行了验证，证明了memcached的速度和稳定性都能满足需要。
现在，memcached已成为mixi服务中非常重要的组成部分。&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0005-01.png&quot; alt=&quot;memcached-0005-01.png&quot; title=&quot;memcached-0005-01.png&quot; width=&quot;616&quot; height=&quot;406&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图1 现在的系统组件&lt;/p&gt;

&lt;h3 id=&quot;content_28_1&quot;&gt;服务器配置和数量&lt;/h3&gt;
&lt;p&gt;mixi使用了许许多多服务器，如数据库服务器、应用服务器、图片服务器、
反向代理服务器等。单单memcached就有将近200台服务器在运行。
memcached服务器的典型配置如下：&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;CPU：Intel Pentium 4 2.8GHz&lt;/li&gt;
&lt;li&gt;内存：4GB&lt;/li&gt;
&lt;li&gt;硬盘：146GB SCSI&lt;/li&gt;
&lt;li&gt;操作系统：Linux（x86_64）&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;这些服务器以前曾用于数据库服务器等。随着CPU性能提升、内存价格下降，
我们积极地将数据库服务器、应用服务器等换成了性能更强大、内存更多的服务器。
这样，可以抑制mixi整体使用的服务器数量的急剧增加，降低管理成本。
由于memcached服务器几乎不占用CPU，就将换下来的服务器用作memcached服务器了。&lt;/p&gt;

&lt;h3 id=&quot;content_28_2&quot;&gt;memcached进程&lt;/h3&gt;
&lt;p&gt;每台memcached服务器仅启动一个memcached进程。分配给memcached的内存为3GB，
启动参数如下：&lt;/p&gt;
&lt;pre&gt;/usr/bin/memcached -p 11211 -u nobody -m 3000 -c 30720&lt;/pre&gt;
&lt;p&gt;由于使用了x86_64的操作系统，因此能分配2GB以上的内存。32位操作系统中，
每个进程最多只能使用2GB内存。也曾经考虑过启动多个分配2GB以下内存的进程，
但这样一台服务器上的TCP连接数就会成倍增加，管理上也变得复杂，
所以mixi就统一使用了64位操作系统。&lt;/p&gt;
&lt;p&gt;另外，虽然服务器的内存为4GB，却仅分配了3GB，是因为内存分配量超过这个值，
就有可能导致内存交换(swap)。连载的&lt;a href=&quot;http://tech.idv2.com/2008/07/11/memcached-002/&quot; target=&quot;_blank&quot;&gt;第2次&lt;/a&gt;中
前坂讲解过了memcached的内存存储“slab allocator”，当时说过，memcached启动时
指定的内存分配量是memcached用于保存数据的量，没有包括“slab allocator”本身占用的内存、
以及为了保存数据而设置的管理空间。因此，memcached进程的实际内存分配量要比
指定的容量要大，这一点应当注意。&lt;/p&gt;
&lt;p&gt;mixi保存在memcached中的数据大部分都比较小。这样，进程的大小要比
指定的容量大很多。因此，我们反复改变内存分配量进行验证，
确认了3GB的大小不会引发swap，这就是现在应用的数值。&lt;/p&gt;

&lt;h3 id=&quot;content_28_3&quot;&gt;memcached使用方法和客户端&lt;/h3&gt;
&lt;p&gt;现在，mixi的服务将200台左右的memcached服务器作为一个pool使用。
每台服务器的容量为3GB，那么全体就有了将近600GB的巨大的内存数据库。
客户端程序库使用了本连载中多次提到车的Cache::Memcached::Fast，
与服务器进行交互。当然，缓存的分布式算法使用的是
&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/&quot; target=&quot;_blank&quot;&gt;第4次&lt;/a&gt;介绍过的
Consistent Hashing算法。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/dist/Cache-Memcached-Fast/&quot; target=&quot;_blank&quot;&gt;Cache::Memcached::Fast - search.cpan.org&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;应用层上memcached的使用方法由开发应用程序的工程师自行决定并实现。
但是，为了防止车轮再造、防止Cache::Memcached::Fast上的教训再次发生，
我们提供了Cache::Memcached::Fast的wrap模块并使用。&lt;/p&gt;

&lt;h4 id=&quot;content_28_4&quot;&gt;通过Cache::Memcached::Fast维持连接&lt;/h4&gt;
&lt;p&gt;Cache::Memcached的情况下，与memcached的连接（文件句柄）保存在Cache::Memcached包内的类变量中。
在mod_perl和FastCGI等环境下，包内的变量不会像CGI那样随时重新启动，
而是在进程中一直保持。其结果就是不会断开与memcached的连接，
减少了TCP连接建立时的开销，同时也能防止短时间内反复进行TCP连接、断开
而导致的TCP端口资源枯竭。&lt;/p&gt;
&lt;p&gt;但是，Cache::Memcached::Fast没有这个功能，所以需要在模块之外
将Cache::Memcached::Fast对象保持在类变量中，以保证持久连接。&lt;/p&gt;
&lt;pre&gt;package Gihyo::Memcached;

use strict;
use warnings;
use Cache::Memcached::Fast;

my @server_list = qw/192.168.1.1:11211 192.168.1.1:11211/;
my $fast;  ## 用于保持对象

sub new {
    my $self  = bless {}, shift;
    if ( !$fast ) {
        $fast = Cache::Memcached::Fast-&amp;gt;new({ servers =&amp;gt; \@server_list });
    }
    $self-&amp;gt;{_fast} = $fast;
    return $self;
}

sub get {
   my $self = shift;
   $self-&amp;gt;{_fast}-&amp;gt;get(@_);
}&lt;/pre&gt;
&lt;p&gt;上面的例子中，Cache::Memcached::Fast对象保存到类变量$fast中。&lt;/p&gt;

&lt;h4 id=&quot;content_28_5&quot;&gt;公共数据的处理和rehash&lt;/h4&gt;
&lt;p&gt;诸如mixi的主页上的新闻这样的所有用户共享的缓存数据、设置信息等数据，
会占用许多页，访问次数也非常多。在这种条件下，访问很容易集中到某台memcached服务器上。
访问集中本身并不是问题，但是一旦访问集中的那台服务器发生故障导致memcached无法连接，
就会产生巨大的问题。&lt;/p&gt;
&lt;p&gt;连载的&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/&quot; target=&quot;_blank&quot;&gt;第4次&lt;/a&gt;
中提到，Cache::Memcached拥有rehash功能，即在无法连接保存数据的服务器的情况下，
会再次计算hash值，连接其他的服务器。&lt;/p&gt;
&lt;p&gt;但是，Cache::Memcached::Fast没有这个功能。不过，它能够在连接服务器失败时，
短时间内不再连接该服务器的功能。&lt;/p&gt;
&lt;pre&gt;my $fast = Cache::Memcached::Fast-&amp;gt;new({
    max_failures     =&amp;gt; 3,
    failure_timeout  =&amp;gt; 1
});&lt;/pre&gt;
&lt;p&gt;在failure_timeout秒内发生max_failures以上次连接失败，就不再连接该memcached服务器。
我们的设置是1秒钟3次以上。&lt;/p&gt;
&lt;p&gt;此外，mixi还为所有用户共享的缓存数据的键名设置命名规则，
符合命名规则的数据会自动保存到多台memcached服务器中，
取得时从中仅选取一台服务器。创建该函数库后，就可以使memcached服务器故障
不再产生其他影响。&lt;/p&gt;

&lt;h2 id=&quot;content_28_6&quot;&gt;memcached应用经验&lt;/h2&gt;
&lt;p&gt;到此为止介绍了memcached内部构造和函数库，接下来介绍一些其他的应用经验。&lt;/p&gt;

&lt;h3 id=&quot;content_28_7&quot;&gt;通过daemontools启动&lt;/h3&gt;
&lt;p&gt;通常情况下memcached运行得相当稳定，但mixi现在使用的最新版1.2.5
曾经发生过几次memcached进程死掉的情况。架构上保证了即使有几台memcached故障
也不会影响服务，不过对于memcached进程死掉的服务器，只要重新启动memcached，
就可以正常运行，所以采用了监视memcached进程并自动启动的方法。
于是使用了daemontools。&lt;/p&gt;
&lt;p&gt;daemontools是qmail的作者DJB开发的UNIX服务管理工具集，
其中名为supervise的程序可用于服务启动、停止的服务重启等。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://cr.yp.to/daemontools.html&quot; target=&quot;_blank&quot;&gt;daemontools&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;这里不介绍daemontools的安装了。mixi使用了以下的run脚本来启动memcached。&lt;/p&gt;
&lt;pre&gt;#!/bin/sh

if [ -f /etc/sysconfig/memcached ];then
        . /etc/sysconfig/memcached
fi

exec 2&amp;gt;&amp;amp;1
exec /usr/bin/memcached -p $PORT -u $USER  -m $CACHESIZE -c $MAXCONN $OPTIONS&lt;/pre&gt;

&lt;h3 id=&quot;content_28_8&quot;&gt;监视&lt;/h3&gt;
&lt;p&gt;mixi使用了名为“nagios”的开源监视软件来监视memcached。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://www.nagios.org/&quot; target=&quot;_blank&quot;&gt;Nagios: Home&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;在nagios中可以简单地开发插件，可以详细地监视memcached的get、add等动作。
不过mixi仅通过stats命令来确认memcached的运行状态。&lt;/p&gt;
&lt;pre&gt;define command {
command_name                   check_memcached
command_line                   $USER1$/check_tcp -H $HOSTADDRESS$ -p 11211 -t 5 -E -s 'stats\r\nquit\r\n' -e 'uptime' -M crit
}&lt;/pre&gt;
&lt;p&gt;此外，mixi将stats目录的结果通过rrdtool转化成图形，进行性能监视，
并将每天的内存使用量做成报表，通过邮件与开发者共享。&lt;/p&gt;

&lt;h3 id=&quot;content_28_9&quot;&gt;memcached的性能&lt;/h3&gt;
&lt;p&gt;连载中已介绍过，memcached的性能十分优秀。我们来看看mixi的实际案例。
这里介绍的图表是服务所使用的访问最为集中的memcached服务器。&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0005-02.png&quot; alt=&quot;memcached-0005-02.png&quot; title=&quot;memcached-0005-02.png&quot; width=&quot;497&quot; height=&quot;193&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图2 请求数&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0005-03.png&quot; alt=&quot;memcached-0005-03.png&quot; title=&quot;memcached-0005-03.png&quot; width=&quot;497&quot; height=&quot;193&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图3 流量&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0005-04.png&quot; alt=&quot;memcached-0005-04.png&quot; title=&quot;memcached-0005-04.png&quot; width=&quot;497&quot; height=&quot;179&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图4 TCP连接数&lt;/p&gt;
&lt;p&gt;从上至下依次为请求数、流量和TCP连接数。请求数最大为15000qps，
流量达到400Mbps，这时的连接数已超过了10000个。
该服务器没有特别的硬件，就是开头介绍的普通的memcached服务器。
此时的CPU利用率为：&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0005-05.png&quot; alt=&quot;memcached-0005-05.png&quot; title=&quot;memcached-0005-05.png&quot; width=&quot;400&quot; height=&quot;212&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图5 CPU利用率&lt;/p&gt;
&lt;p&gt;可见，仍然有idle的部分。因此，memcached的性能非常高，
可以作为Web应用程序开发者放心地保存临时数据或缓存数据的地方。&lt;/p&gt;

&lt;h2 id=&quot;content_28_10&quot;&gt;兼容应用程序&lt;/h2&gt;
&lt;p&gt;memcached的实现和协议都十分简单，因此有很多与memcached兼容的实现。
一些功能强大的扩展可以将memcached的内存数据写到磁盘上，实现数据的持久性和冗余。
连载&lt;a href=&quot;http://tech.idv2.com/2008/07/16/memcached-003/&quot; target=&quot;_blank&quot;&gt;第3次&lt;/a&gt;
介绍过，以后的memcached的存储层将变成可扩展的（pluggable），逐渐支持这些功能。&lt;/p&gt;
&lt;p&gt;这里介绍几个与memcached兼容的应用程序。&lt;/p&gt;
&lt;dl class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;dt&gt;repcached&lt;/dt&gt;
&lt;dd&gt;为memcached提供复制(replication)功能的patch。&lt;/dd&gt;
&lt;dt&gt;Flared&lt;/dt&gt;
&lt;dd&gt;存储到QDBM。同时实现了异步复制和fail over等功能。&lt;/dd&gt;
&lt;dt&gt;memcachedb&lt;/dt&gt;
&lt;dd&gt;存储到BerkleyDB。还实现了message queue。&lt;/dd&gt;
&lt;dt&gt;Tokyo Tyrant&lt;/dt&gt;
&lt;dd&gt;将数据存储到Tokyo Cabinet。不仅与memcached协议兼容，还能通过HTTP进行访问。&lt;/dd&gt;&lt;/dl&gt;

&lt;h3 id=&quot;content_28_11&quot;&gt;Tokyo Tyrant案例&lt;/h3&gt;
&lt;p&gt;mixi使用了上述兼容应用程序中的Tokyo Tyrant。Tokyo Tyrant是平林开发的
Tokyo Cabinet DBM的网络接口。它有自己的协议，但也拥有memcached兼容协议，
也可以通过HTTP进行数据交换。Tokyo Cabinet虽然是一种将数据写到磁盘的实现，但速度相当快。&lt;/p&gt;
&lt;p&gt;mixi并没有将Tokyo Tyrant作为缓存服务器，而是将它作为保存键值对组合的DBMS来使用。
主要作为存储用户上次访问时间的数据库来使用。它与几乎所有的mixi服务都有关，
每次用户访问页面时都要更新数据，因此负荷相当高。MySQL的处理十分笨重，
单独使用memcached保存数据又有可能会丢失数据，所以引入了Tokyo Tyrant。
但无需重新开发客户端，只需原封不动地使用Cache::Memcached::Fast即可，
这也是优点之一。关于Tokyo Tyrant的详细信息，请参考本公司的开发blog。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://alpha.mixi.co.jp/blog/?p=166&quot; target=&quot;_blank&quot;&gt;mixi Engineers' Blog - Tokyo Tyrantによる耐高負荷DBの構築&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://alpha.mixi.co.jp/blog/?p=185&quot; target=&quot;_blank&quot;&gt;mixi Engineers' Blog - Tokyo (Cabinet|Tyrant)の新機能&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;h2 id=&quot;content_28_12&quot;&gt;总结&lt;/h2&gt;
&lt;p&gt;到本次为止，“memcached全面剖析”系列就结束了。我们介绍了memcached的基础、内部结构、
分散算法和应用等内容。读完后如果您能对memcached产生兴趣，就是我们的荣幸。
关于mixi的系统、应用方面的信息，请参考本公司的&lt;a href=&quot;http://alpha.mixi.co.jp/&quot; target=&quot;_blank&quot;&gt;开发blog&lt;/a&gt;。
感谢您的阅读。&lt;/p&gt;


&lt;br /&gt;</description><pubDate>Thu, 31 Jul 2008 00:56:48 +0800</pubDate><author>charlee</author><guid isPermaLink="false">http://tech.idv2.com/2008/07/31/memcached-005/</guid><dc:creator>charlee</dc:creator><fs:srclink>http://tech.idv2.com/2008/07/31/memcached-005/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418754/4060402</fs:itemid></item><item><title>难以理解的资费标准</title><link>http://snsnow.com/blog/incomprehensible-rates/</link><xg:id>298764014</xg:id><description>&lt;p&gt;随着全国漫游资费的调整，移动运营商在漫游费上做文章是不大现实了。移动与联通的漫游资费相差不大，一般都是漫游时主叫0.59元/分钟，被叫0.39元/分钟，不再收取长途费，个别地方可能有差异。&lt;/p&gt;
&lt;p&gt;但是问题来了，漫游时，收费标准可以依据《关于降低移动电话国内漫游通话费上限标准的通知》，可是本地通话的资费有没有上限呢？&lt;/p&gt;
&lt;p&gt;以浙江台州联通 如意通-标准单向卡NG 为例，基本通话费0.55元/分钟，国内长途费0.07元/6秒，也就是说本地拨打国内长途的资费为0.62~1.25元/分钟，随着通话时间的增长，费用逐渐趋向于1.25元/分钟。这远远超出了漫游时主叫0.59元/分钟的标准，按常规理解，本地通话可以归属到漫游的特殊情况，不管怎么说资费都不应该高于漫游的资费标准，但是就因为没有所谓的“本地通话费上限标准”，所以运营商又可以光明正大的圈钱了。我拨打10010咨询联通的客服，对方回答“这是政策问题，我们无法解答”。是啊，高层的决定岂是一般人能解答的，如果你能解答，那你就是高层了。&lt;/p&gt;
&lt;p&gt;同样的情况，移动也存在。本地通话费高于漫游时的通话费，这算是什么，我们是否可以把这个理解成是钻法律空子呢？依照惯例，运营商一般说要“与国际接轨”，底气不足时就说这是基本国情。那现在这种情况算是与国际接轨还是基本国情呢？&lt;/p&gt;
&lt;p&gt;希望相关法规快点出台，管管这些难以理解的资费标准。顺便问一下：&lt;strong&gt;什么时候能实现号码携带？&lt;/strong&gt;&lt;/p&gt;
	&lt;p&gt;评论数量(0) | &lt;a href=&quot;http://snsnow.com/blog/incomprehensible-rates/#comments&quot; target=&quot;_blank&quot;&gt;我想对这篇文章说几句&lt;/a&gt;&lt;br /&gt;
	本文网址：&lt;a href=&quot;http://snsnow.com/blog/incomprehensible-rates/&quot; target=&quot;_blank&quot;&gt;http://snsnow.com/blog/incomprehensible-rates/&lt;/a&gt;
	&lt;/p&gt;
	&lt;p style=&quot;border-top: 1px solid #ccc;padding:8px 20px 0 0;margin:20px 0 0 0;&quot;&gt;
	©  &lt;a href=&quot;http://snsnow.com/blog/&quot; target=&quot;_blank&quot;&gt;不谢的紫藤花&lt;/a&gt;, 2008. | Add to &lt;a href=&quot;http://delicious.com/save?url=http%3A//snsnow.com/blog/incomprehensible-rates/&amp;amp;title=%E9%9A%BE%E4%BB%A5%E7%90%86%E8%A7%A3%E7%9A%84%E8%B5%84%E8%B4%B9%E6%A0%87%E5%87%86&quot; target=&quot;_blank&quot;&gt;del.icio.us&lt;/a&gt;
	&lt;/p&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://feeds.feedburner.com/%7Er/freeman/%7E4/349496425&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description><pubDate>Tue, 29 Jul 2008 22:31:32 +0800</pubDate><author>Freeman</author><guid isPermaLink="false">http://snsnow.com/blog/?p=133</guid><dc:creator>Freeman</dc:creator><fs:srclink>http://snsnow.com/blog/incomprehensible-rates/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><fs:itemid>feedsky/readshare/~5931956/139418753/4060402</fs:itemid></item><item><title>memcached全面剖析–4. memcached的分布式算法</title><link>http://tech.idv2.com/2008/07/24/memcached-004/</link><xg:id>292808176</xg:id><description>&lt;p&gt;发表日：2008/7/23 &lt;br /&gt;
作者：长野雅广(Masahiro Nagano) &lt;br /&gt;
原文链接：&lt;a href=&quot;http://gihyo.jp/dev/feature/01/memcached/0004&quot; target=&quot;_blank&quot;&gt;http://gihyo.jp/dev/feature/01/memcached/0004&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;前几次的文章在这里：&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;第1次：&lt;a href=&quot;http://tech.idv2.com/2008/07/10/memcached-001/&quot; target=&quot;_blank&quot;&gt;http://tech.idv2.com/2008/07/10/memcached-001/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;第2次：&lt;a href=&quot;http://tech.idv2.com/2008/07/11/memcached-002/&quot; target=&quot;_blank&quot;&gt;http://tech.idv2.com/2008/07/11/memcached-002/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;第3次：&lt;a href=&quot;http://tech.idv2.com/2008/07/16/memcached-003/&quot; target=&quot;_blank&quot;&gt;http://tech.idv2.com/2008/07/16/memcached-003/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;我是Mixi的长野。
&lt;a href=&quot;http://tech.idv2.com/2008/07/11/memcached-002/&quot; target=&quot;_blank&quot;&gt;第2次&lt;/a&gt;、
&lt;a href=&quot;http://tech.idv2.com/2008/07/16/memcached-003/&quot; target=&quot;_blank&quot;&gt;第3次&lt;/a&gt;
由前坂介绍了memcached的内部情况。本次不再介绍memcached的内部结构，
开始介绍memcached的分布式。&lt;/p&gt;
&lt;div class=&quot;contents&quot;&gt;
&lt;a id=&quot;contents_28&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_0&quot; target=&quot;_blank&quot;&gt;  memcached的分布式&lt;/a&gt;
&lt;ul class=&quot;list2&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_1&quot; target=&quot;_blank&quot;&gt;  memcached的分布式是什么意思？&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_2&quot; target=&quot;_blank&quot;&gt;  Cache::Memcached的分布式方法&lt;/a&gt;
&lt;ul class=&quot;list2&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_3&quot; target=&quot;_blank&quot;&gt;  根据余数计算分散&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_4&quot; target=&quot;_blank&quot;&gt;  根据余数计算分散的缺点&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_5&quot; target=&quot;_blank&quot;&gt;  Consistent Hashing&lt;/a&gt;
&lt;ul class=&quot;list2&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_6&quot; target=&quot;_blank&quot;&gt;  Consistent Hashing的简单说明&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_7&quot; target=&quot;_blank&quot;&gt;  支持Consistent Hashing的函数库&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tech.idv2.com/2008/07/24/memcached-004/#content_28_8&quot; target=&quot;_blank&quot;&gt;  总结&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;

&lt;h2 id=&quot;content_28_0&quot;&gt;memcached的分布式&lt;/h2&gt;
&lt;p&gt;正如&lt;a href=&quot;http://tech.idv2.com/2008/07/10/memcached-001/&quot; target=&quot;_blank&quot;&gt;第1次&lt;/a&gt;中介绍的那样，
memcached虽然称为“分布式”缓存服务器，但服务器端并没有“分布式”功能。
服务器端仅包括
&lt;a href=&quot;http://tech.idv2.com/2008/07/11/memcached-002/&quot; target=&quot;_blank&quot;&gt;第2次&lt;/a&gt;、
&lt;a href=&quot;http://tech.idv2.com/2008/07/16/memcached-003/&quot; target=&quot;_blank&quot;&gt;第3次&lt;/a&gt;
前坂介绍的内存存储功能，其实现非常简单。
至于memcached的分布式，则是完全由客户端程序库实现的。
这种分布式是memcached的最大特点。&lt;/p&gt;

&lt;h3 id=&quot;content_28_1&quot;&gt;memcached的分布式是什么意思？&lt;/h3&gt;
&lt;p&gt;这里多次使用了“分布式”这个词，但并未做详细解释。
现在开始简单地介绍一下其原理，各个客户端的实现基本相同。&lt;/p&gt;
&lt;p&gt;下面假设memcached服务器有node1～node3三台，
应用程序要保存键名为“tokyo”“kanagawa”“chiba”“saitama”“gunma”
的数据。&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0004-01.png&quot; alt=&quot;memcached-0004-01.png&quot; title=&quot;memcached-0004-01.png&quot; width=&quot;441&quot; height=&quot;405&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图1 分布式简介：准备&lt;/p&gt;
&lt;p&gt;首先向memcached中添加“tokyo”。将“tokyo”传给客户端程序库后，
客户端实现的算法就会根据“键”来决定保存数据的memcached服务器。
服务器选定后，即命令它保存“tokyo”及其值。&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0004-02.png&quot; alt=&quot;memcached-0004-02.png&quot; title=&quot;memcached-0004-02.png&quot; width=&quot;445&quot; height=&quot;454&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图2 分布式简介：添加时&lt;/p&gt;
&lt;p&gt;同样，“kanagawa”“chiba”“saitama”“gunma”都是先选择服务器再保存。&lt;/p&gt;
&lt;p&gt;接下来获取保存的数据。获取时也要将要获取的键“tokyo”传递给函数库。
函数库通过与数据保存时相同的算法，根据“键”选择服务器。
使用的算法相同，就能选中与保存时相同的服务器，然后发送get命令。
只要数据没有因为某些原因被删除，就能获得保存的值。&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0004-03.png&quot; alt=&quot;memcached-0004-03.png&quot; title=&quot;memcached-0004-03.png&quot; width=&quot;449&quot; height=&quot;457&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图3 分布式简介：获取时&lt;/p&gt;
&lt;p&gt;这样，将不同的键保存到不同的服务器上，就实现了memcached的分布式。
memcached服务器增多后，键就会分散，即使一台memcached服务器发生故障
无法连接，也不会影响其他的缓存，系统依然能继续运行。&lt;/p&gt;
&lt;p&gt;接下来介绍&lt;a href=&quot;http://tech.idv2.com/2008/07/10/memcached-001/&quot; target=&quot;_blank&quot;&gt;第1次&lt;/a&gt;
中提到的Perl客户端函数库Cache::Memcached实现的分布式方法。&lt;/p&gt;

&lt;h2 id=&quot;content_28_2&quot;&gt;Cache::Memcached的分布式方法&lt;/h2&gt;
&lt;p&gt;Perl的memcached客户端函数库Cache::Memcached是
memcached的作者Brad Fitzpatrick的作品，可以说是原装的函数库了。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/dist/Cache-Memcached/&quot; target=&quot;_blank&quot;&gt;Cache::Memcached - search.cpan.org&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;该函数库实现了分布式功能，是memcached标准的分布式方法。&lt;/p&gt;

&lt;h3 id=&quot;content_28_3&quot;&gt;根据余数计算分散&lt;/h3&gt;
&lt;p&gt;Cache::Memcached的分布式方法简单来说，就是“根据服务器台数的余数进行分散”。
求得键的整数哈希值，再除以服务器台数，根据其余数来选择服务器。&lt;/p&gt;
&lt;p&gt;下面将Cache::Memcached简化成以下的Perl脚本来进行说明。&lt;/p&gt;
&lt;pre&gt;use strict;
use warnings;
use String::CRC32;

my @nodes = ('node1','node2','node3');
my @keys = ('tokyo', 'kanagawa', 'chiba', 'saitama', 'gunma');

foreach my $key (@keys) {
    my $crc = crc32($key);             # CRC値
    my $mod = $crc % ( $#nodes + 1 );
    my $server = $nodes[ $mod ];       # 根据余数选择服务器
    printf &quot;%s =&amp;gt; %s\n&quot;, $key, $server;
}&lt;/pre&gt;
&lt;p&gt;Cache::Memcached在求哈希值时使用了CRC。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/dist/String-CRC32/&quot; target=&quot;_blank&quot;&gt;String::CRC32 - search.cpan.org&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;首先求得字符串的CRC值，根据该值除以服务器节点数目得到的余数决定服务器。
上面的代码执行后输入以下结果：&lt;/p&gt;
&lt;pre&gt;tokyo       =&amp;gt; node2
kanagawa =&amp;gt; node3
chiba       =&amp;gt; node2
saitama   =&amp;gt; node1
gunma     =&amp;gt; node1&lt;/pre&gt;
&lt;p&gt;根据该结果，“tokyo”分散到node2，“kanagawa”分散到node3等。
多说一句，当选择的服务器无法连接时，Cache::Memcached会将连接次数
添加到键之后，再次计算哈希值并尝试连接。这个动作称为rehash。
不希望rehash时可以在生成Cache::Memcached对象时指定“rehash =&amp;gt; 0”选项。&lt;/p&gt;

&lt;h3 id=&quot;content_28_4&quot;&gt;根据余数计算分散的缺点&lt;/h3&gt;
&lt;p&gt;余数计算的方法简单，数据的分散性也相当优秀，但也有其缺点。
那就是当添加或移除服务器时，缓存重组的代价相当巨大。
添加服务器后，余数就会产生巨变，这样就无法获取与保存时相同的服务器，
从而影响缓存的命中率。用Perl写段代码来验证其代价。&lt;/p&gt;
&lt;pre&gt;use strict;
use warnings;
use String::CRC32;

my @nodes = @ARGV;
my @keys = ('a'..'z');
my %nodes;

foreach my $key ( @keys ) {
    my $hash = crc32($key);
    my $mod = $hash % ( $#nodes + 1 );
    my $server = $nodes[ $mod ];
    push @{ $nodes{ $server } }, $key;
}

foreach my $node ( sort keys %nodes ) {
    printf &quot;%s: %s\n&quot;, $node,  join &quot;,&quot;, @{ $nodes{$node} };
}&lt;/pre&gt;
&lt;p&gt;这段Perl脚本演示了将“a”到“z”的键保存到memcached并访问的情况。
将其保存为mod.pl并执行。&lt;/p&gt;
&lt;p&gt;首先，当服务器只有三台时：&lt;/p&gt;
&lt;pre&gt;$ mod.pl node1 node2 nod3
node1: a,c,d,e,h,j,n,u,w,x
node2: g,i,k,l,p,r,s,y
node3: b,f,m,o,q,t,v,z&lt;/pre&gt;
&lt;p&gt;结果如上，node1保存a、c、d、e……，node2保存g、i、k……，
每台服务器都保存了8个到10个数据。&lt;/p&gt;
&lt;p&gt;接下来增加一台memcached服务器。&lt;/p&gt;
&lt;pre&gt;$ mod.pl node1 node2 node3 node4
node1: d,f,m,o,t,v
node2: b,i,k,p,r,y
node3: e,g,l,n,u,w
node4: a,c,h,j,q,s,x,z&lt;/pre&gt;
&lt;p&gt;添加了node4。可见，只有d、i、k、p、r、y命中了。像这样，添加节点后
键分散到的服务器会发生巨大变化。26个键中只有六个在访问原来的服务器，
其他的全都移到了其他服务器。命中率降低到23%。在Web应用程序中使用memcached时，
在添加memcached服务器的瞬间缓存效率会大幅度下降，负载会集中到数据库服务器上，
有可能会发生无法提供正常服务的情况。&lt;/p&gt;
&lt;p&gt;mixi的Web应用程序运用中也有这个问题，导致无法添加memcached服务器。
但由于使用了新的分布式方法，现在可以轻而易举地添加memcached服务器了。
这种分布式方法称为 Consistent Hashing。&lt;/p&gt;

&lt;h2 id=&quot;content_28_5&quot;&gt;Consistent Hashing&lt;/h2&gt;
&lt;p&gt;关于Consistent Hashing的思想，mixi株式会社的开发blog等许多地方都介绍过，
这里只简单地说明一下。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://alpha.mixi.co.jp/blog/?p=158&quot; target=&quot;_blank&quot;&gt;mixi Engineers' Blog - スマートな分散で快適キャッシュライフ &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.hyuki.com/yukiwiki/wiki.cgi?ConsistentHashing&quot; target=&quot;_blank&quot;&gt;ConsistentHashing - コンシステント ハッシュ法&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;h3 id=&quot;content_28_6&quot;&gt;Consistent Hashing的简单说明&lt;/h3&gt;
&lt;p&gt;Consistent Hashing如下所示：首先求出memcached服务器（节点）的哈希值，
并将其配置到0～2&lt;sup&gt;32&lt;/sup&gt;的圆（continuum）上。
然后用同样的方法求出存储数据的键的哈希值，并映射到圆上。
然后从数据映射到的位置开始顺时针查找，将数据保存到找到的第一个服务器上。
如果超过2&lt;sup&gt;32&lt;/sup&gt;仍然找不到服务器，就会保存到第一台memcached服务器上。&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0004-04.png&quot; alt=&quot;memcached-0004-04.png&quot; title=&quot;memcached-0004-04.png&quot; width=&quot;521&quot; height=&quot;409&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图4 Consistent Hashing：基本原理&lt;/p&gt;
&lt;p&gt;从上图的状态中添加一台memcached服务器。余数分布式算法由于保存键的服务器会发生巨大变化
而影响缓存的命中率，但Consistent Hashing中，只有在continuum上增加服务器的地点逆时针方向的
第一台服务器上的键会受到影响。&lt;/p&gt;
&lt;div class=&quot;img_margin&quot; style=&quot;text-align:left&quot;&gt;&lt;img src=&quot;http://xgimg.com/downloadPicture.php?http://tech.idv2.com/wp-content/uploads/2008/07/memcached-0004-05.png&quot; alt=&quot;memcached-0004-05.png&quot; title=&quot;memcached-0004-05.png&quot; width=&quot;518&quot; height=&quot;439&quot; /&gt;&lt;/div&gt;

&lt;p&gt;图5 Consistent Hashing：添加服务器&lt;/p&gt;
&lt;p&gt;因此，Consistent Hashing最大限度地抑制了键的重新分布。
而且，有的Consistent Hashing的实现方法还采用了虚拟节点的思想。
使用一般的hash函数的话，服务器的映射地点的分布非常不均匀。
因此，使用虚拟节点的思想，为每个物理节点（服务器）
在continuum上分配100～200个点。这样就能抑制分布不均匀，
最大限度地减小服务器增减时的缓存重新分布。&lt;/p&gt;
&lt;p&gt;通过下文中介绍的使用Consistent Hashing算法的memcached客户端函数库进行测试的结果是，
由服务器台数（n）和增加的服务器台数（m）计算增加服务器后的命中率计算公式如下：&lt;/p&gt;
&lt;p&gt;(1 - n/(n+m)) * 100&lt;/p&gt;

&lt;h3 id=&quot;content_28_7&quot;&gt;支持Consistent Hashing的函数库&lt;/h3&gt;
&lt;p&gt;本连载中多次介绍的Cache::Memcached虽然不支持Consistent Hashing，
但已有几个客户端函数库支持了这种新的分布式算法。
第一个支持Consistent Hashing和虚拟节点的memcached客户端函数库是
名为libketama的PHP库，由last.fm开发。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://www.lastfm.jp/user/RJ/journal/2007/04/10/rz_libketama_-_a_consistent_hashing_algo_for_memcache_clients&quot; target=&quot;_blank&quot;&gt;libketama - a consistent hashing algo for memcache clients – RJ ブログ - Users at Last.fm &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;至于Perl客户端，连载的&lt;a href=&quot;http://tech.idv2.com/2008/07/11/memcached-001/&quot; target=&quot;_blank&quot;&gt;第1次&lt;/a&gt;
中介绍过的Cache::Memcached::Fast和Cache::Memcached::libmemcached支持
Consistent Hashing。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/dist/Cache-Memcached-Fast/&quot; target=&quot;_blank&quot;&gt;Cache::Memcached::Fast - search.cpan.org &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/dist/Cache-Memcached-libmemcached/&quot; target=&quot;_blank&quot;&gt;Cache::Memcached::libmemcached - search.cpan.org &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;两者的接口都与Cache::Memcached几乎相同，如果正在使用Cache::Memcached，
那么就可以方便地替换过来。Cache::Memcached::Fast重新实现了libketama，
使用Consistent Hashing创建对象时可以指定ketama_points选项。&lt;/p&gt;
&lt;pre&gt;my $memcached = Cache::Memcached::Fast-&amp;gt;new({
    servers =&amp;gt; [&quot;192.168.0.1:11211&quot;,&quot;192.168.0.2:11211&quot;],
    ketama_points =&amp;gt; 150
});&lt;/pre&gt;
&lt;p&gt;另外，Cache::Memcached::libmemcached 是一个使用了Brain Aker开发的C函数库libmemcached的Perl模块。
libmemcached本身支持几种分布式算法，也支持Consistent Hashing，
其Perl绑定也支持Consistent Hashing。&lt;/p&gt;
&lt;ul class=&quot;list1&quot; style=&quot;padding-left:16px;margin-left:16px&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://tangent.org/552/libmemcached.html&quot; target=&quot;_blank&quot;&gt;Tangent Software: libmemcached &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;h2 id=&quot;content_28_8&quot;&gt;总结&lt;/h2&gt;
&lt;p&gt;本次介绍了memcached的分布式算法，主要有memcached的分布式是由客户端函数库实现，
以及高效率地分散数据的Consistent Hashing算法。下次将介绍mixi在memcached应用方面的一些经验，
和相关的兼容应用程序。&lt;/p&gt;

&lt;br /&gt;</description><pubDate>Thu, 24 Jul 2008 21:35:09 +0800</pubDate><author>charlee</author><guid isPermaLink="false">http://tech.idv2.com/2008/07/24/memcached-004/</guid><dc:creator>charlee</dc:creator><fs:srclink>http://tech.idv2.com/2008/07/24/memcached-004/</fs:srclink><fs:srcfeed>http://www.xianguo.com/service/sharerss/6365</fs:srcfeed><f