blob: b29744bff23d60dcb27dbdff2711b26521af2f11 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>User Guide-zh - Dubbo - Alibaba Open Sesame</title>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta charset="UTF-8">
<!-- Deprecated since 3.4. To be removed in a future version of Confluence; use AJS.Confluence.getContextPath() -->
<meta id="confluence-context-path" name="confluence-context-path" content="/wiki">
<meta name="ajs-context-path" content="/wiki">
<meta name="ajs-version-number" content="3.5.9">
<meta name="ajs-build-number" content="2166">
<meta id="atlassian-token" name="atlassian-token" content="c116db80711201b36e2067aa83f3b044c2d5a30e">
<meta id="confluence-space-key" name="confluence-space-key" content="dubbo">
<meta name="ajs-remote-user" content="">
<meta name="ajs-static-resource-url-prefix" content="/wiki/s/en/2166/34/_">
<script type="text/javascript">
// Deprecated global variables. To be removed in a future version of Confluence.
var contextPath = '/wiki';
</script>
<!-- include system css resources -->
<link type="text/css" rel="stylesheet" href="batch.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/css/batch.css" media="all">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="batch.css-ieonly=true.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/css/batch.css?ieonly=true" media="all">
<![endif]-->
<link type="text/css" rel="stylesheet" href="batch.css-media=print.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/css/batch.css?media=print" media="print">
<link type="text/css" rel="stylesheet" href="com.atlassian.confluence.ext.newcode-macro-plugin-syntaxhighlighter.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9.10/_/download/batch/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter.css" media="all">
<link type="text/css" rel="stylesheet" href="com.atlassian.confluence.ext.newcode-macro-plugin-sh-theme-confluence.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9.10/_/download/batch/com.atlassian.confluence.ext.newcode-macro-plugin:sh-theme-confluence/com.atlassian.confluence.ext.newcode-macro-plugin:sh-theme-confluence.css" media="all">
<link type="text/css" rel="stylesheet" href="confluence-forms.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/resources/confluence.web.resources:aui-forms/confluence-forms.css" media="all">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="confluence.web.resources-aui-forms.css-ieonly=true.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/batch/confluence.web.resources:aui-forms/confluence.web.resources:aui-forms.css?ieonly=true" media="all">
<![endif]-->
<link type="text/css" rel="stylesheet" href="com.atlassian.confluence.plugins.share-page-mail-page-resources.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.8/_/download/batch/com.atlassian.confluence.plugins.share-page:mail-page-resources/com.atlassian.confluence.plugins.share-page:mail-page-resources.css" media="all">
<link type="text/css" rel="stylesheet" href="confluence.web.resources-view-comment.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/batch/confluence.web.resources:view-comment/confluence.web.resources:view-comment.css" media="all">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="confluence.web.resources-view-comment.css-ieonly=true.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/batch/confluence.web.resources:view-comment/confluence.web.resources:view-comment.css?ieonly=true" media="all">
<![endif]-->
<link type="text/css" rel="stylesheet" href="confluence.macros.advanced-fancy-box.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.16/_/download/batch/confluence.macros.advanced:fancy-box/confluence.macros.advanced:fancy-box.css" media="all">
<link type="text/css" rel="stylesheet" href="com.atlassian.confluence.plugins.drag-and-drop-support.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0.16/_/download/batch/com.atlassian.confluence.plugins.drag-and-drop:support/com.atlassian.confluence.plugins.drag-and-drop:support.css" media="all">
<link type="text/css" rel="stylesheet" href="com.atlassian.plugins.shortcuts.atlassian-shortcuts-module-shortcuts.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/0.8/_/download/batch/com.atlassian.plugins.shortcuts.atlassian-shortcuts-module:shortcuts/com.atlassian.plugins.shortcuts.atlassian-shortcuts-module:shortcuts.css" media="all">
<link type="text/css" rel="stylesheet" href="com.atlassian.confluence.keyboardshortcuts-confluence-keyboard-shortcuts.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/3.5.9/_/download/batch/com.atlassian.confluence.keyboardshortcuts:confluence-keyboard-shortcuts/com.atlassian.confluence.keyboardshortcuts:confluence-keyboard-shortcuts.css" media="all">
<!-- end system css resources -->
<link rel="stylesheet" href="combined.css-spaceKey=dubbo.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/3/_/styles/combined.css?spaceKey=dubbo" type="text/css">
<meta name="confluence-request-time" content="1392025429196">
<meta name="loggedInUsername" content="">
<meta name="ajs-keyboardshortcut-hash" content="bf02a79603372a43d395a0a429bdf66">
<!-- Deprecated since 3.4. To be removed in a future version of Confluence; use atl.header -->
<script type="text/x-template" title="share-content-popup">
<form action="#" method="post" class="aui share-content-popup">
<fieldset>
<label for="users">User name or email</label>
<div class="autocomplete-user-target">
<input class="text autocomplete-sharepage" id="users" data-max="10" data-dropdown-target=".autocomplete-user-target" data-none-message="No matching user or email found"/>
</div>
<ol class="recipients">
</ol>
<div><label for="note">Note</label></div>
<textarea class="textarea" id="note" placeholder="Add an optional note"/>
</fieldset>
<div class="button-panel">
<div class="progress-messages-icon"></div>
<div class="progress-messages">
</div>
<input class="button submit" type="submit" value="Share" disabled/>
<a class="close-dialog" href="#">Cancel</a>
</div>
</form>
</script>
<script type="text/x-template" title="share-content-popup-recipient-username">
<li data-username="{username}" style="display: none">
<span>
<img src="{thumbnailLink.href}" title="{title}">
<span>{title}</span>
<span class="remove-recipient"/>
</span>
</li>
</script>
<script type="text/x-template" title="share-content-popup-recipient-email">
<li data-email="{email}" style="display: none">
<span>
<img src="{icon}" title="{email}">
<span>{email}</span>
<span class="remove-recipient"/>
</span>
</li>
</script>
<meta name="ajs-use-keyboard-shortcuts" content="true">
<link rel="shortcut icon" href="/wiki/favicon.ico">
<link rel="icon" type="image/png" href="/wiki/s/en/2166/34/_/images/logo/confluence_16.png">
<link rel="search" type="application/opensearchdescription+xml" href="/wiki/opensearch/osd.action" title="Alibaba Open Sesame"/>
<!-- include system javascript resources -->
<script type="text/javascript" src="batch.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/batch.js" ></script>
<script type="text/javascript" src="com.atlassian.confluence.ext.newcode-macro-plugin-syntaxhighlighter.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9.10/_/download/batch/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter.js" ></script>
<script type="text/javascript" src="com.atlassian.confluence.ext.newcode-macro-plugin-syntaxhighlighter-brushes.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9.10/_/download/batch/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter-brushes/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter-brushes.js" ></script>
<script type="text/javascript" src="com.atlassian.confluence.plugins.share-page-mail-page-resources.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.8/_/download/batch/com.atlassian.confluence.plugins.share-page:mail-page-resources/com.atlassian.confluence.plugins.share-page:mail-page-resources.js" ></script>
<script type="text/javascript" src="confluence.macros.advanced-fancy-box.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.16/_/download/batch/confluence.macros.advanced:fancy-box/confluence.macros.advanced:fancy-box.js" ></script>
<script type="text/javascript" src="confluence.macros.advanced-thumbnail-images.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.16/_/download/batch/confluence.macros.advanced:thumbnail-images/confluence.macros.advanced:thumbnail-images.js" ></script>
<script type="text/javascript" src="com.atlassian.confluence.plugins.drag-and-drop-support.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0.16/_/download/batch/com.atlassian.confluence.plugins.drag-and-drop:support/com.atlassian.confluence.plugins.drag-and-drop:support.js" ></script>
<script type="text/javascript" src="com.atlassian.confluence.plugins.drag-and-drop-drag-and-drop-for-view-content.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0.16/_/download/batch/com.atlassian.confluence.plugins.drag-and-drop:drag-and-drop-for-view-content/com.atlassian.confluence.plugins.drag-and-drop:drag-and-drop-for-view-content.js" ></script>
<script type="text/javascript" src="com.atlassian.confluence.plugins.doctheme-splitter.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9/_/download/batch/com.atlassian.confluence.plugins.doctheme:splitter/com.atlassian.confluence.plugins.doctheme:splitter.js" ></script>
<script type="text/javascript" src="com.atlassian.plugins.shortcuts.atlassian-shortcuts-module-shortcuts.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/0.8/_/download/batch/com.atlassian.plugins.shortcuts.atlassian-shortcuts-module:shortcuts/com.atlassian.plugins.shortcuts.atlassian-shortcuts-module:shortcuts.js" ></script>
<script type="text/javascript" src="com.atlassian.confluence.keyboardshortcuts-confluence-keyboard-shortcuts.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/3.5.9/_/download/batch/com.atlassian.confluence.keyboardshortcuts:confluence-keyboard-shortcuts/com.atlassian.confluence.keyboardshortcuts:confluence-keyboard-shortcuts.js" ></script>
<script type="text/javascript" src="legacy.confluence.web.resources-prototype.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/batch/legacy.confluence.web.resources:prototype/legacy.confluence.web.resources:prototype.js" ></script>
<!-- end system javascript resources -->
<link rel="canonical" href="http://code.alibabatech.com/wiki/display/dubbo/User+Guide-zh">
<link rel="shortlink" href="http://code.alibabatech.com/wiki/x/zQdq">
<meta name="wikilink" content="[dubbo:User Guide-zh]">
<meta name="page-version" content="225">
</head>
<body onload="placeFocus()"
id="com-atlassian-confluence" class="theme-default ">
<ul id="assistive-skip-links" class="assistive">
<li><a href="#title-heading">Skip to content</a></li>
<li><a href="#breadcrumbs">Skip to breadcrumbs</a></li>
<li><a href="#header-menu-bar">Skip to header menu</a></li>
<li><a href="#navigation">Skip to action menu</a></li>
<li><a href="#quick-search-query">Skip to quick search</a></li>
</ul>
<div id="page">
<div id="full-height-container">
<fieldset class="hidden parameters">
<input type="hidden" id="shortcutDialogTip" value="Shortcut tip: Pressing <b>{shortcut}</b> also opens this dialog box">
<input type="hidden" title="i18n.close.name" value="Close">
<input type="hidden" title="i18n.cancel.name" value="Cancel">
</fieldset><fieldset class="hidden parameters">
<input type="hidden" id="statusDialogHeading" value="What are you working on?">
<input type="hidden" id="statusDialogAccessibilityLabel" value="Enter your status (140 character limit)">
<input type="hidden" id="statusDialogLatestLabel" value="Last update:">
<input type="hidden" id="statusDialogUpdateButtonLabel" value="Update">
<input type="hidden" id="statusDialogCancelButtonLabel" value="Cancel">
</fieldset>
<fieldset class="hidden parameters">
<input type="hidden" id="globalSettingsAttachmentMaxSize" value="10485760">
<input type="hidden" id="userLocale" value="en_GB">
<input type="hidden" id="staticResourceUrlPrefix" value="/wiki/s/en/2166/34/_">
<input type="hidden" id="contextPath" value="/wiki">
</fieldset>
<div id="header" class="" style="display: none">
<form id="quick-search" class="quick-search" method="get" action="http://10.20.160.198/wiki/dosearchsite.action">
<fieldset>
<label class="assistive" for="quick-search-query">Quick Search</label>
<input class="quick-search-query" id="quick-search-query" type="text" accessKey="q" autocomplete="off" name="queryString" size="25" title="Quick Search" />
<input class="quick-search-submit" id="quick-search-submit" type="submit" value="Search" />
<div class="aui-dd-parent quick-nav-drop-down"><!-- Quick nav appears here --></div>
</fieldset>
<fieldset class="hidden parameters">
<input type="hidden" id="quickNavEnabled" value="true" />
</fieldset>
</form>
<ul id="header-menu-bar" class="ajs-menu-bar">
<li class="normal ajs-menu-item">
<a id="browse-menu-link" class="browse trigger ajs-menu-title" href="#"><span><span>Browse</span></span></a> <div class="assistive ajs-drop-down">
<ul id="browse-menu-link-leading" class="section-leading first">
<li>
<a id="space-pages-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/listpages.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/listpages.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/pages/listpages.action?key=dubbo" class="" title="Browse pages in the Dubbo space">
<span>Pages</span></a> </li>
<li>
<a id="space-blogposts-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewrecentblogposts.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewrecentblogposts.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/pages/viewrecentblogposts.action?key=dubbo" class="" title="Browse blogs in the Dubbo space">
<span>Blog</span></a> </li>
<li>
<a id="space-labels-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/labels/listlabels-heatmap.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/labels/listlabels-heatmap.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/labels/listlabels-heatmap.action?key=dubbo" class="" title="Browse labels in the Dubbo space">
<span>Labels</span></a> </li>
<li>
<a id="space-attachments-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/spaces/listattachmentsforspace.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spaces/listattachmentsforspace.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/spaces/listattachmentsforspace.action?key=dubbo" class="" title="Browse attachments in the Dubbo space">
<span>Attachments</span></a> </li>
<li>
<a id="space-mail-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/spaces/viewmailarchive.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spaces/viewmailarchive.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/spaces/viewmailarchive.action?key=dubbo" class="" title="Browse mail in the Dubbo space">
<span>Mail</span></a> </li>
<li>
<a id="space-advanced-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/spaces/viewspacesummary.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spaces/viewspacesummary.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/spaces/viewspacesummary.action?key=dubbo" class="" title="Browse additional space functions in the Dubbo space">
<span>Advanced</span></a> </li>
<li>
<a href="javascript:if(confirm(%27http://10.20.160.198/wiki/spaces/usage/report.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spaces/usage/report.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/spaces/usage/report.action?key=dubbo" class="" title="">
<span>Activity</span></a> </li>
</ul>
<ul id="browse-menu-link-global" class="section-global">
<li>
<a id="whats-new-menu-link" href="javascript:if(confirm(%27http://docs.atlassian.com/confluence/docs-35/whatsnew/iframe \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://docs.atlassian.com/confluence/docs-35/whatsnew/iframe%27" tppabs="http://docs.atlassian.com/confluence/docs-35/whatsnew/iframe" class="" title="">
<span>What’s New</span></a> </li>
<li>
<a id="people-directory-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/peopledirectory.action \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/peopledirectory.action%27" tppabs="http://10.20.160.198/wiki/peopledirectory.action" class="" title="Browse the Confluence people directory">
<span>People Directory</span></a> </li>
<li>
<a id="space-directory-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/spacedirectory/view.action \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spacedirectory/view.action%27" tppabs="http://10.20.160.198/wiki/spacedirectory/view.action" class="" title="Browse the Confluence space directory">
<span>Space Directory</span></a> </li>
<li>
<a id="keyboard-shortcuts-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki%27" tppabs="http://10.20.160.198/wiki" class="" title="View available keyboard shortcuts">
<span>Keyboard Shortcuts</span></a> </li>
<li>
<a id="gadget-directory-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki%27" tppabs="http://10.20.160.198/wiki" class="user-item administration-link" title="Browse gadgets provided by Confluence">
<span>Confluence Gadgets</span></a> </li>
</ul>
</div>
</li>
<li class="ajs-menu-item normal">
<a id="login-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/login.action?os_destination=%2Fdisplay%2Fdubbo%2FUser%2BGuide-zh%3FfocusedCommentId%3D8355995 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/login.action?os_destination=%2Fdisplay%2Fdubbo%2FUser%2BGuide-zh%3FfocusedCommentId%3D8355995%27" tppabs="http://10.20.160.198/wiki/login.action?os_destination=%2Fdisplay%2Fdubbo%2FUser%2BGuide-zh%3FfocusedCommentId%3D8355995" class="user-item login-link" title="">
<span>Log In</span></a> </li>
</ul>
<ol id="breadcrumbs">
<li class="first" >
<span><a href="javascript:if(confirm(%27http://10.20.160.198/wiki/dashboard.action \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/dashboard.action%27" tppabs="http://10.20.160.198/wiki/dashboard.action" title="Go to Dashboard">Dashboard</a></span>
</li>
<li>
<span><a href="javascript:if(confirm(%27http://10.20.160.198/wiki/display/dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/display/dubbo%27" tppabs="http://10.20.160.198/wiki/display/dubbo">Dubbo</a></span>
</li>
<li>
<span><a href="Home-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Home-zh">Home-zh</a></span>
</li>
<li>
<span>User Guide-zh</span>
</li>
</ol>
</div><!-- \#header -->
<div id="main" >
<div id="navigation" class="content-navigation view" style="display: none">
<fieldset class="hidden parameters">
<input type="hidden" id="pageId" value="6948813">
</fieldset>
<ul class="ajs-menu-bar">
<li class="normal ajs-menu-item">
<a id="add-menu-link" class="add trigger ajs-menu-title" href="#"><span><span>Add</span></span></a> <div class="assistive ajs-drop-down">
<ul id="add-menu-link-page" class="section-page first">
<li>
<a id="add-comment-menu-link" href="User+Guide-zh-showComments=true&showCommentArea=true.htm#addcomment" tppabs="http://10.20.160.198/wiki/display/dubbo/User+Guide-zh?showComments=true&showCommentArea=true#addcomment" class="add-comment" title="Add a Comment">
<span>Comment</span></a> </li>
</ul>
</div>
</li>
<li class="normal ajs-menu-item">
<a id="action-menu-link" class="action trigger ajs-menu-title" href="#"><span><span>Tools</span></span></a> <div class="assistive ajs-drop-down">
<ul id="action-menu-link-primary" class="section-primary first">
<li>
<a id="view-attachments-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewpageattachments.action?pageId=6948813 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewpageattachments.action?pageId=6948813%27" tppabs="http://10.20.160.198/wiki/pages/viewpageattachments.action?pageId=6948813" class="action-view-attachments" accessKey="a" title="View Attachments">
<span><u>A</u>ttachments (0)</span></a> </li>
<li>
<a id="action-view-history-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewpreviousversions.action?pageId=6948813 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewpreviousversions.action?pageId=6948813%27" tppabs="http://10.20.160.198/wiki/pages/viewpreviousversions.action?pageId=6948813" class="action-view-history" title="">
<span>Page History</span></a> </li>
<li>
<a id="action-page-permissions-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813%27" tppabs="http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813" class="action-page-permissions" title="Edit restrictions">
<span>Restrictions</span></a> </li>
</ul>
<ul id="action-menu-link-secondary" class="section-secondary">
<li>
<a id="view-page-info-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813%27" tppabs="http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813" class="action-view-info" title="">
<span>Info</span></a> </li>
<li>
<a id="link-to-page-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813%27" tppabs="http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6948813" class="" title="Link to this Page">
<span>Link to this Page&hellip;</span></a> </li>
<li>
<a id="view-in-hierarchy-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6948813 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6948813#selectedPageInHierarchy%27" tppabs="http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6948813#selectedPageInHierarchy" class="" title="">
<span>View in Hierarchy</span></a> </li>
<li>
<a id="action-view-source-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewpagesrc.action?pageId=6948813 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewpagesrc.action?pageId=6948813%27" tppabs="http://10.20.160.198/wiki/pages/viewpagesrc.action?pageId=6948813" class="action-view-source popup-link" title="">
<span>View Wiki Markup</span></a> </li>
</ul>
</div>
</li>
</ul>
</div>
<h1 id="title-heading" class="pagetitle" style="display: none">
<a href="javascript:if(confirm(%27http://10.20.160.198/wiki/display/dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/display/dubbo%27" tppabs="http://10.20.160.198/wiki/display/dubbo"><img class="logo space custom" src="dubbo-version=5&modificationDate=1320723683000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/6324241/dubbo?version=5&modificationDate=1320723683000" alt=""></a>
</h1>
<div id="content" class="page view">
<div id="link-to-page-fields" class="hidden parameters">
<input type="hidden" id="linkToThisPageHeading" value="Link to this Page">
<input type="hidden" id="linkToThisPageLink" value="Link">
<input type="hidden" id="linkToThisPageTinyLink" value="Tiny Link">
<input type="hidden" id="linkToThisPageWikiMarkup" value="Wiki Markup">
<input type="hidden" id="linkToThisPageClose" value="Close">
</div>
<fieldset class="hidden parameters">
<input type="hidden" title="movePageDialogViewPageTitle" value="Move Page &ndash; &#8216;User Guide-zh&#8217;">
<input type="hidden" title="movePageDialogEditPageTitle" value="Set Page Location">
<input type="hidden" title="movePageDialogMoveButton" value="Move">
<input type="hidden" title="movePageDialogCancelButton" value="Cancel">
<input type="hidden" title="movePageDialogBrowsePanelTip" value="Click to select the new parent page for this page and its children.">
<input type="hidden" title="movePageDialogSearchPanel" value="Search">
<input type="hidden" title="movePageDialogHistoryPanel" value="Recently Viewed">
<input type="hidden" title="movePageDialogHistoryNoResults" value="There were no recently viewed pages found.">
<input type="hidden" title="movePageDialogLocationPanel" value="Known Location">
<input type="hidden" title="movePageDialogLocationNotFound" value="The specified page was not found.">
<input type="hidden" title="movePageDialogBrowsePanel" value="Browse">
<input type="hidden" title="movePageDialogPanelLoadErrorMsg" value="Error reading the panel content from the server.">
<input type="hidden" title="movePageDialogPanelLoadErrorTip" value="You could try reloading the page and launching the dialog again.">
<input type="hidden" title="movePageDialogPanelLoadErrorStatus" value="HTTP Status">
<input type="hidden" title="movePageDialogNoSelectionErrorMsg" value="You must make a selection in the tree before you can move the page.">
<input type="hidden" title="movePageDialogSearchError" value="Failed to retrieve search results from the server.">
<input type="hidden" title="movePageDialogSearchNoResults" value="There were no pages found containing <b>{0}</b>.">
<input type="hidden" title="movePageDialogSearchResultCount" value="Showing <b>{0}</b>-<b>{1}</b> of <b>{2}</b> pages containing <b>{3}</b>.">
<input type="hidden" title="movePageDialogMoveFailed" value="Move failed. There was a problem contacting the server.">
<input type="hidden" title="movePageDialogCannotChangeSpace" value="You cannot move this page to another space because you do not have permission to remove it from this space.">
<input type="hidden" title="pageTitle" value="User Guide-zh"/>
<input type="hidden" title="parentPageTitle" value="Home-zh"/>
<input type="hidden" title="fromPageTitle" value=""/>
<input type="hidden" title="spaceKey" value="dubbo"/>
<input type="hidden" title="spaceName" value="Dubbo"/>
<input type="hidden" title="movePageDialogInvalidLocation" value="You cannot move a page to be underneath itself or its children."/>
<input type="hidden" title="movePageDialogOrderingTitle" value="Page Ordering"/>
<input type="hidden" title="movePageDialogBackButton" value="Back"/>
<input type="hidden" title="movePageDialogMoveAndOrderButton" value="Reorder"/>
<input type="hidden" title="movePageDialogNextButton" value="Move"/>
</fieldset>
<script type="text/x-template" title="movePageDialog">
<div class="row information">
<div class="inner">
<div class="element">
Specify the new parent page for this page and its children by space and title.
</div>
</div>
</div>
<div class="form">
<fieldset>
<legend class="assistive"><span>Change the Parent Page to a Known Page</span></legend>
<div class="row">
<label for="new-space">New space:</label>
<div class="value new-space-value">
<input id="new-space-key" name="new-space-key" type="hidden" value="dubbo">
<span class="space-input">
<input id="new-space" name="new-space" value="Dubbo" disabled="disabled">
</span>
<span class="description warning">You cannot move this page to another space because you do not have permission to remove it from this space.</span>
<div class="new-space-dropdown aui-dd-parent autocomplete"></div>
</div>
</div>
<div class="row">
<label for="new-parent-page">New parent page:</label>
<div class="value new-parent-page-value">
<span class="page-input">
<input id="new-parent-page" name="new-parent-page" value="Home-zh">
</span>
<span class="description">Start typing a page title to see a list of suggestions.</span>
<div class="new-parent-page-dropdown aui-dd-parent autocomplete"></div>
</div>
</div>
</fieldset>
</div>
<div class="location-info">
<div class="row">
<label>Current location:</label>
<div class="value breadcrumbs-container">
<div class="breadcrumbs-line">
<ul id="current-parent-breadcrumbs" class="breadcrumbs">
</ul>
</div>
</div>
</div>
<div class="row">
<label>New location:</label>
<div class="value breadcrumbs-container">
<div class="breadcrumbs-line">
<ul id="new-parent-breadcrumbs" class="breadcrumbs">
</ul>
</div>
</div>
</div>
</div>
</script>
<script type="text/x-template" title="movePageErrors">
<div id="move-errors" class="hidden warning"></div>
</script>
<script type="text/x-template" title="movePageBreadcrumb">
<li><a class="{2}" title="{3}" tabindex="-1"><span>{0}</span></a></li>
</script>
<script type="text/x-template" title="movePageBreadcrumbLoading">
<li class="loading"><span>Loading breadcrumbs&hellip;</span></li>
</script>
<script type="text/x-template" title="movePageBreadcrumbError">
<li class="warning last"><span>Error retrieving breadcrumbs.</span></li>
</script>
<script type="text/x-template" title="movePageNoMatchingPages">
<ol><li><span class="warning">No matching pages found.</span></li></ol>
</script>
<script type="text/x-template" title="movePageNoMatchingSpaces">
<ol><li><span class="warning">No matching spaces found.</span></li></ol>
</script>
<script type="text/x-template" title="movePageSearchPanel">
<div class="row information">
<div class="inner">
<div class="element">
Search for and select the new parent page for this page and its children.
</div>
</div>
</div>
<div id="move-page-search-container" class="row">
<div class="search-form">
<fieldset>
<legend class="assistive"><span>Search for a New Parent Page</span></legend>
<label for="move-page-search-query" class="assistive">Search keywords</label>
<input class="search-query" id="move-page-search-query">
<label for="move-page-search-space" class="assistive">Search in space</label>
<select id="move-page-search-space" class="search-space" disabled="disabled">
<option value="dubbo" selected="selected">Dubbo</option>
</select>
<input type="button" value="Search">
<div class="description warning">You cannot move this page to another space because you do not have permission to remove it from this space.</div>
</fieldset>
</div>
<div class="search-results">
</div>
</div>
</script>
<script type="text/x-template" title="movePageSearchResultsLoading">
<div class="searching">Searching…</div>
</script>
<script type="text/x-template" title="movePageHistoryPanel">
<div class="row information">
<div class="inner">
<div class="element">
Select the new parent page for this page and its children from your history.
</div>
</div>
</div>
<div id="move-page-search-container" class="row">
<div class="search-results">
</div>
</div>
</script>
<script type="text/x-template" title="movePageHistoryLoading">
<div class="searching">Loading…</div>
</script>
<script type="text/x-template" title="movePageBrowsePanel">
<div class="row information">
<div class="inner">
<div class="element">
Click to select the new parent page for this page and its children.
</div>
</div>
</div>
<div class="tree"></div>
</script>
<script type="text/x-template" title="movePagePanelLoading">
<span>Loading…</span>
</script>
<script type="text/x-template" title="movePageBrowsePanelSpace">
<ul><li id='tree-root-node-item' class='root-node-list-item'><a class='root-node' href='#'>{0}</a></li></ul>
</script>
<script type="text/x-template" title="orderingPagePanel">
<div id="orderingPlaceHolder"></div>
</script>
<script type="text/x-template" title="reorderCheckbox">
<span id="reorderRequirement"><input id="reorderCheck" type="checkbox" name="reorderFlag" title="Choose the position of this page within the list of child pages."/><label for="reorderCheck" title="Choose the position of this page within the list of child pages.">Reorder</label></span>
</script>
<script type="text/x-template" title="move-help-link">
<div class="dialog-help-link">
<a href="http://docs.atlassian.com/confluence/docs-35/Moving+a+Page" target="_blank">Help</a>
</div>
</script>
<script type="text/x-template" title="searchResultsGrid">
<table>
<thead>
<tr class="header">
<th class="search-result-title">Page Title</th>
<th class="search-result-space">Space</th>
<th class="search-result-date">Updated</th>
</tr>
</thead>
</table>
</script>
<script type="text/x-template" title="searchResultsGridCount">
<p class="search-result-count">{0}</p>
</script>
<script type="text/x-template" title="searchResultsGridRow">
<tr class="search-result">
<th class="search-result-title"><a href="{1}" class="content-type-{2}"><span>{0}</span></a></th>
<td class="search-result-space"><a class="space" href="http://10.20.160.198/wiki/display/{4}/" title="{3}">{3}</a></td>
<td class="search-result-date"><span class="date" title="{6}">{5}</span></td>
</tr>
</script>
<!-- Start restrictions section -->
<script type="text/x-template" title="page-permissions-div">
<div id="page-permissions-div">
<div id="page-permissions-editor-form">
<div id="page-permissions-error-div" class="hidden">
<a href="#" id="permissions-error-div-close">Ok</a>
<div></div>
</div>
<div id="page-permissions-type-radios" class="page-permissions-label-rows">
<div>
<input id="restrictViewRadio" type="radio" checked="checked" name="pagePermissionTypeRadio" value="view"/>
<label for="restrictViewRadio">Restrict viewing of this page</label>
<input id="restrictEditRadio" type="radio" name="pagePermissionTypeRadio" value="edit"/>
<label for="restrictEditRadio">Restrict editing of this page</label>
</div>
</div>
<div id="page-permissions-input" class="page-permissions-label-rows">
<div class="page-permissions-label">To:</div>
<div id="page-permissions-chooser-box">
<span id="page-permissions-choose-user" class="ajs-button">
<a href="#" id='userpicker-popup-link-image' onClick="var picker = window.open('http://10.20.160.198/wiki/spaces/openuserpicker.action?key=dubbo&startIndex=0&onPopupSubmit=AJS.PagePermissions.addUserPermissions', 'EntitiesPicker', 'status=yes,resizable=yes,top=100,left=200,width=700,height=680,scrollbars=yes'); picker.focus(); return false;"><img src="user_16.gif"/*tpa=http://10.20.160.198/wiki/s/en/2166/34/_/images/icons/user_16.gif*/ height=16 width=16 border=0 align="absmiddle" title="Choose users" /></a>
<a href="#" id='userpicker-popup-link-text' onClick="var picker = window.open('http://10.20.160.198/wiki/spaces/openuserpicker.action?key=dubbo&startIndex=0&onPopupSubmit=AJS.PagePermissions.addUserPermissions', 'EntitiesPicker', 'status=yes,resizable=yes,top=100,left=200,width=700,height=680,scrollbars=yes'); picker.focus(); return false;">Person...</a>
</span>
<span id="page-permissions-choose-group" class="ajs-button">
<a href="#" id='grouppicker-popup-link-image' onClick="var picker = window.open('http://10.20.160.198/wiki/spaces/opengrouppicker.action?key=dubbo&startIndex=0&actionName=dosearchgroups.action&onPopupSubmit=AJS.PagePermissions.addGroupPermissions', 'EntitiesPicker', 'status=yes,resizable=yes,top=100,left=200,width=580,height=550,scrollbars=yes'); picker.focus(); return false;"><img src="group_16.gif"/*tpa=http://10.20.160.198/wiki/s/en/2166/34/_/images/icons/group_16.gif*/ height=16 width=16 border=0 align="absmiddle" title="Choose groups" /></a>
<a href="#" id='grouppicker-popup-link-text' onClick="var picker = window.open('http://10.20.160.198/wiki/spaces/opengrouppicker.action?key=dubbo&startIndex=0&actionName=dosearchgroups.action&onPopupSubmit=AJS.PagePermissions.addGroupPermissions', 'EntitiesPicker', 'status=yes,resizable=yes,top=100,left=200,width=580,height=550,scrollbars=yes'); picker.focus(); return false;">Group...</a>
</span>
</div>
<div id="page-permissions-input-box">
<span>
<input type="text" id="page-permissions-names-input" class="input-placeholder" value="Enter user or group name" name="permissionNames" size="30" autocomplete="off"/>
</span>
<input
type="hidden"
id="page-permissions-names-hidden" /> <img height="16px" width="1px" src="spacer.gif"/*tpa=http://10.20.160.198/wiki/s/en/2166/34/_/images/border/spacer.gif*//>
<input type="button" id="add-typed-names" value="Restrict">
</div>
</div>
</div>
<div id="page-permissions-tables">
<div id="page-permissions-table-div">
<table id="page-permissions-table" class="page-permissions-table">
<tr id="page-permissions-no-views" class="marker-row">
<td colspan="3" class="page-permissions-marker-cell"><span>No view restrictions are defined for this page</span></td>
</tr>
<tr id="page-permissions-no-edits" class="marker-row">
<td colspan="3" class="page-permissions-marker-cell"><span>No edit restrictions are defined for this page</span></td>
</tr>
</table>
</div>
<div id="page-inherited-permissions-table-div" class="hidden">
<span id="page-inherited-permissions-table-desc">
<a class="icon twisty-closed">Show/Hide</a>
<a id="toggle-inherited-permissions" title="Click to see inherited restrictions">This page has restricted parent pages. It can only be seen by users who can see those parent pages.</a>
</span>
<div id="page-inherited-permissions-tables" class="hidden page-inheritance-togglable"></div>
</div>
</div>
</div>
</script>
<script type="text/x-template" title="permissions-row-template">
<tr class="permission-row">
<td class="page-permissions-marker-cell" width="20%">
<span>Viewing restricted to:</span>
</td>
<td class="permission-entity" nowrap="true" width="40%">
<span class="entity-container">
<img class="permission-entity-picture"/>
<span class="permission-entity-display-name"></span>
<span class="permission-entity-name-wrap">&nbsp;(<span class="permission-entity-name"></span>)</span>
</span>
</td>
<td class="permission-detail-column">
<div class="permission-remove-div">
<a href="#" class="remove-permission-link">Remove restriction</a>
</div>
</td>
</tr>
</script>
<script type="text/x-template" title="permissions-username-no-suggestion-template">
<ol>
<li><a href="#" class="message"><span>No matches</span></a></li>
</ol>
</script>
<script type="text/x-template" title="page-inherited-permissions-table-div-template">
<div class="page-inherited-permissions-owner-div">
<div class="page-inherited-permissions-table-desc">Viewing restrictions apply to “<a></a>”. In order to see “<span></span>”, a user must be in the following list of users and groups:</div>
<table class="page-permissions-table"></table>
</div>
</script>
<script type="text/x-template" title="page-restrictions-help-link">
<div class="dialog-help-link">
<a href="http://docs.atlassian.com/confluence/docs-35/Page+Restrictions" target="_blank">Help</a>
</div>
</script>
<!-- End restrictions section -->
<fieldset class="hidden parameters">
<input type="hidden" title="spaceKeyEncoded" value="dubbo">
<input type="hidden" title="spaceKeyDecoded" value="dubbo">
</fieldset>
<a href="#page-metadata-end" class="assistive">Skip to end of metadata</a>
<div id="page-metadata-start" class="assistive"></div>
<div class="page-metadata">
<ul>
<li class="page-metadata-item noprint">
<a id="content-metadata-page-restrictions" href="#" class="page-metadata-icon page-restrictions hidden" title="Page restrictions apply. Click the lock icon to view or edit the restriction.">
<span>Page restrictions apply</span></a> </li>
<li class="page-metadata-modification-info" style="display: none">
Added by <a href="javascript:if(confirm(%27http://10.20.160.198/wiki/display/~william.liangf \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/display/~william.liangf%27" tppabs="http://10.20.160.198/wiki/display/~william.liangf"
class="url fn confluence-userlink" data-username="william.liangf"
>梁 飞</a>, last edited by <a href="javascript:if(confirm(%27http://10.20.160.198/wiki/display/~william.liangf \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/display/~william.liangf%27" tppabs="http://10.20.160.198/wiki/display/~william.liangf"
class="url fn confluence-userlink" data-username="william.liangf"
>梁 飞</a> on 一月 23, 2013
<span class="noprint">&nbsp;(<a id="view-change-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/diffpages.action?pageId=6948813&originalId=8356074 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/diffpages.action?pageId=6948813&originalId=8356074%27" tppabs="http://10.20.160.198/wiki/pages/diffpages.action?pageId=6948813&originalId=8356074">view change</a>)</span>
</li>
</ul>
<div id="version-comment" class="noteMacro" style="display: none;">
<strong>Comment:</strong>
<br />
</div>
</div>
<a href="#page-metadata-start" class="assistive">Go to start of metadata</a>
<div id="page-metadata-end" class="assistive"></div>
<fieldset class="hidden parameters">
<input type="hidden" title="browsePageTreeMode" value="view">
<input type="hidden" title="parentPageId" value="6948805">
</fieldset>
<div class="wiki-content">
<!-- wiki content -->
<table class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><tbody><tr><td class="confluenceTd" valign="top"><p><br class="atl-forced-newline" /></p>
<p><a href="Home-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Home-zh" title="Home-zh"><b>首页</b></a> &nbsp;&#124;&#124;&nbsp; <a href="Download-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Download-zh" title="Download-zh"><b>下载</b></a> &nbsp;&#124;&#124;&nbsp; <a href="User+Guide-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/User+Guide-zh" title="User Guide-zh"><b>用户指南</b></a> &nbsp;&#124;&#124;&nbsp; <a href="Developer+Guide-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Developer+Guide-zh" title="Developer Guide-zh"><b>开发者指南</b></a> &nbsp;&#124;&#124;&nbsp; <a href="Administrator+Guide-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Administrator+Guide-zh" title="Administrator Guide-zh"><b>管理员指南</b></a> &nbsp;&#124;&#124;&nbsp; <a href="Training-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Training-zh" title="Training-zh"><b>培训文档</b></a> &nbsp;&#124;&#124;&nbsp; <a href="FAQ-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/FAQ-zh" title="FAQ-zh"><b>常见问题解答</b></a> &nbsp;&#124;&#124;&nbsp; <a href="Release+Notes-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Release+Notes-zh" title="Release Notes-zh"><b>发布记录</b></a> &nbsp;&#124;&#124;&nbsp; <a href="Roadmap-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Roadmap-zh" title="Roadmap-zh"><b>发展路线</b></a> &nbsp;&#124;&#124;&nbsp; <a href="Community-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Community-zh" title="Community-zh"><b>社区</b></a></p></td><td class="confluenceTd" valign="top">
<p><a href="User+Guide.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/User+Guide" title="User Guide"><b>English</b></a> | 中文</p></td></tr></tbody></table>
<h1><a name="UserGuide-zh-%E7%94%A8%E6%88%B7%E6%8C%87%E5%8D%97"></a>用户指南</h1>
<div>
<ul>
<li><a href='#UserGuide-zh-%E5%85%A5%E9%97%A8'>入门</a></li>
<ul>
<li><a href='#UserGuide-zh-%E8%83%8C%E6%99%AF'>背景</a></li>
<li><a href='#UserGuide-zh-%E9%9C%80%E6%B1%82'>需求</a></li>
<li><a href='#UserGuide-zh-%E6%9E%B6%E6%9E%84'>架构</a></li>
<li><a href='#UserGuide-zh-%E7%94%A8%E6%B3%95'>用法</a></li>
</ul>
<li><a href='#UserGuide-zh-%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8'>快速启动</a></li>
<ul>
<li><a href='#UserGuide-zh-%E6%9C%8D%E5%8A%A1%E6%8F%90%E4%BE%9B%E8%80%85'>服务提供者</a></li>
<li><a href='#UserGuide-zh-%E6%9C%8D%E5%8A%A1%E6%B6%88%E8%B4%B9%E8%80%85'>服务消费者</a></li>
</ul>
<li><a href='#UserGuide-zh-%E4%BE%9D%E8%B5%96'>依赖</a></li>
<ul>
<li><a href='#UserGuide-zh-%E5%BF%85%E9%9C%80%E4%BE%9D%E8%B5%96'>必需依赖</a></li>
<li><a href='#UserGuide-zh-%E7%BC%BA%E7%9C%81%E4%BE%9D%E8%B5%96'>缺省依赖</a></li>
<li><a href='#UserGuide-zh-%E5%8F%AF%E9%80%89%E4%BE%9D%E8%B5%96'>可选依赖</a></li>
</ul>
<li><a href='#UserGuide-zh-%E6%88%90%E7%86%9F%E5%BA%A6'>成熟度</a></li>
<ul>
<li><a href='#UserGuide-zh-%E5%8A%9F%E8%83%BD%E6%88%90%E7%86%9F%E5%BA%A6'>功能成熟度</a></li>
<li><a href='#UserGuide-zh-%E7%AD%96%E7%95%A5%E6%88%90%E7%86%9F%E5%BA%A6'>策略成熟度</a></li>
</ul>
<li><a href='#UserGuide-zh-%E9%85%8D%E7%BD%AE'>配置</a></li>
<ul>
<li><a href='#UserGuide-zh-Xml%E9%85%8D%E7%BD%AE'>Xml配置</a></li>
<li><a href='#UserGuide-zh-%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE'>属性配置</a></li>
<li><a href='#UserGuide-zh-%E6%B3%A8%E8%A7%A3%E9%85%8D%E7%BD%AE'>注解配置</a></li>
<li><a href='#UserGuide-zh-API%E9%85%8D%E7%BD%AE'>API配置</a></li>
</ul>
<li><a href='#UserGuide-zh-%E7%A4%BA%E4%BE%8B'>示例</a></li>
<ul>
<li><a href='#UserGuide-zh-%E5%90%AF%E5%8A%A8%E6%97%B6%E6%A3%80%E6%9F%A5'>启动时检查</a></li>
<li><a href='#UserGuide-zh-%E9%9B%86%E7%BE%A4%E5%AE%B9%E9%94%99'>集群容错</a></li>
<li><a href='#UserGuide-zh-%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1'>负载均衡</a></li>
<li><a href='#UserGuide-zh-%E7%BA%BF%E7%A8%8B%E6%A8%A1%E5%9E%8B'>线程模型</a></li>
<li><a href='#UserGuide-zh-%E7%9B%B4%E8%BF%9E%E6%8F%90%E4%BE%9B%E8%80%85'>直连提供者</a></li>
<li><a href='#UserGuide-zh-%E5%8F%AA%E8%AE%A2%E9%98%85'>只订阅</a></li>
<li><a href='#UserGuide-zh-%E5%8F%AA%E6%B3%A8%E5%86%8C'>只注册</a></li>
<li><a href='#UserGuide-zh-%E9%9D%99%E6%80%81%E6%9C%8D%E5%8A%A1'>静态服务</a></li>
<li><a href='#UserGuide-zh-%E5%A4%9A%E5%8D%8F%E8%AE%AE'>多协议</a></li>
<li><a href='#UserGuide-zh-%E5%A4%9A%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83'>多注册中心</a></li>
<li><a href='#UserGuide-zh-%E6%9C%8D%E5%8A%A1%E5%88%86%E7%BB%84'>服务分组</a></li>
<li><a href='#UserGuide-zh-%E5%A4%9A%E7%89%88%E6%9C%AC'>多版本</a></li>
<li><a href='#UserGuide-zh-%E5%88%86%E7%BB%84%E8%81%9A%E5%90%88'>分组聚合</a></li>
<li><a href='#UserGuide-zh-%E5%8F%82%E6%95%B0%E9%AA%8C%E8%AF%81'>参数验证</a></li>
<li><a href='#UserGuide-zh-%E7%BB%93%E6%9E%9C%E7%BC%93%E5%AD%98'>结果缓存</a></li>
<li><a href='#UserGuide-zh-%E6%B3%9B%E5%8C%96%E5%BC%95%E7%94%A8'>泛化引用</a></li>
<li><a href='#UserGuide-zh-%E6%B3%9B%E5%8C%96%E5%AE%9E%E7%8E%B0'>泛化实现</a></li>
<li><a href='#UserGuide-zh-%E5%9B%9E%E5%A3%B0%E6%B5%8B%E8%AF%95'>回声测试</a></li>
<li><a href='#UserGuide-zh-%E4%B8%8A%E4%B8%8B%E6%96%87%E4%BF%A1%E6%81%AF'>上下文信息</a></li>
<li><a href='#UserGuide-zh-%E9%9A%90%E5%BC%8F%E4%BC%A0%E5%8F%82'>隐式传参</a></li>
<li><a href='#UserGuide-zh-%E5%BC%82%E6%AD%A5%E8%B0%83%E7%94%A8'>异步调用</a></li>
<li><a href='#UserGuide-zh-%E6%9C%AC%E5%9C%B0%E8%B0%83%E7%94%A8'>本地调用</a></li>
<li><a href='#UserGuide-zh-%E5%8F%82%E6%95%B0%E5%9B%9E%E8%B0%83'>参数回调</a></li>
<li><a href='#UserGuide-zh-%E4%BA%8B%E4%BB%B6%E9%80%9A%E7%9F%A5'>事件通知</a></li>
<li><a href='#UserGuide-zh-%E6%9C%AC%E5%9C%B0%E5%AD%98%E6%A0%B9'>本地存根</a></li>
<li><a href='#UserGuide-zh-%E6%9C%AC%E5%9C%B0%E4%BC%AA%E8%A3%85'>本地伪装</a></li>
<li><a href='#UserGuide-zh-%E5%BB%B6%E8%BF%9F%E6%9A%B4%E9%9C%B2'>延迟暴露</a></li>
<li><a href='#UserGuide-zh-%E5%B9%B6%E5%8F%91%E6%8E%A7%E5%88%B6'>并发控制</a></li>
<li><a href='#UserGuide-zh-%E8%BF%9E%E6%8E%A5%E6%8E%A7%E5%88%B6'>连接控制</a></li>
<li><a href='#UserGuide-zh-%E5%BB%B6%E8%BF%9F%E8%BF%9E%E6%8E%A5'>延迟连接</a></li>
<li><a href='#UserGuide-zh-%E7%B2%98%E6%BB%9E%E8%BF%9E%E6%8E%A5'>粘滞连接</a></li>
<li><a href='#UserGuide-zh-%E4%BB%A4%E7%89%8C%E9%AA%8C%E8%AF%81'>令牌验证</a></li>
<li><a href='#UserGuide-zh-%E8%B7%AF%E7%94%B1%E8%A7%84%E5%88%99'>路由规则</a></li>
<li><a href='#UserGuide-zh-%E9%85%8D%E7%BD%AE%E8%A7%84%E5%88%99'>配置规则</a></li>
<li><a href='#UserGuide-zh-%E6%9C%8D%E5%8A%A1%E9%99%8D%E7%BA%A7'>服务降级</a></li>
<li><a href='#UserGuide-zh-%E4%BC%98%E9%9B%85%E5%81%9C%E6%9C%BA'>优雅停机</a></li>
<li><a href='#UserGuide-zh-%E4%B8%BB%E6%9C%BA%E7%BB%91%E5%AE%9A'>主机绑定</a></li>
<li><a href='#UserGuide-zh-%E6%97%A5%E5%BF%97%E9%80%82%E9%85%8D'>日志适配</a></li>
<li><a href='#UserGuide-zh-%E8%AE%BF%E9%97%AE%E6%97%A5%E5%BF%97'>访问日志</a></li>
<li><a href='#UserGuide-zh-%E6%9C%8D%E5%8A%A1%E5%AE%B9%E5%99%A8'>服务容器</a></li>
<li><a href='#UserGuide-zh-ReferenceConfig%E7%BC%93%E5%AD%98'>Reference Config缓存</a></li>
<li><a href='#UserGuide-zh-%E5%88%86%E5%B8%83%E5%BC%8F%E4%BA%8B%E5%8A%A1'>分布式事务</a></li>
</ul>
<li><a href='#UserGuide-zh-API%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C'>API参考手册</a></li>
<ul>
<li><a href='#UserGuide-zh-%E9%85%8D%E7%BD%AEAPI'>配置API</a></li>
<li><a href='#UserGuide-zh-%E6%B3%A8%E8%A7%A3API'>注解API</a></li>
<li><a href='#UserGuide-zh-%E6%A8%A1%E5%9E%8BAPI'>模型API</a></li>
<li><a href='#UserGuide-zh-%E4%B8%8A%E4%B8%8B%E6%96%87API'>上下文API</a></li>
<li><a href='#UserGuide-zh-%E6%9C%8D%E5%8A%A1API'>服务API</a></li>
</ul>
<li><a href='#UserGuide-zh-%E9%85%8D%E7%BD%AE%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C'>配置参考手册</a></li>
<ul>
<li><a href='#UserGuide-zh-%3Cdubbo%3Aservice%2F%3E'>&lt;dubbo:service/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Areference%2F%3E'>&lt;dubbo:reference/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Aprotocol%2F%3E'>&lt;dubbo:protocol/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Aregistry%2F%3E'>&lt;dubbo:registry/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Amonitor%2F%3E'>&lt;dubbo:monitor/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Aapplication%2F%3E'>&lt;dubbo:application/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Amodule%2F%3E'>&lt;dubbo:module/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Aprovider%2F%3E'>&lt;dubbo:provider/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Aconsumer%2F%3E'>&lt;dubbo:consumer/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Amethod%2F%3E'>&lt;dubbo:method/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Aargument%2F%3E'>&lt;dubbo:argument/&gt;</a></li>
<li><a href='#UserGuide-zh-%3Cdubbo%3Aparameter%2F%3E'>&lt;dubbo:parameter/&gt;</a></li>
</ul>
<li><a href='#UserGuide-zh-%E5%8D%8F%E8%AE%AE%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C'>协议参考手册</a></li>
<ul>
<li><a href='#UserGuide-zh-dubbo%3A%2F%2F'>dubbo://</a></li>
<li><a href='#UserGuide-zh-rmi%3A%2F%2F'>rmi://</a></li>
<li><a href='#UserGuide-zh-hessian%3A%2F%2F'>hessian://</a></li>
<li><a href='#UserGuide-zh-http%3A%2F%2F'>http://</a></li>
<li><a href='#UserGuide-zh-webservice%3A%2F%2F'>webservice://</a></li>
<li><a href='#UserGuide-zh-thrift%3A%2F%2F'>thrift://</a></li>
<li><a href='#UserGuide-zh-memcached%3A%2F%2F'>memcached://</a></li>
<li><a href='#UserGuide-zh-redis%3A%2F%2F'>redis://</a></li>
</ul>
<li><a href='#UserGuide-zh-%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C'>注册中心参考手册</a></li>
<ul>
<li><a href='#UserGuide-zh-Multicast%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83'>Multicast注册中心</a></li>
<li><a href='#UserGuide-zh-Zookeeper%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83'>Zookeeper注册中心</a></li>
<li><a href='#UserGuide-zh-Redis%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83'>Redis注册中心</a></li>
<li><a href='#UserGuide-zh-Simple%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83'>Simple注册中心</a></li>
<li><a href='#UserGuide-zh-Simple%E7%9B%91%E6%8E%A7%E4%B8%AD%E5%BF%83'>Simple监控中心</a></li>
</ul>
<li><a href='#UserGuide-zh-Telnet%E5%91%BD%E4%BB%A4%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C'>Telnet命令参考手册</a></li>
<ul>
<li><a href='#UserGuide-zh-ls'>ls</a></li>
<li><a href='#UserGuide-zh-ps'>ps</a></li>
<li><a href='#UserGuide-zh-cd'>cd</a></li>
<li><a href='#UserGuide-zh-pwd'>pwd</a></li>
<li><a href='#UserGuide-zh-trace'>trace</a></li>
<li><a href='#UserGuide-zh-count'>count</a></li>
<li><a href='#UserGuide-zh-invoke'>invoke</a></li>
<li><a href='#UserGuide-zh-status'>status</a></li>
<li><a href='#UserGuide-zh-log'>log</a></li>
<li><a href='#UserGuide-zh-help'>help</a></li>
<li><a href='#UserGuide-zh-clear'>clear</a></li>
<li><a href='#UserGuide-zh-exit'>exit</a></li>
</ul>
<li><a href='#UserGuide-zh-Maven%E6%8F%92%E4%BB%B6%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C'>Maven插件参考手册</a></li>
<ul>
<li><a href='#UserGuide-zh-mvndubbo%3Aregistry'>mvn dubbo:registry</a></li>
<li><a href='#UserGuide-zh-mvndubbo%3Acreate'>mvn dubbo:create</a></li>
</ul>
<li><a href='#UserGuide-zh-%E6%9C%8D%E5%8A%A1%E5%8C%96%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5'>服务化最佳实践</a></li>
<ul>
<li><a href='#UserGuide-zh-%E5%88%86%E5%8C%85'>分包</a></li>
<li><a href='#UserGuide-zh-%E7%B2%92%E5%BA%A6'>粒度</a></li>
<li><a href='#UserGuide-zh-%E7%89%88%E6%9C%AC'>版本</a></li>
<li><a href='#UserGuide-zh-%E5%85%BC%E5%AE%B9%E6%80%A7'>兼容性</a></li>
<li><a href='#UserGuide-zh-%E6%9E%9A%E4%B8%BE%E5%80%BC'>枚举值</a></li>
<li><a href='#UserGuide-zh-%E5%BA%8F%E5%88%97%E5%8C%96'>序列化</a></li>
<li><a href='#UserGuide-zh-%E5%BC%82%E5%B8%B8'>异常</a></li>
<li><a href='#UserGuide-zh-%E8%B0%83%E7%94%A8'>调用</a></li>
</ul>
<li><a href='#UserGuide-zh-%E6%8E%A8%E8%8D%90%E7%94%A8%E6%B3%95'>推荐用法</a></li>
<li><a href='#UserGuide-zh-%E5%AE%B9%E9%87%8F%E8%A7%84%E5%88%92'>容量规划</a></li>
<li><a href='#UserGuide-zh-%E5%9F%BA%E5%87%86%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7%E5%8C%85'>基准测试工具包</a></li>
<li><a href='#UserGuide-zh-%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95%E6%8A%A5%E5%91%8A'>性能测试报告</a></li>
<ul>
<li><a href='#UserGuide-zh-%E6%B5%8B%E8%AF%95%E8%AF%B4%E6%98%8E'>测试说明</a></li>
<li><a href='#UserGuide-zh-%E6%B5%8B%E8%AF%95%E7%8E%AF%E5%A2%83'>测试环境</a></li>
<li><a href='#UserGuide-zh-%E6%B5%8B%E8%AF%95%E7%9B%AE%E7%9A%84'>测试目的</a></li>
<li><a href='#UserGuide-zh-%E6%B5%8B%E8%AF%95%E8%84%9A%E6%9C%AC'>测试脚本</a></li>
<li><a href='#UserGuide-zh-%E6%B5%8B%E8%AF%95%E7%BB%93%E6%9E%9C'>测试结果</a></li>
<li><a href='#UserGuide-zh-%E6%B5%8B%E8%AF%95%E5%88%86%E6%9E%90'>测试分析</a></li>
</ul>
<li>测试覆盖率报告</li>
</ul></div>
<h2><a name="UserGuide-zh-%E5%85%A5%E9%97%A8"></a>入门</h2>
<p>(<a href="Getting+Started-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Getting+Started-zh" title="Getting Started-zh">+</a>) (<a href="#UserGuide-zh-%E5%85%A5%E9%97%A8">#</a>)</p>
<h3><a name="UserGuide-zh-%E8%83%8C%E6%99%AF"></a>背景</h3>
<p>(<a href="#UserGuide-zh-%E8%83%8C%E6%99%AF">#</a>)</p>
<p>随着互联网的发展,网站应用的规模不断扩大,常规的垂直应用架构已无法应对,分布式服务架构以及流动计算架构势在必行,亟需一个治理系统确保架构有条不紊的演进。</p>
<p><span class="image-wrap" style=""><img src="dubbo-architecture-roadmap.jpg-version=1&modificationDate=1331143666000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/6947616/dubbo-architecture-roadmap.jpg?version=1&modificationDate=1331143666000" style="border: 0px solid black" /></span></p>
<ul>
<li><b>单一应用架构</b>
<ul>
<li>当网站流量很小时,只需一个应用,将所有功能都部署在一起,以减少部署节点和成本。</li>
<li>此时,用于简化增删改查工作量的 <b>数据访问框架(ORM)</b> 是关键。</li>
</ul>
</li>
<li><b>垂直应用架构</b>
<ul>
<li>当访问量逐渐增大,单一应用增加机器带来的加速度越来越小,将应用拆成互不相干的几个应用,以提升效率。</li>
<li>此时,用于加速前端页面开发的 <b>Web框架(MVC)</b> 是关键。</li>
</ul>
</li>
<li><b>分布式服务架构</b>
<ul>
<li>当垂直应用越来越多,应用之间交互不可避免,将核心业务抽取出来,作为独立的服务,逐渐形成稳定的服务中心,使前端应用能更快速的响应多变的市场需求。</li>
<li>此时,用于提高业务复用及整合的 <b>分布式服务框架(RPC)</b> 是关键。</li>
</ul>
</li>
<li><b>流动计算架构</b>
<ul>
<li>当服务越来越多,容量的评估,小服务资源的浪费等问题逐渐显现,此时需增加一个调度中心基于访问压力实时管理集群容量,提高集群利用率。</li>
<li>此时,用于提高机器利用率的 <b>资源调度和治理中心(SOA)</b> 是关键。</li>
</ul>
</li>
</ul>
<h3><a name="UserGuide-zh-%E9%9C%80%E6%B1%82"></a>需求</h3>
<p>(<a href="#UserGuide-zh-%E9%9C%80%E6%B1%82">#</a>)</p>
<p><span class="image-wrap" style=""><img src="dubbo-service-governance.jpg-version=1&modificationDate=1331887614000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/6947616/dubbo-service-governance.jpg?version=1&modificationDate=1331887614000" style="border: 0px solid black" /></span></p>
<p>在大规模服务化之前,应用可能只是通过RMI或Hessian等工具,简单的暴露和引用远程服务,通过配置服务的URL地址进行调用,通过F5等硬件进行负载均衡。</p>
<p><b>(1) 当服务越来越多时,服务URL配置管理变得非常困难,F5硬件负载均衡器的单点压力也越来越大。</b></p>
<p>此时需要一个服务注册中心,动态的注册和发现服务,使服务的位置透明。</p>
<p>并通过在消费方获取服务提供方地址列表,实现软负载均衡和Failover,降低对F5硬件负载均衡器的依赖,也能减少部分成本。</p>
<p><b>(2) 当进一步发展,服务间依赖关系变得错踪复杂,甚至分不清哪个应用要在哪个应用之前启动,架构师都不能完整的描述应用的架构关系。</b></p>
<p>这时,需要自动画出应用间的依赖关系图,以帮助架构师理清理关系。</p>
<p><b>(3) 接着,服务的调用量越来越大,服务的容量问题就暴露出来,这个服务需要多少机器支撑?什么时候该加机器?</b></p>
<p>为了解决这些问题,第一步,要将服务现在每天的调用量,响应时间,都统计出来,作为容量规划的参考指标。</p>
<p>其次,要可以动态调整权重,在线上,将某台机器的权重一直加大,并在加大的过程中记录响应时间的变化,直到响应时间到达阀值,记录此时的访问量,再以此访问量乘以机器数反推总容量。</p>
<p>以上是Dubbo最基本的几个需求,更多服务治理问题参见:</p>
<p><a href="javascript:if(confirm(%27http://code.alibabatech.com/blog/experience_1402/service-governance-process.html \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://code.alibabatech.com/blog/experience_1402/service-governance-process.html%27" tppabs="http://code.alibabatech.com/blog/experience_1402/service-governance-process.html" class="external-link" rel="nofollow">http://code.alibabatech.com/blog/experience_1402/service-governance-process.html</a></p>
<h3><a name="UserGuide-zh-%E6%9E%B6%E6%9E%84"></a>架构</h3>
<p>(<a href="#UserGuide-zh-%E6%9E%B6%E6%9E%84">#</a>)</p>
<p><span class="image-wrap" style=""><img src="dubbo-architecture.jpg-version=1&modificationDate=1330892870000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/6947616/dubbo-architecture.jpg?version=1&modificationDate=1330892870000" style="border: 0px solid black" /></span></p>
<p><b>节点角色说明:</b></p>
<ul>
<li><b>Provider:</b> 暴露服务的服务提供方。</li>
<li><b>Consumer:</b> 调用远程服务的服务消费方。</li>
<li><b>Registry:</b> 服务注册与发现的注册中心。</li>
<li><b>Monitor:</b> 统计服务的调用次调和调用时间的监控中心。</li>
<li><b>Container:</b> 服务运行容器。</li>
</ul>
<p><b>调用关系说明:</b></p>
<ul>
<li>0. 服务容器负责启动,加载,运行服务提供者。</li>
<li>1. 服务提供者在启动时,向注册中心注册自己提供的服务。</li>
<li>2. 服务消费者在启动时,向注册中心订阅自己所需的服务。</li>
<li>3. 注册中心返回服务提供者地址列表给消费者,如果有变更,注册中心将基于长连接推送变更数据给消费者。</li>
<li>4. 服务消费者,从提供者地址列表中,基于软负载均衡算法,选一台提供者进行调用,如果调用失败,再选另一台调用。</li>
<li>5. 服务消费者和提供者,在内存中累计调用次数和调用时间,定时每分钟发送一次统计数据到监控中心。</li>
</ul>
<p><b>(1) 连通性:</b></p>
<ul>
<li>注册中心负责服务地址的注册与查找,相当于目录服务,服务提供者和消费者只在启动时与注册中心交互,注册中心不转发请求,压力较小</li>
<li>监控中心负责统计各服务调用次数,调用时间等,统计先在内存汇总后每分钟一次发送到监控中心服务器,并以报表展示</li>
<li>服务提供者向注册中心注册其提供的服务,并汇报调用时间到监控中心,此时间不包含网络开销</li>
<li>服务消费者向注册中心获取服务提供者地址列表,并根据负载算法直接调用提供者,同时汇报调用时间到监控中心,此时间包含网络开销</li>
<li>注册中心,服务提供者,服务消费者三者之间均为长连接,监控中心除外</li>
<li>注册中心通过长连接感知服务提供者的存在,服务提供者宕机,注册中心将立即推送事件通知消费者</li>
<li>注册中心和监控中心全部宕机,不影响已运行的提供者和消费者,消费者在本地缓存了提供者列表</li>
<li>注册中心和监控中心都是可选的,服务消费者可以直连服务提供者</li>
</ul>
<p><b>(2) 健状性:</b></p>
<ul>
<li>监控中心宕掉不影响使用,只是丢失部分采样数据</li>
<li>数据库宕掉后,注册中心仍能通过缓存提供服务列表查询,但不能注册新服务</li>
<li>注册中心对等集群,任意一台宕掉后,将自动切换到另一台</li>
<li>注册中心全部宕掉后,服务提供者和服务消费者仍能通过本地缓存通讯</li>
<li>服务提供者无状态,任意一台宕掉后,不影响使用</li>
<li>服务提供者全部宕掉后,服务消费者应用将无法使用,并无限次重连等待服务提供者恢复</li>
</ul>
<p><b>(3) 伸缩性:</b></p>
<ul>
<li>注册中心为对等集群,可动态增加机器部署实例,所有客户端将自动发现新的注册中心</li>
<li>服务提供者无状态,可动态增加机器部署实例,注册中心将推送新的服务提供者信息给消费者</li>
</ul>
<p><b>(4) 升级性:</b></p>
<ul>
<li>当服务集群规模进一步扩大,带动IT治理结构进一步升级,需要实现动态部署,进行流动计算,现有分布式服务架构不会带来阻力:</li>
</ul>
<p><span class="image-wrap" style=""><img src="dubbo-architecture-future.jpg-version=1&modificationDate=1329978098000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/6947616/dubbo-architecture-future.jpg?version=1&modificationDate=1329978098000" style="border: 0px solid black" /></span></p>
<ul>
<li><del><b>Deployer:</b> 自动部署服务的本地代理。</del></li>
<li><del><b>Repository:</b> 仓库用于存储服务应用发布包。</del></li>
<li><del><b>Scheduler:</b> 调度中心基于访问压力自动增减服务提供者。</del></li>
<li><del><b>Admin:</b> 统一管理控制台。</del></li>
</ul>
<h3><a name="UserGuide-zh-%E7%94%A8%E6%B3%95"></a>用法</h3>
<p>(<a href="#UserGuide-zh-%E7%94%A8%E6%B3%95">#</a>)</p>
<h4><a name="UserGuide-zh-%E6%9C%AC%E5%9C%B0%E6%9C%8D%E5%8A%A1%EF%BC%9A%28Spring%E9%85%8D%E7%BD%AE%29"></a>本地服务:(Spring配置)</h4>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>local.xml</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;bean id=“xxxService class=“com.xxx.XxxServiceImpl /&gt;
&lt;bean id=“xxxAction class=“com.xxx.XxxAction”&gt;
&lt;property name=“xxxService ref=“xxxService /&gt;
&lt;/bean&gt;]]></script>
</div></div>
<h4><a name="UserGuide-zh-%E8%BF%9C%E7%A8%8B%E6%9C%8D%E5%8A%A1%EF%BC%9A%28Spring%E9%85%8D%E7%BD%AE%29"></a>远程服务:(Spring配置)</h4>
<p>在本地服务的基础上,只需做简单配置,即可完成远程化:</p>
<ul>
<li>将上面的local.xml配置拆分成两份,将服务定义部分放在服务提供方remote-provider.xml,将服务引用部分放在服务消费方remote-consumer.xml。</li>
<li>并在提供方增加暴露服务配置&lt;dubbo:service&gt;,在消费方增加引用服务配置&lt;dubbo:reference&gt;。</li>
</ul>
<p>如下:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>remote-provider.xml</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;bean id=“xxxService class=“com.xxx.XxxServiceImpl /&gt; &lt;!-- 和本地服务一样实现远程服务 --&gt;
&lt;dubbo:service interface=“com.xxx.XxxService ref=“xxxService /&gt; &lt;!-- 增加暴露远程服务配置 --&gt;]]></script>
</div></div>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>remote-consumer.xml</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;dubbo:reference id=“xxxService interface=“com.xxx.XxxService /&gt; &lt;!-- 增加引用远程服务配置 --&gt;
&lt;bean id=“xxxAction class=“com.xxx.XxxAction”&gt; &lt;!-- 和本地服务一样使用远程服务 --&gt;
&lt;property name=“xxxService ref=“xxxService /&gt;
&lt;/bean&gt;]]></script>
</div></div>
<h2><a name="UserGuide-zh-%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8"></a>快速启动</h2>
<p>(<a href="Quick+Start-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Quick+Start-zh" title="Quick Start-zh">+</a>) (<a href="#UserGuide-zh-%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8">#</a>)</p>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Dubbo采用全Spring配置方式,透明化接入应用,对应用没有任何API侵入,只需用Spring加载Dubbo的配置即可,Dubbo基于Spring的Schema扩展进行加载。</td></tr></table></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>如果不想使用Spring配置,而希望通过API的方式进行调用(不推荐),请参见:<a href="User+Guide-zh.htm#UserGuide-zh-API%E9%85%8D%E7%BD%AE" tppabs="http://10.20.160.198/wiki/display/dubbo/User+Guide-zh#UserGuide-zh-API%E9%85%8D%E7%BD%AE">API配置</a> (<a href="API+Config-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/API+Config-zh" title="API Config-zh">+</a>)</td></tr></table></div>
<h3><a name="UserGuide-zh-%E6%9C%8D%E5%8A%A1%E6%8F%90%E4%BE%9B%E8%80%85"></a>服务提供者</h3>
<p>(<a href="#UserGuide-zh-%E6%9C%8D%E5%8A%A1%E6%8F%90%E4%BE%9B%E8%80%85">#</a>)</p>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>完整安装步骤,请参见:<a href="Administrator+Guide-zh.htm#AdministratorGuide-zh-%E7%A4%BA%E4%BE%8B%E6%8F%90%E4%BE%9B%E8%80%85%E5%AE%89%E8%A3%85" tppabs="http://10.20.160.198/wiki/display/dubbo/Administrator+Guide-zh#AdministratorGuide-zh-%E7%A4%BA%E4%BE%8B%E6%8F%90%E4%BE%9B%E8%80%85%E5%AE%89%E8%A3%85">示例提供者安装</a> (<a href="Demo+Provider+Installation-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Demo+Provider+Installation-zh" title="Demo Provider Installation-zh">+</a>)</td></tr></table></div>
<p>定义服务接口: (该接口需单独打包,在服务提供方和消费方共享)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>DemoService.java</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.alibaba.dubbo.demo;
public interface DemoService {
String sayHello(String name);
}]]></script>
</div></div>
<p>在服务提供方实现接口:(对服务消费方隐藏实现)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>DemoServiceImpl.java</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.alibaba.dubbo.demo.provider;
import com.alibaba.dubbo.demo.DemoService;
public class DemoServiceImpl implements DemoService {
public String sayHello(String name) {
return "Hello " + name;
}
}]]></script>
</div></div>
<p>用Spring配置声明暴露服务:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>provider.xml</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"&gt;
&lt;!-- 提供方应用信息,用于计算依赖关系 --&gt;
&lt;dubbo:application name="hello-world-app" /&gt;
&lt;!-- 使用multicast广播注册中心暴露服务地址 --&gt;
&lt;dubbo:registry address="multicast://224.5.6.7:1234" /&gt;
&lt;!-- dubbo协议在20880端口暴露服务 --&gt;
&lt;dubbo:protocol name="dubbo" port="20880" /&gt;
&lt;!-- 声明需要暴露的服务接口 --&gt;
&lt;dubbo:service interface="com.alibaba.dubbo.demo.DemoService" ref="demoService" /&gt;
&lt;!-- 和本地bean一样实现服务 --&gt;
&lt;bean id="demoService" class="com.alibaba.dubbo.demo.provider.DemoServiceImpl" /&gt;
&lt;/beans&gt;]]></script>
</div></div>
<p>加载Spring配置:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Provider.java</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Provider {
public static void main(String[] args) throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"http://10.20.160.198/wiki/display/dubbo/provider.xml"});
context.start();
System.in.read(); // 按任意键退出
}
}]]></script>
</div></div>
<h3><a name="UserGuide-zh-%E6%9C%8D%E5%8A%A1%E6%B6%88%E8%B4%B9%E8%80%85"></a>服务消费者</h3>
<p>(<a href="#UserGuide-zh-%E6%9C%8D%E5%8A%A1%E6%B6%88%E8%B4%B9%E8%80%85">#</a>)</p>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>完整安装步骤,请参见:<a href="Administrator+Guide-zh.htm#AdministratorGuide-zh-%E7%A4%BA%E4%BE%8B%E6%B6%88%E8%B4%B9%E8%80%85%E5%AE%89%E8%A3%85" tppabs="http://10.20.160.198/wiki/display/dubbo/Administrator+Guide-zh#AdministratorGuide-zh-%E7%A4%BA%E4%BE%8B%E6%B6%88%E8%B4%B9%E8%80%85%E5%AE%89%E8%A3%85">示例消费者安装</a> (<a href="Demo+Consumer+Installation-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Demo+Consumer+Installation-zh" title="Demo Consumer Installation-zh">+</a>)</td></tr></table></div>
<p>通过Spring配置引用远程服务:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>consumer.xml</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"&gt;
&lt;!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 --&gt;
&lt;dubbo:application name="consumer-of-helloworld-app" /&gt;
&lt;!-- 使用multicast广播注册中心暴露发现服务地址 --&gt;
&lt;dubbo:registry address="multicast://224.5.6.7:1234" /&gt;
&lt;!-- 生成远程服务代理,可以和本地bean一样使用demoService --&gt;
&lt;dubbo:reference id="demoService" interface="com.alibaba.dubbo.demo.DemoService" /&gt;
&lt;/beans&gt;]]></script>
</div></div>
<p>加载Spring配置,并调用远程服务:(也可以使用IoC注入)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Consumer.java</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.alibaba.dubbo.demo.DemoService;
public class Consumer {
public static void main(String[] args) throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"http://10.20.160.198/wiki/display/dubbo/consumer.xml"});
context.start();
DemoService demoService = (DemoService)context.getBean("demoService"); // 获取远程服务代理
String hello = demoService.sayHello("world"); // 执行远程方法
System.out.println( hello ); // 显示调用结果
}
}]]></script>
</div></div>
<h2><a name="UserGuide-zh-%E4%BE%9D%E8%B5%96"></a>依赖</h2>
<p>(<a href="Dependencies-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Dependencies-zh" title="Dependencies-zh">+</a>) (<a href="#UserGuide-zh-%E4%BE%9D%E8%B5%96">#</a>)</p>
<h3><a name="UserGuide-zh-%E5%BF%85%E9%9C%80%E4%BE%9D%E8%B5%96"></a>必需依赖</h3>
<ul>
<li>JDK1.5+</li>
</ul>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>理论上Dubbo可以只依赖JDK,不依赖于任何三方库运行,只需配置使用JDK相关实现策略。</td></tr></table></div>
<h3><a name="UserGuide-zh-%E7%BC%BA%E7%9C%81%E4%BE%9D%E8%B5%96"></a>缺省依赖</h3>
<p>通过mvn dependency:tree &gt; dep.log命令分析,Dubbo缺省依赖以下三方库:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: text; gutter: false"><![CDATA[[INFO] +- com.alibaba:dubbo:jar:2.1.2:compile
[INFO] | +- log4j:log4j:jar:1.2.16:compile
[INFO] | +- org.javassist:javassist:jar:3.15.0-GA:compile
[INFO] | +- org.springframework:spring:jar:2.5.6.SEC03:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | \- org.jboss.netty:netty:jar:3.2.5.Final:compile]]></script>
</div></div>
<p>这里所有依赖都是换照Dubbo缺省配置选的,这些缺省值是基于稳定性和性能考虑的。</p>
<ul>
<li>log4j.jar和commons-logging.jar日志输出包。
<ul>
<li>可以直接去掉,dubbo本身的日志会自动切换为JDK的java.util.logging输出。</li>
<li>但如果其它三方库比如spring.jar间接依赖commons-logging,则不能去掉。</li>
</ul>
</li>
<li>javassist.jar 字节码生成。
<ul>
<li>如果&lt;dubbo:provider proxy="jdk" /&gt;或&lt;dubbo:consumer proxy="jdk" /&gt;,以及&lt;dubbo:application compiler="jdk" /&gt;,则不需要。</li>
</ul>
</li>
<li>spring.jar 配置解析。
<ul>
<li>如果用ServiceConfig和ReferenceConfig的API调用,则不需要。</li>
</ul>
</li>
<li>netty.jar 网络传输。
<ul>
<li>如果&lt;dubbo:protocol server="mina"/&gt;或&lt;dubbo:protocol server="grizzly"/&gt;,则换成mina.jar或grizzly.jar。</li>
<li>如果&lt;protocol name="rmi"/&gt;,则不需要。</li>
</ul>
</li>
</ul>
<h3><a name="UserGuide-zh-%E5%8F%AF%E9%80%89%E4%BE%9D%E8%B5%96"></a>可选依赖</h3>
<p>以下依赖,在主动配置使用相应实现策略时用到,需自行加入依赖。</p>
<ul>
<li>mina: 1.1.7</li>
<li>grizzly: 2.1.4</li>
<li>httpclient: 4.1.2</li>
<li>hessian_lite: 3.2.1-fixed</li>
<li>xstream: 1.4.1</li>
<li>fastjson: 1.1.8</li>
<li>zookeeper: 3.3.3</li>
<li>jedis: 2.0.0</li>
<li>xmemcached: 1.3.6</li>
<li>jfreechart: 1.0.13</li>
<li>hessian: 4.0.7</li>
<li>jetty: 6.1.26</li>
<li>hibernate-validator: 4.2.0.Final</li>
<li>zkclient: 0.1</li>
<li>curator: 1.1.10</li>
<li>cxf: 2.6.1</li>
<li>thrift: 0.8.0</li>
</ul>
<p>JEE:</p>
<ul>
<li>servlet: 2.5</li>
<li>bsf: 3.1</li>
<li>validation-api: 1.0.0.GA</li>
<li>jcache: 0.4</li>
</ul>
<h2><a name="UserGuide-zh-%E6%88%90%E7%86%9F%E5%BA%A6"></a>成熟度</h2>
<p>(<a href="Maturity-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Maturity-zh" title="Maturity-zh">+</a>) (<a href="#UserGuide-zh-%E6%88%90%E7%86%9F%E5%BA%A6">#</a>)</p>
<h3><a name="UserGuide-zh-%E5%8A%9F%E8%83%BD%E6%88%90%E7%86%9F%E5%BA%A6"></a>功能成熟度</h3>
<p>(<a href="#UserGuide-zh-%E5%8A%9F%E8%83%BD%E6%88%90%E7%86%9F%E5%BA%A6">#</a>)</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%B9%B6%E5%8F%91%E6%8E%A7%E5%88%B6">并发控制</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 并发控制 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E8%BF%9E%E6%8E%A5%E6%8E%A7%E5%88%B6">连接控制</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 连接数控制 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E7%9B%B4%E8%BF%9E%E6%8F%90%E4%BE%9B%E8%80%85">直连提供者</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 点对点直连服务提供方,用于测试 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 测试环境使用 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%88%86%E7%BB%84%E8%81%9A%E5%90%88">分组聚合</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 分组聚合返回值,用于菜单聚合等服务 </td>
<td class='confluenceTd'> 特殊场景使用 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%8F%82%E6%95%B0%E9%AA%8C%E8%AF%81">参数验证</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 参数验证,JSR303验证框架集成 </td>
<td class='confluenceTd'> 对性能有影响 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'> LaiWang </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E7%BB%93%E6%9E%9C%E7%BC%93%E5%AD%98">结果缓存</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 结果缓存,用于加速请求 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E6%B3%9B%E5%8C%96%E5%BC%95%E7%94%A8">泛化引用</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 泛化调用,无需业务接口类进行远程调用,用于测试平台,开放网关桥接等 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E6%B3%9B%E5%8C%96%E5%AE%9E%E7%8E%B0">泛化实现</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 泛化实现,无需业务接口类实现任意接口,用于Mock平台 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%9B%9E%E5%A3%B0%E6%B5%8B%E8%AF%95">回声测试</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 回声测试 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E9%9A%90%E5%BC%8F%E4%BC%A0%E5%8F%82">隐式传参</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 附加参数 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%BC%82%E6%AD%A5%E8%B0%83%E7%94%A8">异步调用</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 不可靠异步调用 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E6%9C%AC%E5%9C%B0%E8%B0%83%E7%94%A8">本地调用</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 本地调用 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%8F%82%E6%95%B0%E5%9B%9E%E8%B0%83">参数回调</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 参数回调 </td>
<td class='confluenceTd'> 特殊场景使用 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'> Registry </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E4%BA%8B%E4%BB%B6%E9%80%9A%E7%9F%A5">事件通知</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 事件通知,在远程调用执行前后触发 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E6%9C%AC%E5%9C%B0%E5%AD%98%E6%A0%B9">本地存根</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 在客户端执行部分逻辑 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E6%9C%AC%E5%9C%B0%E4%BC%AA%E8%A3%85">本地伪装</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 伪造返回结果,可在失败时执行,或直接执行,用于服务降级 </td>
<td class='confluenceTd'> 需注册中心支持 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%BB%B6%E8%BF%9F%E6%9A%B4%E9%9C%B2">延迟暴露</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 延迟暴露服务,用于等待应用加载warmup数据,或等待spring加载完成 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%BB%B6%E8%BF%9F%E8%BF%9E%E6%8E%A5">延迟连接</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 延迟建立连接,调用时建立 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'> Registry </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E7%B2%98%E6%BB%9E%E8%BF%9E%E6%8E%A5">粘滞连接</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 粘滞连接,总是向同一个提供方发起请求,除非此提供方挂掉,再切换到另一台 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'> Registry </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E4%BB%A4%E7%89%8C%E9%AA%8C%E8%AF%81">令牌验证</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 令牌验证,用于服务授权 </td>
<td class='confluenceTd'> 需注册中心支持 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E8%B7%AF%E7%94%B1%E8%A7%84%E5%88%99">路由规则</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 动态决定调用关系 </td>
<td class='confluenceTd'> 需注册中心支持 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E9%85%8D%E7%BD%AE%E8%A7%84%E5%88%99">配置规则</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 动态下发配置,实现功能的开关 </td>
<td class='confluenceTd'> 需注册中心支持 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E8%AE%BF%E9%97%AE%E6%97%A5%E5%BF%97">访问日志</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 访问日志,用于记录调用信息 </td>
<td class='confluenceTd'> 本地存储,影响性能,受磁盘大小限制 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E5%88%86%E5%B8%83%E5%BC%8F%E4%BA%8B%E5%8A%A1">分布式事务</a> </td>
<td class='confluenceTd'> Research </td>
<td class='confluenceTd'> JTA/XA三阶段提交事务 </td>
<td class='confluenceTd'> 不稳定 </td>
<td class='confluenceTd'> 不可用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>
</div>
<h3><a name="UserGuide-zh-%E7%AD%96%E7%95%A5%E6%88%90%E7%86%9F%E5%BA%A6"></a>策略成熟度</h3>
<p>(<a href="#UserGuide-zh-%E7%AD%96%E7%95%A5%E6%88%90%E7%86%9F%E5%BA%A6">#</a>)</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-Zookeeper%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83">Zookeeper注册中心</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 支持基于网络的集群方式,有广泛周边开源产品,建议使用dubbo-2.3.3以上版本(推荐使用) </td>
<td class='confluenceTd'> 依赖于Zookeeper的稳定性 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-Redis%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83">Redis注册中心</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 支持基于客户端双写的集群方式,性能高 </td>
<td class='confluenceTd'> 要求服务器时间同步,用于检查心跳过期脏数据 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-Multicast%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83">Multicast注册中心</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 去中心化,不需要安装注册中心 </td>
<td class='confluenceTd'> 依赖于网络拓普和路由,跨机房有风险 </td>
<td class='confluenceTd'> 小规模应用或开发测试环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-Simple%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83">Simple注册中心</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> Dogfooding,注册中心本身也是一个标准的RPC服务 </td>
<td class='confluenceTd'> 没有集群支持,可能单点故障 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-Simple%E7%9B%91%E6%8E%A7%E4%B8%AD%E5%BF%83">Simple监控中心</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 支持JFreeChart统计报表 </td>
<td class='confluenceTd'> 没有集群支持,可能单点故障,但故障后不影响RPC运行 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-dubbo%253A%252F%252F">Dubbo协议</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 采用NIO复用单一长连接,并使用线程池并发处理请求,减少握手和加大并发效率,性能较好(推荐使用) </td>
<td class='confluenceTd'> 在大文件传输时,单一连接会成为瓶颈 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-rmi%253A%252F%252F">Rmi协议</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 可与原生RMI互操作,基于TCP协议 </td>
<td class='confluenceTd'> 偶尔会连接失败,需重建Stub </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-hessian%253A%252F%252F">Hessian协议</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 可与原生Hessian互操作,基于HTTP协议 </td>
<td class='confluenceTd'> 需hessian.jar支持,http短连接的开销大 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> Netty Transporter </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> JBoss的NIO框架,性能较好(推荐使用) </td>
<td class='confluenceTd'> 一次请求派发两种事件,需屏蔽无用事件 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> Mina Transporter </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 老牌NIO框架,稳定 </td>
<td class='confluenceTd'> 待发送消息队列派发不及时,大压力下,会出现FullGC </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> Grizzly Transporter </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> Sun的NIO框架,应用于GlassFish服务器中 </td>
<td class='confluenceTd'> 线程池不可扩展,Filter不能拦截下一Filter </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> Hessian Serialization </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 性能较好,多语言支持(推荐使用) </td>
<td class='confluenceTd'> Hessian的各版本兼容性不好,可能和应用使用的Hessian冲突,Dubbo内嵌了hessian3.2.1的源码 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> Dubbo Serialization </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 通过不传送POJO的类元信息,在大量POJO传输时,性能较好 </td>
<td class='confluenceTd'> 当参数对象增加字段时,需外部文件声明 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> Json Serialization </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 纯文本,可跨语言解析,缺省采用FastJson解析 </td>
<td class='confluenceTd'> 性能较差 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> Java Serialization </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> Java原生支持 </td>
<td class='confluenceTd'> 性能较差 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> Javassist ProxyFactory </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 通过字节码生成代替反射,性能比较好(推荐使用) </td>
<td class='confluenceTd'> 依赖于javassist.jar包,占用JVM的Perm内存,Perm可能要设大一些:java&nbsp;-XX:PermSize=128m </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> Jdk ProxyFactory </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> JDK原生支持 </td>
<td class='confluenceTd'> 性能较差 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-FailoverCluster">Failover Cluster</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 失败自动切换,当出现失败,重试其它服务器,通常用于读操作(推荐使用) </td>
<td class='confluenceTd'> 重试会带来更长延迟 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-FailfastCluster">Failfast Cluster</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 快速失败,只发起一次调用,失败立即报错,通常用于非幂等性的写操作 </td>
<td class='confluenceTd'> 如果有机器正在重启,可能会出现调用失败 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-FailsafeCluster">Failsafe Cluster</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 失败安全,出现异常时,直接忽略,通常用于写入审计日志等操作 </td>
<td class='confluenceTd'> 调用信息丢失 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Monitor </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-FailbackCluster">Failback Cluster</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 失败自动恢复,后台记录失败请求,定时重发,通常用于消息通知操作 </td>
<td class='confluenceTd'> 不可靠,重启丢失 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Registry </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-ForkingCluster">Forking Cluster</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 并行调用多个服务器,只要一个成功即返回,通常用于实时性要求较高的读操作 </td>
<td class='confluenceTd'> 需要浪费更多服务资源 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-BroadcastCluster">Broadcast Cluster</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 广播调用所有提供者,逐个调用,任意一台报错则报错,通常用于更新提供方本地状态 </td>
<td class='confluenceTd'> 速度慢,任意一台报错则报错 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-RandomLoadBalance">Random LoadBalance</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 随机,按权重设置随机概率(推荐使用) </td>
<td class='confluenceTd'> 在一个截面上碰撞的概率高,重试时,可能出现瞬间压力不均 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-RoundRobinLoadBalance">RoundRobin LoadBalance</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 轮循,按公约后的权重设置轮循比率 </td>
<td class='confluenceTd'> 存在慢的机器累积请求问题,极端情况可能产生雪崩 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-LeastActiveLoadBalance">LeastActive LoadBalance</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 最少活跃调用数,相同活跃数的随机,活跃数指调用前后计数差,使慢的机器收到更少请求 </td>
<td class='confluenceTd'> 不支持权重,在容量规划时,不能通过权重把压力导向一台机器压测容量 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-ConsistentHashLoadBalance">ConsistentHash LoadBalance</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 一致性Hash,相同参数的请求总是发到同一提供者,当某一台提供者挂时,原本发往该提供者的请求,基于虚拟节点,平摊到其它提供者,不会引起剧烈变动 </td>
<td class='confluenceTd'> 压力分摊不均 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E6%9D%A1%E4%BB%B6%E8%B7%AF%E7%94%B1%E8%A7%84%E5%88%99">条件路由规则</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 基于条件表达式的路由规则,功能简单易用 </td>
<td class='confluenceTd'> 有些复杂多分支条件情况,规则很难描述 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-%E8%84%9A%E6%9C%AC%E8%B7%AF%E7%94%B1%E8%A7%84%E5%88%99">脚本路由规则</a> </td>
<td class='confluenceTd'> Tested </td>
<td class='confluenceTd'> 基于脚本引擎的路由规则,功能强大 </td>
<td class='confluenceTd'> 没有运行沙箱,脚本能力过于强大,可能成为后门 </td>
<td class='confluenceTd'> 试用 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<th class='confluenceTh'> <font color="#000000">Feature</font> </th>
<th class='confluenceTh'> <font color="#000000">Maturity</font> </th>
<th class='confluenceTh'> <font color="#000000">Strength</font> </th>
<th class='confluenceTh'> <font color="#000000">Problem</font> </th>
<th class='confluenceTh'> <font color="#000000">Advise</font> </th>
<th class='confluenceTh'> <font color="#000000">User</font> </th>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-SpringContainer">Spring Container</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 自动加载META-INF/spring目录下的所有Spring配置 </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-JettyContainer">Jetty Container</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 启动一个内嵌Jetty,用于汇报状态 </td>
<td class='confluenceTd'> 大量访问页面时,会影响服务器的线程和内存 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
<tr>
<td class='confluenceTd'> <a href="#UserGuide-zh-Log4jContainer">Log4j Container</a> </td>
<td class='confluenceTd'> Stable </td>
<td class='confluenceTd'> 自动配置log4j的配置,在多进程启动时,自动给日志文件按进程分目录 </td>
<td class='confluenceTd'> 用户不能控制log4j的配置,不灵活 </td>
<td class='confluenceTd'> 可用于生产环境 </td>
<td class='confluenceTd'> Alibaba </td>
</tr>
</tbody></table>
</div>
<h2><a name="UserGuide-zh-%E9%85%8D%E7%BD%AE"></a>配置</h2>
<p>(<a href="Configs-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Configs-zh" title="Configs-zh">+</a>) (<a href="#UserGuide-zh-%E9%85%8D%E7%BD%AE">#</a>)</p>
<h3><a name="UserGuide-zh-Xml%E9%85%8D%E7%BD%AE"></a>Xml配置</h3>
<p>(<a href="Xml+Config-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Xml+Config-zh" title="Xml Config-zh">+</a>) (<a href="#UserGuide-zh-Xml%E9%85%8D%E7%BD%AE">#</a>)</p>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>配置项说明</b><br />详细配置项,请参见:<a href="#UserGuide-zh-%E9%85%8D%E7%BD%AE%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C">配置参考手册</a> (<a href="Configuration+Reference-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Configuration+Reference-zh" title="Configuration Reference-zh">+</a>)</td></tr></table></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>API使用说明</b><br />如果不想使用Spring配置,而希望通过API的方式进行调用,请参见:<a href="#UserGuide-zh-API%E9%85%8D%E7%BD%AE">API配置</a> (<a href="API+Config-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/API+Config-zh" title="API Config-zh">+</a>)</td></tr></table></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>配置使用说明</b><br />想知道如何使用配置,请参见:<a href="#UserGuide-zh-%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8">快速启动</a> (<a href="Quick+Start-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Quick+Start-zh" title="Quick Start-zh">+</a>)</td></tr></table></div>
<p>示例:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>provider.xml</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"&gt;
&lt;dubbo:application name="hello-world-app" /&gt;
&lt;dubbo:registry address="multicast://224.5.6.7:1234" /&gt;
&lt;dubbo:protocol name="dubbo" port="20880" /&gt;
&lt;dubbo:service interface="com.alibaba.dubbo.demo.DemoService" ref="demoServiceLocal" /&gt;
&lt;dubbo:reference id="demoServiceRemote" interface="com.alibaba.dubbo.demo.DemoService" /&gt;
&lt;/beans&gt;]]></script>
</div></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>所有标签者支持自定义参数,用于不同扩展点实现的特殊配置。</td></tr></table></div>
<p>如:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;dubbo:protocol name="jms"&gt;
&lt;dubbo:parameter key="queue" value="http://10.20.160.198/wiki/display/dubbo/10.20.31.22" /&gt;
&lt;/dubbo:protocol&gt;]]></script>
</div></div>
<p>或:(2.1.0开始支持)</p>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="warning-3.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>注意声明:xmlns:p="http://www.springframework.org/schema/p"</td></tr></table></div>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"&gt;
&lt;dubbo:protocol name="jms" p:queue="http://10.20.160.198/wiki/display/dubbo/10.20.31.22" /&gt;
&lt;/beans&gt;]]></script>
</div></div>
<p><b>Configuration Relation:</b></p>
<p><span class="image-wrap" style=""><img src="dubbo-config.jpg-version=1&modificationDate=1330708121000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/7668102/dubbo-config.jpg?version=1&modificationDate=1330708121000" style="border: 0px solid black" /></span></p>
<ul>
<li><a href="#UserGuide-zh-%253Cdubbo%253Aservice%252F%253E">&lt;dubbo:service/&gt;</a> 服务配置,用于暴露一个服务,定义服务的元信息,一个服务可以用多个协议暴露,一个服务也可以注册到多个注册中心。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Areference%252F%253E">&lt;dubbo:reference/&gt;</a> 引用配置,用于创建一个远程服务代理,一个引用可以指向多个注册中心。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Aprotocol%252F%253E">&lt;dubbo:protocol/&gt;</a> 协议配置,用于配置提供服务的协议信息,协议由提供方指定,消费方被动接受。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Aapplication%252F%253E">&lt;dubbo:application/&gt;</a> 应用配置,用于配置当前应用信息,不管该应用是提供者还是消费者。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Amodule%252F%253E">&lt;dubbo:module/&gt;</a> 模块配置,用于配置当前模块信息,可选。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Aregistry%252F%253E">&lt;dubbo:registry/&gt;</a> 注册中心配置,用于配置连接注册中心相关信息。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Amonitor%252F%253E">&lt;dubbo:monitor/&gt;</a> 监控中心配置,用于配置连接监控中心相关信息,可选。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Aprovider%252F%253E">&lt;dubbo:provider/&gt;</a> 提供方的缺省值,当ProtocolConfig和ServiceConfig某属性没有配置时,采用此缺省值,可选。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Aconsumer%252F%253E">&lt;dubbo:consumer/&gt;</a> 消费方缺省配置,当ReferenceConfig某属性没有配置时,采用此缺省值,可选。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Amethod%252F%253E">&lt;dubbo:method/&gt;</a> 方法配置,用于ServiceConfig和ReferenceConfig指定方法级的配置信息。</li>
<li><a href="#UserGuide-zh-%253Cdubbo%253Aargument%252F%253E">&lt;dubbo:argument/&gt;</a> 用于指定方法参数配置。</li>
</ul>
<p><b>Configuration Override:</b></p>
<p><span class="image-wrap" style=""><img src="dubbo-config-override.jpg-version=1&modificationDate=1330708128000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/7668102/dubbo-config-override.jpg?version=1&modificationDate=1330708128000" style="border: 0px solid black" /></span> </p>
<ul>
<li>上图中以timeout为例,显示了配置的查找顺序,其它retries, loadbalance, actives等类似。
<ul>
<li>方法级优先,接口级次之,全局配置再次之。</li>
<li>如果级别一样,则消费方优先,提供方次之。</li>
</ul>
</li>
<li>其中,服务提供方配置,通过URL经由注册中心传递给消费方。</li>
<li>建议由服务提供方设置超时,因为一个方法需要执行多长时间,服务提供方更清楚,如果一个消费方同时引用多个服务,就不需要关心每个服务的超时设置。</li>
<li>理论上ReferenceConfig的非服务标识配置,在ConsumerConfig,ServiceConfig, ProviderConfig均可以缺省配置。</li>
</ul>
<h3><a name="UserGuide-zh-%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE"></a>属性配置</h3>
<p>(<a href="Properties+Config-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Properties+Config-zh" title="Properties Config-zh">+</a>) (<a href="#UserGuide-zh-%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE">#</a>)</p>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>如果公共配置很简单,没有多注册中心,多协议等情况,或者想多个Spring容器想共享配置,可以使用dubbo.properties作为缺省配置。</td></tr></table></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="check.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Dubbo将自动加载classpath根目录下的dubbo.properties,可以通过JVM启动参数:-Ddubbo.properties.file=xxx.properties 改变缺省配置位置。</td></tr></table></div>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="warning-3.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>如果classpath根目录下存在多个dubbo.properties,比如多个jar包中有dubbo.properties,Dubbo会任意加载,并打印Error日志,后续可能改为抛异常。</td></tr></table></div>
<p>映射规则:</p>
<ul>
<li>将XML配置的标签名,加属性名,用点分隔,多个属性拆成多行:
<ul>
<li>比如:dubbo.application.name=foo等价于&lt;dubbo:application name="foo" /&gt;</li>
<li>比如:dubbo.registry.address=10.20.153.10:9090等价于&lt;dubbo:registry address="10.20.153.10:9090" /&gt;</li>
</ul>
</li>
<li>如果XML有多行同名标签配置,可用id号区分,如果没有id号将对所有同名标签生效:
<ul>
<li>比如:dubbo.protocol.rmi.port=1234等价于&lt;dubbo:protocol id="rmi" name="rmi" port="1099" /&gt; (协议的id没配时,缺省使用协议名作为id)</li>
<li>比如:dubbo.registry.china.address=10.20.153.10:9090等价于&lt;dubbo:registry id="china" address="10.20.153.10:9090" /&gt;</li>
</ul>
</li>
</ul>
<p>典型配置如:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>dubbo.properties</b></div><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[dubbo.application.name=foo
dubbo.application.owner=bar
dubbo.registry.address=10.20.153.10:9090]]></script>
</div></div>
<p><span class="image-wrap" style=""><img src="dubbo-properties-override.jpg-version=1&modificationDate=1326771444000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/6950129/dubbo-properties-override.jpg?version=1&modificationDate=1326771444000" style="border: 0px solid black" /></span></p>
<p>覆盖策略:</p>
<ul>
<li>JVM启动-D参数优先,这样可以使用户在部署和启动时进行参数重写,比如在启动时需改变协议的端口。</li>
<li>XML次之,如果在XML中有配置,则dubbo.properties中的相应配置项无效。</li>
<li>Properties最后,相当于缺省值,只有XML没有配置时,dubbo.properties的相应配置项才会生效,通常用于共享公共配置,比如应用名。</li>
</ul>
<h3><a name="UserGuide-zh-%E6%B3%A8%E8%A7%A3%E9%85%8D%E7%BD%AE"></a>注解配置</h3>
<p>(<a href="Annotation+Config-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Annotation+Config-zh" title="Annotation Config-zh">+</a>) (<a href="#UserGuide-zh-%E6%B3%A8%E8%A7%A3%E9%85%8D%E7%BD%AE">#</a>)</p>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="warning-3.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>2.2.1以上版本支持</td></tr></table></div>
<p>服务提供方注解:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[import com.alibaba.dubbo.config.annotation.Service;
@Service(version="1.0.0")
public class FooServiceImpl implements FooService {
// ......
}]]></script>
</div></div>
<p>服务提供方配置:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;!-- 公共信息,也可以用dubbo.properties配置 --&gt;
&lt;dubbo:application name="annotation-provider" /&gt;
&lt;dubbo:registry address="127.0.0.1:4548" /&gt;
&lt;!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 --&gt;
&lt;dubbo:annotation package="com.foo.bar.service" /&gt;]]></script>
</div></div>
<p>服务消费方注解:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;
@Component
public class BarAction {
@Reference(version="1.0.0")
private FooService fooService;
}]]></script>
</div></div>
<p>服务消费方配置:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[&lt;!-- 公共信息,也可以用dubbo.properties配置 --&gt;
&lt;dubbo:application name="annotation-consumer" /&gt;
&lt;dubbo:registry address="127.0.0.1:4548" /&gt;
&lt;!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 --&gt;
&lt;dubbo:annotation package="com.foo.bar.action" /&gt;]]></script>
</div></div>
<p>也可以使用:(等价于前面的:&lt;dubbo:annotation package="com.foo.bar.service" /&gt;)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false">