> For the moment I will ignore them because I want > to see my application working at least for > peoples who have a 'normal' internet connection.
NAT routers are becoming - if not already - the "normal" connection type ! > Later I will see how can this NAT problem can be solved. > I know something about a NAT translate > the IP but I have no idea how this can be overcome but > I will start looking in to it. Most NAT routers have "port forwarding" which is the solution to your problem. But the "normal" user has no idea about how to configure their router ! And since there is no standard, you'll be exposed to big difficulties. > Also you are right about accessing the list from the server. Obvious I need some kind of script to > handle the requests form the clients. I don't know too much PHP but I think I will find a friend > to write it for me. You can write the scripts using Delphi or other languages. BUT first ask your provider what you are allowed to use for the price you pay. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be ----- Original Message ----- From: "Human" <[EMAIL PROTECTED]> To: "Delphi-Talk Discussion List" <[email protected]> Sent: Monday, May 15, 2006 11:54 AM Subject: Re: designing a simple P2P application - server side > Dear Francois, > thank you very much for your ideas. I totally forgot about the NAT routers. I never worked with a > NAT router but I know they are dificult devices and lots of programs have problems to pass through > them. > For the moment I will ignore them because I want to see my application working at least for > peoples who have a 'normal' internet connection. > Later I will see how can this NAT problem can be solved. I know something about a NAT translate > the IP but I have no idea how this can be overcome but I will start looking in to it. > > Also you are right about accessing the list from the server. Obvious I need some kind of script to > handle the requests form the clients. I don't know too much PHP but I think I will find a friend > to write it for me. > > I intended to use your ICS. That package is plain great. I didn't put to much internet oriented > code in my programs until now but I made few experiments with ICS and I really like it. > And what the heck, if I can make this work, I will donate the code to ICS. > > > > ============================================= > > > > Cosmin Prund informed me that using the reply button doesn't work to creat a new thread. > I want to appologise to every one who use an email client for inconvenince for messing up the > order of the threads. > I didn't know about this issue, since I am subscribed to this list using my Yahoo account which > can't be read by my email client (Thunderbird). > I never use my real email address for places where it might be made public. I already receive > 100-150 spam emails every day on this 'public' email address. > > ( http://en.wikipedia.org/wiki/Thread_hijacking ) > > > > ============================================= > > > > > > > --- Francois PIETTE <[EMAIL PROTECTED]> wrote: > > > > The difficulty is to make the clients aware of each other. > > > > IMO the most difficult thing is to have a client connect to another one > > which is behind a NAT router or a firewall. > > NAT routers are very very common these days. > > > > > Until now my idea is keep a txt file on the server with RW rights where a > > > client will write its > > > own IP when it enters the network and delete its own address when it > > > leaves the network. > > > > Better to use a standard web server with a few scripts (PHP, ASP or even > > Delphi depending on the hosting possibilities). > > One script will update the IP list, the other will download it. Use a > > timestamp in the list to clean it if a client doesn't do anything for some > > time. > > Your client could use ICS HTTP client (http://www.overbyte.be) to > > query/update the webserver, using the script you'll design. Quite easy. > > > > > 7. I estimate that the maximum number of users in this moment is 50000 and > > > rising (considering the > > > number of downloads per day) so I think there won't be more than 20000 > > > simultaneous connected > > > users at a moment of the day. > > > > With a webserver, you don't have persistant connections. So what really > > count is how many will query the server at the same time given the fact that > > the script accessing the file will execute during - for example - half a > > second. I guess you'll only have a handful of simultaneous connections to > > the server. > > > > > This will generate a list of aprox 0.5MB which is too big. > > > > You need 4 bytes per IP and probably 4 bytes for time stamp. This gives a > > list of 160 KB. > > You can keep the time stamp in another file. So the size will be 80 KB for > > IP only. > > > > > So if you have any better idea please let me know. > > > > You can send only updates to the connecting client. The clients could say: > > "Hey server give me all changes since this time". This would dramatically > > reduce the size. > > > > Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html > > -- > > [EMAIL PROTECTED] > > The author for the freeware multi-tier middleware MidWare > > The author of the freeware Internet Component Suite (ICS) > > http://www.overbyte.be > > > > > > > > ----- Original Message ----- > > From: "Human" <[EMAIL PROTECTED]> > > To: "Delphi-Talk Discussion List" <[email protected]> > > Sent: Sunday, May 14, 2006 1:32 PM > > Subject: designing a simple P2P application - server side > > > > > > > Hello. > > > I want to write a simple P2P module (for one of my existing applications > > > application) specialized > > > in transferring small files (max 0.5 or 1 MB) but I would like not to keep > > > a central server. > > > A P2P network without server is difficult to realize so I think I really > > > need a minimum central > > > server. > > > The difficulty is to make the clients aware of each other. > > > Until now my idea is keep a txt file on the server with RW rights where a > > > client will write its > > > own IP when it enters the network and delete its own address when it > > > leaves the network. > > > Any client connected to the network will read that file to know who else > > > it present in the > > > network. > > > In this moment the clients won't need the server anymore. They connect to > > > each other directly and > > > start the download. > > > > > > Items and issues: > > > 0. The server is running Windows but it is not mine so I can't write my > > > own custom software > > > (although I think they allow my to write and install small .Net > > > application on their server) > > > 1. Every client must renew its IP (and timestamp) in the server's list > > > every at 3 hours > > > 2. It must download a new IP list at every 20 minutes > > > 3. The list must be small > > > 4. What will happen if 2 clients will simultaneously try to write to the > > > list? > > > 5. What happens when a client suddenly leave the network without deleting > > > its IP from the list > > > (probably the list must be cleaned by a special utility) > > > 6. Idea: when a client enters the network it can send a message to every > > > already connected client > > > to inform them about its presence so they don't need to re-download the > > > list too often from the > > > server. > > > 7. I estimate that the maximum number of users in this moment is 50000 and > > > rising (considering the > > > number of downloads per day) so I think there won't be more than 20000 > > > simultaneous connected > > > users at a moment of the day. This will generate a list of aprox 0.5MB > > > which is too big. So in > > > order to decrease the download: > > > -compression needed > > > -more than a list is required > > > > > > So if you have any better idea please let me know. > > > > > > > > > If I choose Christianity then the Islamic will say I'm a pagan. > > > If I choose Islamic then the Buddhism will say I'm a pagan. > > > If I chose Buddhism then the Jewish will say I'm pagan. > > > If I choose no God then everybody will say I'm pagan. > > > Please, can I be free? Can you NOT tell me how I should live MY life? > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam protection around > > > http://mail.yahoo.com > > > __________________________________________________ > > > Delphi-Talk mailing list -> [email protected] > > > http://www.elists.org/mailman/listinfo/delphi-talk > > > > __________________________________________________ > > Delphi-Talk mailing list -> [email protected] > > http://www.elists.org/mailman/listinfo/delphi-talk > > > > > If I choose Christianity then the Islamic will say I'm a pagan. > If I choose Islamic then the Buddhism will say I'm a pagan. > If I chose Buddhism then the Jewish will say I'm pagan. > If I choose no God then everybody will say I'm pagan. > Please, can I be free? Can you NOT tell me how I should live MY life? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > __________________________________________________ > Delphi-Talk mailing list -> [email protected] > http://www.elists.org/mailman/listinfo/delphi-talk __________________________________________________ Delphi-Talk mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi-talk
