1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>Client to Client Transfer</title> 7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.62.4" /> 9 <link rel="home" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" /> 10 <link rel="up" href="addfeatures.html" title="Chapter��5.��Additional Features" /> 11 <link rel="previous" href="noautoinit.html" title="Stop Auto-Initialization" /> 12 <link rel="next" href="bulk.html" title="Bulk Transfers" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Client to Client Transfer</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="noautoinit.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��5.��Additional Features</th> 23 <td width="20%" align="right">��<a accesskey="n" href="bulk.html">Next</a></td> 24 </tr> 25 </table> 26 <hr /> 27 </div> 28 <div class="sect1" lang="en" xml:lang="en"> 29 <div class="titlepage"> 30 <div> 31 <div> 32 <h2 class="title" style="clear: both"><a id="c2ctransfer"></a>Client to Client Transfer</h2> 33 </div> 34 </div> 35 <div></div> 36 </div> 37 <p> 38 It is possible to use a replica instead of a master to synchronize another 39 replica. This serves to take the request load off a master that might otherwise 40 occur if multiple replicas attempted to synchronize with the master at the same 41 time. 42 </p> 43 <p> 44 For best results, use this feature combined with the delayed synchronization 45 feature (see <a href="addfeatures.html#delayedsync">Delayed Synchronization</a>). 46 </p> 47 <p> 48 For example, suppose your replication group consists of four environments. Upon 49 application startup, all three replicas will immediately attempt to synchronize 50 with the master. But at the same time, the master itself might be busy with a heavy 51 database write load. 52 </p> 53 <p> 54 To solve this problem, delay synchronization for two of the three replicas. Allow 55 the third replica to synchronize as normal with the master. Then, start 56 synchronization for each of the delayed replicas (since this is a manual process, 57 you can do them one at a time if that best suits your application). 58 Assuming you have configured replica to replica synchronization correctly, the 59 delayed replicas will synchronize using the up-to-date replica, rather than using 60 the master. 61 </p> 62 <p> 63 When you are using the replication framework, you configure replica to replica synchronization by 64 declaring one environment to be a peer of another environment. If an 65 environment is a peer, then 66 it can be used for synchronization purposes. 67 </p> 68 <div class="sect2" lang="en" xml:lang="en"> 69 <div class="titlepage"> 70 <div> 71 <div> 72 <h3 class="title"><a id="fmwrkpeerserver"></a>Identifying Peers</h3> 73 </div> 74 </div> 75 <div></div> 76 </div> 77 <p> 78 You can designate one replica to be a peer of 79 another, and then use this special 80 status for permanent message acknowledgments, 81 and for replica-to-replica synchronization. 82 You might want to do this if you have 83 machines that you know are on fast, reliable 84 network connections and so you are willing to 85 accept the overhead of waiting for 86 acknowledgments from those specific machines. 87 </p> 88 <p> 89 An environment is currently allowed to have only one 90 peer. 91 </p> 92 <p> 93 Note that peers are not required to be a 94 bi-directional. That is, just because machine A 95 declares machine B to be a peer, that does not mean 96 machine B must also declare machine A to be a peer. 97 </p> 98 <p> 99 You declare a peer for the current environment 100 when you add that environment to the list of known 101 sites. You do this by 102 103 <span> 104 constructing a <tt class="classname">ReplicationHostAddress</tt> 105 object that specifies <tt class="literal">true</tt> for the 106 <tt class="literal">isPeer</tt> parameter, and 107 then providing that object to 108 <tt class="methodname">EnvironmentConfig.replicationManagerAddRemoteSite()</tt> 109 when you add the remote site to the 110 local replication site. 111 </span> 112 </p> 113 </div> 114 </div> 115 <div class="navfooter"> 116 <hr /> 117 <table width="100%" summary="Navigation footer"> 118 <tr> 119 <td width="40%" align="left"><a accesskey="p" href="noautoinit.html">Prev</a>��</td> 120 <td width="20%" align="center"> 121 <a accesskey="u" href="addfeatures.html">Up</a> 122 </td> 123 <td width="40%" align="right">��<a accesskey="n" href="bulk.html">Next</a></td> 124 </tr> 125 <tr> 126 <td width="40%" align="left" valign="top">Stop Auto-Initialization��</td> 127 <td width="20%" align="center"> 128 <a accesskey="h" href="index.html">Home</a> 129 </td> 130 <td width="40%" align="right" valign="top">��Bulk Transfers</td> 131 </tr> 132 </table> 133 </div> 134 </body> 135</html> 136