comp.lang.ada
 help / color / mirror / Atom feed
From: Jano <nono@celes.unizar.es>
Subject: Re: [OT] Two sockets questions
Date: Fri, 9 May 2003 16:42:50 +0200
Date: 2003-05-09T16:42:50+02:00	[thread overview]
Message-ID: <MPG.1925dcd8fd146efa989704@News.CIS.DFN.DE> (raw)
In-Reply-To: jZAua.521606$OV.492985@rwcrnsc54

tmoran@acm.org dice...
> I'm curious why you want to use non-blocking sockets.  It's generally
> easier in Ada to use multiple tasks and let individual tasks block.

Leaving curiosity aside :)? Actually, blocking tasks is my preferred 
option (the one I knew previously and thus find easier). However, I'm 
implementing a p2p application (summary at http://agio.sourceforge.net) 
which likely will need maintaining hundreds or thousands of open 
connections. Also, checking for alive hosts quickly is very interesting 
(hence the connect question). Moreover, it's probable these hosts that I 
must check come in bursts.

I'm a bit afraid of using so many (say two thousands) tasks (are they 
really that light? What computer is necessary for that number? I have a 
pretty decent one, but...) but really I haven't past experiences about 
so many threads. However, as I've never seen an application so task 
intensive, I've think that that is for some reason (my httpd apache uses 
253 and is the most I've seen).

Other ideas I've considered is using selectors and group sockets in 
tasks (on how many sockets can wait a selector?) and, finally, use non-
blocking sockets and use the lowest possible number of tasks.

However, for connect, I can't use select.

P.s: About how many bandwidth consumes a TCP connection for keep-alive? 
:) bonus question I've just think.

-- 
-------------------------
Jano
402450.at.cepsz.unizar.es
-------------------------



  reply	other threads:[~2003-05-09 14:42 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-07 18:03 [OT] Two sockets questions Jano
2003-05-07 18:22 ` Samuel Tardieu
2003-05-07 19:52   ` Stephen Leake
2003-05-07 20:08     ` David C. Hoos
2003-05-07 22:33     ` Jano
2003-05-08  9:10       ` Samuel Tardieu
2003-05-08 21:35         ` Jano
2003-05-09  8:14           ` Samuel Tardieu
2003-05-09 14:32             ` Jano
2003-05-10 14:06         ` Jano
2003-05-10 18:01           ` tmoran
2003-05-10 21:27             ` Samuel Tardieu
2003-05-11 18:01               ` tmoran
2003-05-08 17:48       ` Stephen Leake
2003-05-08 18:42         ` Samuel Tardieu
2003-05-08 21:41           ` Jano
2003-05-08 21:48           ` Jano
2003-05-08 22:35             ` tmoran
2003-05-09 14:42               ` Jano [this message]
2003-05-10  8:57                 ` Tarjei T. Jensen
2003-05-10 16:55                   ` Simon Wright
2003-05-11 18:23                   ` Tarjei T. Jensen
2003-05-11  2:05                 ` tmoran
2003-05-08 21:40         ` Jano
2003-05-07 20:02   ` Jano
2003-05-08  8:57     ` Samuel Tardieu
2003-05-08 21:39       ` Jano
2003-05-08 10:14   ` Preben Randhol
2003-05-08 11:09     ` Samuel Tardieu
2003-05-08 21:40       ` Jano
2003-05-09  8:19         ` Samuel Tardieu
2003-05-08 18:06     ` tmoran
2003-05-07 20:09 ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox