Thread: Freebase & Phex
View Single Post
  #7 (permalink)  
Old July 10th, 2006
arne_bab's Avatar
arne_bab arne_bab is offline
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

Hi,

It's nice to see you again in here

first as & xs:
"as" means: acceptable substitute, which means, you can't be completely sure, if the source really has the correct file, for example to add a http-url, which can have different content later (like an error-page, because the content is down or an updated version of the file). You can use it to serve first sources for a magnet. You can find an example of that useage on my webpage:
- Page with magnets (to songs): http://draketo.de/inhalt/lieder.html
- Magma-list: http://draketo.de/inhalt/lieder/drak...ielliste.magma

"xs" instead means exact source, which contains a definite hash, in most cases the sha1-hash, to identify the content, so it will always be exactly the content you request.

And now as I think of it, the link to your cache should be an "xs", as it identifies the file via its hash. Sadly Phex accepts only one xs-source yet, and I need that one to reference to my own client to deeliver a first source.

Normally a client should first use only "xs"-sources and fall back to as-sources if no xs-sources are avaible.

Exact procedure would be, as far as I know, to

1.) search the network for the file. If the program doesn't find it in time,

2.) try the exact sources, and if they aren't reacheable (or too slow),

3.) try the acceptable substitutes. But if you download from accepteable substitutes, you _must_ check the file after downloading, because it could be corrupt (you should also check other downloaded files, but there it isn't a must).

And for Phex being downloaded quite often: I followed one advice you gave on your page:
"Keep in mind that the cache's efficiency improves if it gets used more, so I'd encourage people to just send me code patches, instead of using it on your own. Because one full cache is better than lots of empty caches. This code doesn't work on a lot of hosts, as you need to be able to read http headers directly."

And since Phex does its internal updates via magnet-links and the gnutella-network (what's the use of creating a p2p-app, when you don't trust it enough to download its updates via its own network?), I added your cache to our update magma-lists.

That means, every Phex which is updated internally contacts your cache and gets additional sources through it.

Should the strain get too much for your server, please tell us at once, so we can take it out of the magnets.

In the meantime, I'd like to say a big "Thank you!"

Your cache is something I hoped to see for years!

And I think it is all that is needed to make Gnutella just as effective as (or even more effective than) BitTorrent, since it doesn't need the cache, but can use it and gets more efficient by doing so (and a Phex will contact it regularly while it downloads (as it seems at the moment, that's once every 6 hours, that's what it tells me for this download), so you can even see who (and how many) has/have been active during the last "half day").

Your cache can be used perfectly together with http-altlocs:
A client gets a magnet and tries the Gnutella network.
If it doesn't find anything, it tries your cache, and if there aren't working clients in there, it downloads via http and becomes a working first source for other clients, who then spare the http-source.
So this eliminates the need to have a seeder running all the time. All that's needed is a http-source (which can be as slow as you want it) and your cache (which I hope is low profile, and which others can include very easily), and voila, you have magnets which are almost guaranteed to work, and fast.

And that's something, which has been missing in Gnutella (since it doesn't have searching by hash, because that would break some of the rather efficient optimizations which are being used (mainy QRP and Dynamic Querying, which each save about 70-90% bandwidth)).

Maybe you could tell the folks over at LimeWire about it. I think they could be quite glad to know about it (they've been trying to make magnets more efficient for some time now, but their solution was a quite heavy customized client instead of a slim server), or better still, tell it to teh Gnutella Developer Forum:
http://groups.yahoo.com/group/the_gdf/

(I can also post there about it, if you'd like me to).

Best wishes,
Arne
__________________

-> 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