## open-chord-users

 [Open-chord-users] Replicating data in the network From: Larry Homes - 2009-03-26 16:37:52 Attachments: Message as HTML ```Hello, For a school project we have to design and implement a peer-to-peer network that make data replication decisions based on geographical load. We have already designed the system for the most part, but the implementation is giving us some trouble. I am new to OpenChord, so maybe I am missing something obvious, but how do you specify the node to insert data into? I looked at the api, but the insert method does not take a destination address. I ask because data will have to be replicated from one node to another based on whatever algorithm we end up using and the nodes are identified by their ip addresses. So eventually, one node will have to make a copy of its data and insert it into another node. But I cannot find a method that allows me to specifiy the target. Any help is appreciated ```
 Re: [Open-chord-users] Replicating data in the network From: Sven Kaffille - 2009-03-26 17:29:38 ```-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear Larry, Did you have a look at the excellent paper on Chord by Stoica et al.? It is referenced in our manual. There you can find all you need to know about the purpose of Chord and how it works. Open Chord is only a Java implementation of the ideas developed in that paper. In Chord peers are organized into a ring structure and you do not directly determine the peer that is responsible to store data. You just assign an identifier to the data and the responsible peer is determined with help of that identifier, as each peer has a unique identifier from the same identifier space as the data. So if you have for example an identifier space ranging from 0 to 15 (4 bit) and you have peers with ids 3, 6, 7, and 12 the organization of the network is as follows 3 [Responsible for Data in Range 13;3] -> 6 [4;6] -> 7 [7;7] -> 12 [8;12] -> 3 (here the ring is closed). So if you insert data with identifier 14, it will be stored on peer 3. In Open Chord data is replicated to a number of successors of a peer. This number can be configured in the config file (must at least be 1). So if this number is 2 the next 2 peers in the chord ring receive a copy of the data. In our example peers 6 and 7 will receive a copy of the data with identifier 14. This structure has to be maintained by a chord implementation in the case new peers join or some peers leave and Open Chord does this transparently for its users. You may have a look at the 3 maintenance tasks and the implementation of the finger table and successor list if you want to know how... HTH Kind regards sven -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFJy7ttJkyiyyNQFhIRAqhoAJ94bJpCdv+FBdJB9xmPwODrhj9rsACfdYuB PSdT+YLiIKeKMHvJKjFZuCA= =Y2TI -----END PGP SIGNATURE----- ```