Hi all
When you first run FileScope, it creates a Web Cache within the wizard
process (SWF-UI\Dialogs\WizardDlg.cs line 746) and then saves it to the file
"webcache.fscp".
After this every time that you load FileScope, this file gets loaded and
these servers are used to get a list of possible hosts to connect to.
Now the problem is that, FileScope removes a host from this list if it can
not connect to it (Core\Gnutella\Sck.cs line 268)and this list is written
back to the file every time we close FileScope (Core\StartApp.cs line 123).
In my case when I tried to connect to Gnutella all the servers returned some
kind of an error! So all of them got removed. Now when I closed and reopened
FileScope there were no more servers to even try to connect to!
I don't think we want to remove any of these servers from the list, even if
they are not responding. What I suggest we should do, is to have some kind
of a priority system or a grading system for the web caches.
For example we will have grades from 0 to 20 (0 being best) and they all
start with 5. Now every time that we fail to connect to them their grade
goes up by 1 and every time we are successful their grade goes down by 3.
If they reach 20 they get deleted.
Now when we are connecting we give the priority to the ones that have the
lowest grade.
Also we must have a subnet scanning system to try to find a host within that
user's subnet. After all you would want to be connected to someone close to
you anyways. Right now priority is with the cached hosts and then cached web
servers. I think it should be cached hosts, subnet scan and then web cache.
Let me know what you guys think.
Here is a patch for now to avoid FileScope crashing when there are no more
servers left. I have committed this patch to CVS.
Shervin
Index: ConnectionManager.cs
===================================================================
RCS file: /cvsroot/filescope/filescope/Core/Gnutella/ConnectionManager.cs,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 ConnectionManager.cs
265a266,270
> if(Stats.gnutellaWebCache.Count ==
0)
> {
>
System.Diagnostics.Debug.WriteLine("no more webcache servers");
> return;
> }
|