Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> NettyServer multi-thread?


Copy link to this message
-
Re: NettyServer multi-thread?
Hi Yang,

That's correct.  The NettyServer constructor uses
Executors.newCachedThreadPool() to create a thread pool for servicing
incoming requests.  The Responder can be invoked by multiple threads from
this thread pool, so the Responder should be thread-safe.

-James
On Wed, Jun 15, 2011 at 7:29 PM, Yang <[EMAIL PROTECTED]> wrote:

> I guess the answer is almost surely that Netty would start multiple threads
> to read the socket channel, just trying to confirm..
>
> when we create a NettyServer, we pass in a Single Responder. if Netty
> underneath creates many threads , the same responder (and netty handler)
> will be shared between these threads, so that I have to be careful in the
> Responder/avro handler implementation, so that it's thread-safe, right?
>
> thanks
> Yang
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB