Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > Phex (Cross-platform) > Help & Support
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

Help & Support Information on the useage and anything else of Phex
- Unless you are using or asking about PHEX, please do not post in this section
(Get ”Phex 3.4.2.163 universal" now)


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3 (permalink)  
Old April 3rd, 2009
arne_bab's Avatar
Draketo, small dragon.
 
Join Date: May 31st, 2002
Location: Heidelberg, Germany
Posts: 1,881
arne_bab is a great assister to others; your light through the dark tunnel
Default

Currently we sort all of the Hosts we have. If a new host comes in, the list gets sorted again and the worst host gets dropped.

The sorting works like this:

We first check if the last connection failed or succeeded. If one succeeded and the other failed, the one with the failed connection gets sorted down and ultimately removed from the list if it loses against everyone.

If that check didn't show a difference, we check both hosts, if they are decent Phex' (high uptime). If one is a decent Phex host and the other one isn't, the decent Phex host wins and the other gets sorted down.

After that we compare the daily uptime and if that doesn't bring a difference, the time we last connected sucessfully.

If there is no difference with that we simply compare the GUID (close to random...).

In one sentence: If we have enough decent Phex hosts, Phex always prefers starting a connection to a decent Phex (we'll likely have to adapt this once there are more Phex' in the network, but in the current situation it's optimal). Phex does no preferencing for incoming connections.

-> https://phex.svn.sourceforge.net/svn...omparator.java

I smiled happily when I saw this algorithm for the first time, since it is so simple, yet extremely efficient.
__________________

-> put this banner into your own signature! <-
--
Erst im Spiel lebt der Mensch.
Nur ludantaj homoj vivas.
GnuFU.net - Gnutella For Users
Draketo.de - Shortstories, Poems, Music and strange Ideas.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 01:43 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.