Archive for the 'NMDC' Category

Number your Result

Tuesday, July 11th, 2006

I assume you are by now a NMDC-search-hating person. All heil ADC’s search!

Yeah, I bit strong I know… But still. The NMDC-suckiness continues with the number of search results you recieve.

In NMDC, when sending a search, you will either get (from each user) 5 results if you are in Passive mode or 10 if you are in active mode. ADC have this restriction also. “Okay… Then what’s sucky if they’re the same?” Well, it’s a matter of which results you recieve.

In NMDC, there are no way to say “I want this, but not that”. In ADC on the other hand, there is; “Each filename (including the path to it) should be matched using case insensitive substring search as follows: match all AN, remove those that match any NO […] “. In laymans terms, “if I specify in the search that I want only file names (and paths) that have ’linux’ and doesn’t have ‘ubuntu’ in it (file name/path), I will only recieve results that have ‘linux’ in the file name/path and the sender of the results will have discarded all file names and paths matching ‘ubuntu’.”

So you dig through the archives, and find Filtering…, and think “hey! It says there I can filter out search results with -foo!”… Well, you’d be filtering the recieved results in NMDC. (Ehm, said ADC functionality, in DC++, doesn’t currently exist, mind you…)

If you don’t understand the problem; When you are sending a search in NMDC, the sender of the results does not do ANY filtering. He’ll send you the first 5 or 10 results said client can find. The client couldn’t care less if you don’t want ‘ubuntu’. But, in ADC, the sender of the results will know “hm, I can’t just blindly send results, this person has specifically said ‘ubuntu’ is not desired.”

Answer to Pop quiz: Downloading in NMDC hubs

Friday, June 30th, 2006

Time for the answer to the Pop quiz: Downloading in NMDC hubs.

First off, I want to congratulate poy for giving us the correct answers;
Q: How do you get the three files simultaniously from that user? (With DC++ 0.674)
A: Alternative b); use a different user name in all hubs.

Q: How do you get the three files simultaniously from that user? (With DC++ 0.691)
A: Alternative a); use the same user name in all hubs and b) use a different user name in all hubs.
Why alternative b) with DC++ 0.674? Well, it all has to do with how DC++ treat users. Users are identified by nick name alone (in 0.674), meaning that DC++ think “hey, you can’t start another transfer just yet from ‘foobar’, you are already downloading from him!”/”hey, you can’t start another transfer yet to _yournick_, you are already uploading to him!”. The “problem” is that there is no notification (eg, a reprahasing of what I just wrote).

Why is this different in DC++ 0.691 then? Why is option a) also correct? Because DC++ has changed its identification scheme. Now, DC++ identifies users with nick name and the hub address. This makes downloading files simultaniously incredibly easier with DC++ 0.691. You see, when DC++ check if it can connect to users, it looks at the CID of the user (CID is this identification, it basically is “encode with the Base32 mechanism[hash with Tiger[nick name + hub address]]”), and yet the nick name for is the same in the various hubs, the hub addresses surely aren’t. This is terms mean that DC++ think “not same user, allow transfer”, and we have ourselves a simultanious downloads.
This new scheme meant (as you’ve noticed) that all users in the queue and the favorite users were gone. The reason is above. The users had no CID, meaning DC++ thought “no CID, I have no idea who these people are, better get rid of them”. Now, there could have beeen some form of “conversion” for the favorite users, considering DC++ does store the hub name for the users, but it does not (as far as I know, I haven’t checked) for the queue. (I am not going to do a patch or any tool. Forget about it.)
What do you think? Was the old scheme better or is the new one? (Ignoring the upgrading problems.)
I’m hesitant to answer that question myself.

Pop quiz: Downloading in NMDC hubs

Saturday, June 24th, 2006

To increase the interaction between the blog and our blog readers, I thought we could have a “pop quiz”. I’ll also be so kind to have multiple choices for you to pick from.

Today’s pop quiz;
You are using an unmodified version of DC++ 0.674. You are connected to 3 (three) NMDC hubs with no relation. (They aren’t connected through a “network” that is.) You are looking for the files A, B and C. You find user “foobar” in the three hubs (the same user accross hubs) who have all the files you’re looking for. This user is also using an unmodified version of DC++ 0.674. Now, the question is; How do you get the three files simultaniously from that user? Speed is not a matter, neither is active vs passive mode and there’s no hub restrictions or slot restrictions from “foobar”.
Do you
a) use the same user name in all hubs
b) use a different user name in all hubs
c) call two friends and asks them to download file B respectively file C while you download file A. You then walk over to their homes and burn the files on a CD.
d) completely ignores the question I asked and download the files in a row (that is, not simultaniously).
e) say I’m stupid because “foobar”’s copy of DC++ will use the IP to not allow you to download them simultaniously.
f) none of the above, you… (fill in what you do)

Now, the same question, but with the difference that you and “foobar” are both using DC++ 0.691.
It would be neat if you have an explanation why you chose that particular option, but you don’t have to; I’ll explain later which option/answer is correct, and why.

SCH proudly presents $Search

Monday, June 19th, 2006

Ah, yes, today is a “why the NMDC protocol suck and ADC is so great”-post. And today’s protocol bit is brought to you by $Search (paid and sponsored by SCH in ADC) and the file types used. (You should have a look at the Search types post I made a while ago.)

Now, on to the (NMDC) protocol bit. All of the search types are “hard coded” into the protocol, meaning you will need to upgrade other clients to respond to your file type searches. This is unfortunately not enough of the NMDC sillyness. When you pick a certain file type in DC++, DC++ will change the caption of your choice (”Audio” eg) and to a number. This number is predefined (as the wiki post says) and cannot be changed (because otherwise, you’d recieve wrong search results or not get any - depending on what you change the number to). This basically means that you cannot tell DC++ (code wise, considering there is no way to do it in the GUI) to “search for _filename_ but only include audio extension AND video extension”. This is because there is no way to combine the different numbers. Now you’re thinking “but can’t you add them and the send that number out?”, and sure, you can do that. But you won’t get the result your after. Eg, “Audio” is 2 and “Compressed files” is 3. Now, if you add these, they (of course) become 5. Now, the problem is that 5 is “Executables”, making all of the other clients think you’re after “executables” and not “audio” and “compressed files”.

“Sigh… Every time you talk about NMDC, I hear something bad… Fine. So, what’s so good with ADC then?”

Ah, my dearest Watson, it is very simple. In ADC’s SCH, one can specify a “EX” (”extension”) when searching, and the responding client have to match files with atleast one of those EXs. This means that we can specify completely what kind of file types we want - even if the other client hasn’t hard coded any file extensions in its client).

Filtering Redux

Sunday, June 4th, 2006

In a past entry, Fredrik explained what caused the “Filtered” count in the Search Window. What is more interesting to me is the why. Why do all the search windows have to get all of the search results? It has to do with the design of the NMDC protocol by Jon Hess. The $Search sends out the essential information: search terms, size limitations, and search type. The $SR (search result) likewise sends the essential information: result type, directory name, file name, size. What is missing is a way to link a given $SR to the $Search that spawned it.

So, what happens when a user does two searches? The original NMDC client would not let the user do this. It didn’t have the ability to support more than one source for a given queued download, so there were no background searches for alternates. It also did not let the user open more than one window. DC++ does both, so it can have multiple searches happening simultaneously. To make sure each place gets its search results, it broadcasts them to all open search windows as well as the download queue. The windows then display the results that match their search criteria. This is the reason that ADC’s search mechanism has a token associated with it. Each search will have a different token, and each window will pick the results matching that token, with no guessing involved.

The limitations on the NMDC search also extend to other DC clients. Clients wishing to return hits based on the contents of the files will be filtered by DC++, since its search windows expect matches in the file or directory names.

Ports in ADC and NMDC C-C

Tuesday, May 23rd, 2006

If you’ve checked your netstat lately, you will notice a port that is opened that you haven’t explicitly specified. But if you look closely, it is the port you’ve specified under Connection settings+1. (That is, you’ve entered 9999 in Settings, port 9999 and 10000 will be opened and ready for listening.)

I don’t want you to get alarmed here now, because this has nothing to do with “sending information about you and your computer” (aka spyware).

The port you have specified in Settings is the port that will be used in NMDC client-to-client connections. The “port+1″ port, will be used in ADC client-to-client connections.

Why can’t they use the same port? Well, the answer came from the master; The idea of using the same port in both protocols is of course great, the problem is the implementation of said idea. The implementation is basically just so difficult that there is little to gain.

I was poking around in the source code and I think I found the lines where “port+1″ is executed; Line 69 in ConnectionManager.cpp: lastPort++; firstPort = lastPort; Set here firstPort to something else than lastPort.