![]() |
Any ASP coders here? I ppl, I am looking for some ASP coders around here who like to join me coding a Gnutellatracker for ASP (maybe an ASP object maybe just pure ASP code). Since I dont know the Gnutella Protocol (although i read it) I could need some help. Several ppl coding brings more motivation :) |
"Tracker"? What's the actual purpose of this "tracker" (ie., What is it supposed to do) If you could provide a little more details, people might be able to further help you. -- Mike |
I thought about a tracker like the hotline tracker. You can search for files directly on a server. The advantage is that the server has more bandwitdh and is probably connected to more nodes. After the server puts out the ips of the pcs sharing that file you can connect directly to them. Also I wanted to create a hostcache for ASP. |
The hostcache would be very easy to create. It should be made compatible with the GWebCache so clients that existing clients ( such as Gnucleus ) can use it. The tracker could be a good idea if implemented correctly. I assume you would want it to function like a QueryHit cache. If it is to be used for client applications it could be of benefit. If you intend to allow web users to access it ( ie Browsers ), it could be bad for the network since the users downloading will not be uploading. This would be bad because clients that are actively participating in the network will have a harder time downloading. Also, I believe at least a couple of clients may be blocking web browsers. In any case, if you would like some help creating these I would be willing to help. |
1 Attachment(s) Here is an example of an ASP web cache that is compatible with GWebCache 0.6.1. |
****, Why didnt I found that one? I thought I was coding the first one. :( Anyway, I think I will proceed with that coding. I mean maybe it can get better? :) |
Earlier there was a tracker called GNUfrog. It lists all files you search for and downloads them with BearShare (*shiver*). It seemed that this feature was only usable in BearShare. But I tried to access that page few days ago and it has been shut down (or changed the URL). Earlier it was: www.gnufrog.com |
questions about the code looking at the code, i have two questions: why do you put CALL in front of your procedure-calls ? why do you lock the app, for example when increasing a variable: Application.Lock Application("something") = Application ("something") + 1 Application.Unlock what would happen if the app would not be locked during that line ? Thank you ! |
If two user load that code at exactly the same time the program would count the hits wrong. If you lock it the counting will be queued. Hope this helps. |
Quote:
|
tshdos, did you code that hostcache? i have a question: how can i connect to your hostcache using my client? do i just have to enter that url in my client or how can i manage that? |
Quote:
Quote:
|
Small code update 1 Attachment(s) Had to change the line endings and added some checking that should have already been there. |
tshdos, lets work together on a asp hostcache ok? i wanted to code that too but i dont want us to be 'rivals' (look at those childish flames of bearshare and limewire). i have asked that guy who coded that gwebcache for gnucleus: open gnucleus, go to help and their you can report the url of your hostcache. i think they are adding it on their connect1.gnutellanet.com or something like that. however, i dont like that indirect method: i wanted to code a full working visual basic client, and compile it to a dll so i can use it in asp. that client should only connect to other, pass them his known nodes and disconnect. |
ColdFusion GWebCache If anyone is interested, this topic moved me to translate GWebCache from PHP to ColdFusion. It's stable, but requires that you either have CF Pro or Enterprise, not Express, and that CFCONTENT and CFFILE tags are enabled on your host. It can be found at http://www.cultiv8r.com/cultiv8r/gwebcache. Since CFContent is an issue in my case, I'll be translating it to Delphi as well, to make it an ISAPI DLL and/or regular CGI executable (for Windows environments only though). Any interest in such critter? -- Mike |
sure i'm interested cultiv8r! :) but i dont know cf or delphi, but i heard that delphi is the same as pascal (which i learned 5 years ago when i was 10). by the way, i have submitted tshdos' hostcache to gnucleus and its now working.... http://www.uncertaindesign.com/ffsit...spwebcache.asp |
Quote:
Quote:
-- Mike |
Quote:
|
Quote:
-- Mike |
I like the idea of an ISAPI extension and was actually starting to write one in C++ after I finished the ASP one. I was also considering writing a small web server app that would function like the GWebCache but would not be reliant on any web server software. Quote:
cultiv8r, does the cfcontent tag really remove all the extra whitespace? When I used to use cold fusion, that was one thing that really annoyed me. I think when CF5 came out they finally added an option to eliminate the whitespace but I switched to ASP before I ever had a chance to try it. |
Quote:
<CFCONTENT type="text/html" reset="YES"> That's why CF version GWebCache needs that tag enabled, otherwise clients that do not expect a leading space will assume there was an error. If the tag is disabled for security issues, there are some other workarounds for that problem but are not elegant. Wish Allaire/Macromedia put in some efforts in fixing that issue, it's been around for quite a while now. Haven't had the chance to try CF MX yet... -- Mike |
|
I just looked at your newest version (0.3). Looks good but I have a couple of suggestions for you. Line 23: If Request.Querystring("restart") = 1 Then StartASPEngine '//Change The Default Value You should probably remove this or add a check for security. Line 40-47: If Request.Querystring("url") <> "" Then UpdateHostCache Status = "OK" End If If Request.Querystring("ip") <> "" Then UpdateHostCache Status = "OK" End If The way it is setup Request.QueryString("url") is checked up to 4 times and ip is checked up to 3 times. I would suggest changing the behavior of 'UpdateHostCache' to return the status and replace the lines above with: Status = UpdateHostCache() ' Return "" if no update Response.Write Status Line 251-270: Function IsValidIp Should add a little more checking. The way it is right now if I sent the ip 0.0.0.0 or 255.255.255.255 or 999.999.999.999 it would pass even though it shouldn't. Need to block these ips also: 10.*.*.*, 255.255.255.255, 172.16.*.* - 172.31.*.*, 0.0.0.0. ip range 192 should be changed to 192.168.*.* I did this too but unless you can think of a reason, I see no reason to store the ip and port separately. Also, just curious but why no locks? |
Hi tshdos, I said in the readme that you should change the default values due security measures. No locks, yeah... I had some problems with it. I still have no real idea what locks are good for. during the stress test me iis froze. then i killed the locks and it worked. thanks, paradog |
It looks like the reason it froze up is because you have functions that exit without unlocking the application ie: Function asdf Application.Lock If A ="" Then ' should be an application.unlock here Exit Function End If ... Application.Unlock End Function The reason for the locks is to keep the counts correct. An example would be if two clients hit the following line at the same time. Application("count") = Application("count") + 1 If you assume Application("count") = 0 before they hit this line two things could happen. Either it will work fine and the count will be 2 or when both clients get the value of count before adding one they both get the value 0 in which case both clients set the count to 1. Honestly if you are not going to get a lot of hits at the same time you don't really have to worry about this, but it doesn't hurt performance if done correctly. You only need to when updating really. Quote:
But you should probably set the default to something besides 1 since most of the other functions use a 1. Just some advice though. |
Thanks, I really appreciate your help. Would you like to code Lynn with me together? If you want you will get access to my ASP Server too. (Great server: The premium package of www.maximumasp.com) Do you have ICQ? My number is: 94543674 |
Sure I will help. I don't need access to your server though. I have a few servers already. I don't currently have or use ICQ. I might download it later though. |
Well, thats cool. I will try to fix that lock problem, I dont really know how to validate an ip? What range do IPs have? Is it always from 1 to 255? I searched for tshdos on ICQ and I found one are you Kevin? Well it is ok if I add your name on that temporary homepage of Lynn? |
Quote:
Example: Public Const IP_MASKS = "127|192.168|(...)" For Each Mask In Split( IP_MASKS, "|" ) If Left( HostIP, Len( Mask ) ) = Mask ) Then 'block ip ... IPs range from 0 to 255. I am not sure if it is possible to have a 0 as the first number in an ip but it is ok for the others. I also think 255 might be reserved but I will have to check on that. Quote:
Quote:
|
|
|
All times are GMT -7. The time now is 02:07 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2020 Gnutella Forums.
All Rights Reserved.