On September 20, 2007, Matthew Toseland wrote: > On Thursday 20 September 2007 17:37, Jusa Saari wrote: > > What happens to the datastore when a node swaps its position? From what > > I've understood, the requests are routed based on node locations, which > > causes the contents of a node's datastore to reflect its position; if a > > node changes its position to the other side of the position ring, it will > > receive very few requests relevant to its datastore, which means that the > > store will effectively get wiped clean every time the node swaps. > > > > I tried to look at freenetproject.org for this, but the documentation > > there (http://freenetproject.org/understand.html) seems to be describing > > the routing algorithm which predated NGRouting. > > > > So, given this, would it make sense to simply delete from the store any > > keys not near the current location after a swap? They can't be accessed > > anyway except by pure luck, and will simply waste store space which could > > otherwise be used to fill the store up with relevant keys. > > It's not necessary. They will be automatically deleted when new keys are > added, in accordance with the Least Recently Used cache replacement > algorithm. Until new data comes in we may as well keep the old data. > > Also I'd expect *generally* that long range swaps occur mostly towards the > beginning of a node's lifetime, rather than later on.
I am not at all sure of that. I know that is not the case here. I have a node with dynamic address. My typical pattern is get ref to get myself 10 or more 'friends', wait 2 weeks by which time I will be back down to 5 nodes or so. When I add new 'friends' my nodes location shifts wildly... I have a 4G datastore. Question is, is this a common pattern? If it is it could easily lead to low hit ratios. I have always thought that the average location of the keys in the DS should influence the swap algorythm. Ed Tomlinson