<div class="gmail_quote">On Fri, Oct 8, 2010 at 10:02 AM, sreenivasulu velpula <span dir="ltr"><<a href="mailto:v.sreenu@gmail.com">v.sreenu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>Hi,<br> when any node(client/server/storage) is started in Tahoe LAFS, one unique id(my_nodeid) is getting created.<br><br>i have following doubts regarding node id creation. can any one please clear these doubts?<br>
<br> 1.How can tahoe ensures that, every node id is unique ?<br></blockquote><div><br>The node ID is randomly-generated, so there is no way to guarantee its uniqueness. However, the ID is long enough that the probability of two randomly-generated IDs colliding is negligible.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> 2. If upload the same file again and again, tahoe will give the same capability string. How is tahoe identifies that the client is same, when i
upload files mutiple times, is it based on node id ?<br></blockquote><div><br>For immutable files this is true. The capability string is derived from two pieces of information: The content of the file and the "convergence secret". By default, the convergence secret is randomly generated by the node when it first starts up, then stored and re-used after that. So the same file content uploaded from the same node will always have the same cap string. Uploading the file from a different node with a different convergence secret would result in a different cap string -- and a second copy of the file's contents stored in the grid, though there's no way to tell that the two stored files are the same, because they're encrypted with different keys.<br>
<br>On my grid, I set the nodes up to all use the same convergence secret, so a given file is only stored once no matter how many nodes try to upload it. The convergence secret is stored in private/convergence.<br><br> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> 3. When i stop a node and start it again, will the node have the same node id as of previous node start ?<br>
</blockquote><div><br>Yes. The node ID is stored in the my_nodeid file in your tahoe directory.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br> 4. If i move the client node base directory to different maching and start the client there again, will the node have the same node id as of previous machine start ?<br></blockquote><div><br>Yes, as long as you move that my_nodeid file.<br>
</div></div><br>-- <br>Shawn<br>