[
https://issues.apache.org/jira/browse/AVRO-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190812#comment-13190812
]
James Baldassari commented on AVRO-1001:
----------------------------------------
I've verified that AVRO-976 does in fact address this issue. Just create the
NettyServer like this:
{code}
Server server = new NettyServer(
new SpecificResponder(ProtocolInterface.class, new ProtocolImplementation()),
new InetSocketAddress(0),
new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(), Executors.newCachedThreadPool()),
new ExecutionHandler(Executors.newCachedThreadPool()));
{code}
So I don't believe any changes are required in NettyServer to make RPCs execute
concurrently, now that AVRO-976 has been committed. However, I think we may
want to specify an ExecutionHandler by default in the NettyServer, or at least
make the documentation very clear that if an ExecutionHandler is not specified
then each connection will be able to execute only one RPC at a time. I'll
clean up my unit test and submit it anyway.
> Adding thread pool to NettyServerAvroHandler
> --------------------------------------------
>
> Key: AVRO-1001
> URL: https://issues.apache.org/jira/browse/AVRO-1001
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.6.1
> Reporter: Shaun Williams
> Labels: patch
> Attachments: AVRO-1001.patch
>
>
> Request code review.
> The current NettyServer implementation processes each request/response
> sequentially on a single channel. Thus in the case where a second request is
> received from the same client while a request is still being processed, the
> behavior is undefined.
> This patch updates NettyServerAvroHandler.messageReceived() to process each
> request in a separate thread using an ExecutorService.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira