Alright i think i have a clue know...
Anyway if you though decide to use nio i can just
advise to use mina. 
I think its easy to use and a lot of people who have
experiance with nio said mina greatly simplify things.
And you should be able to easily use the
StreamIoHandler in the way you want so you will have
no thread per handler.

greetings
Johannes 



--- Doug Cutting <[EMAIL PROTECTED]> schrieb:
> In general, you are correct.  But Nutch's IPC is
> somewhere between. 
> Requests and responses are discreet messages, but of
> potentially 
> unlimited size, and not length-prefixed.  So streams
> and threads are 
> required to parse a request.  But we don't expect
> individual clients to 
> be hammering the server with repeated requests,
> rather with periodic 
> requests every second or so.  When a connection is
> between requests it 
> needs no thread.  Thus a thread gets input on a
> connection until a 
> request is parsed, then disassociates itself from
> that connection. 
> Things only get complicated if multiple requests
> from a client are 
> merged into a single i/o event.  This is unlikely,
> but when it occurs 
> that thread is forced to immediately handle another
> request from the 
> same client, which could result in the starving of
> other clients.  But 
> as long as most individual clients don't make
> requests too quickly this 
> shouldn't be a problem.
> 
> But I still think I'm most likely to just use
> kernels and JVMs that 
> efficiently handle lots of threads and avoid the
> complexity of async nio.
> 
> Doug
> 



        

        
                
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: 
http://mail.yahoo.de

Reply via email to