aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Searchtypes  (Read 2854 times)

seize16

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Searchtypes
« on: December 23, 2009, 11:43:46 AM »

Hello everybody,

can anybody please tell me the difference between the search type NODE and NODECOMPLETE? The source confused me a bit in that point.
Thanks a lot.

Kind regards
seize16
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Searchtypes
« Reply #1 on: December 25, 2009, 12:55:39 PM »

First of all, why do you need to know it?
Logged
concordia cum veritate

seize16

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: Searchtypes
« Reply #2 on: December 25, 2009, 04:30:54 PM »

I exmamine the KAD protocol and did not get the difference between the search types.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Searchtypes
« Reply #3 on: December 25, 2009, 09:28:02 PM »

If that's the only question you have after examining the KAD source you are really good.  :)
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

STHNSv2

  • Guest
Re: Searchtypes
« Reply #4 on: December 26, 2009, 03:40:46 AM »

I don't think he examined the KAD source, but I could be wrong as only he knows if he was reading the Search.cpp or just reading KAD proto abstract. But my guess is he was asking the difference between internal search type node and nodecomp.

Far as I remember search type node is used by the routing table to find new random nodes and search nodecomp is used for self lookup with duration of x amount of hours.

What are you just observing how node find other nodes or just trying to understand the bootstrap process works?
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Searchtypes
« Reply #5 on: December 26, 2009, 08:36:45 AM »

Far as I remember search type node is used by the routing table to find new random nodes and search nodecomp is used for self lookup with duration of x amount of hours.
Pretty much true.
Logged
concordia cum veritate

seize16

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: Searchtypes
« Reply #6 on: December 26, 2009, 10:16:17 AM »

Thanks for the replies :-)

I insert for instance two nodes into the KAD network. The first tries to find the second by searching the 128bit node id of the second one. The id was transmitted to the first node via a tcp connection. The purpose is how long it takes to find the second node and which nodes transmit the information like "the node id you've been looking for has IP a.b.c.d". For this case I currently use the search type node complete and hope it is the correct type to do that.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Searchtypes
« Reply #7 on: December 26, 2009, 03:40:40 PM »

For that exact purpose there exists the NODESPECIAL search type.
Code: (src/kademlia/kademlia/Search.h) [Select]
NODESPECIAL, // nodesearch request from requester "outside" of kad to find the IP of a given NodeID
Logged
concordia cum veritate

seize16

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: Searchtypes
« Reply #8 on: December 26, 2009, 07:07:37 PM »

yeah but will that also work if the searcher already is part of the KAD network?
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Searchtypes
« Reply #9 on: December 27, 2009, 09:36:17 AM »

Yes. It couldn't work otherwise.

"outside of kad" in this context means requests originated outside of the kademlia implementation. Kademlia itself is more than happy without any NODESPECIAL searches and it won't start any by itself. For example if we'd have a friend's NodeID and wanted to know his IP, the FriendList would ask  Kad to look it up, which in turn would issue a NODESPECIAL search.
Logged
concordia cum veritate

seize16

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: Searchtypes
« Reply #10 on: December 27, 2009, 11:12:04 AM »

Then I'll use this one, thanks!
Logged