[ 
https://issues.apache.org/jira/browse/THRIFT-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15059542#comment-15059542
 ] 

Nikita Dolgov commented on THRIFT-2427:
---------------------------------------

1) I have attached a patch for the implementation suggested on Nov 26. 

2) I believe it's not a good idea to copy/paste TBaseAsyncProcessor::process 
into TMultiplexedAsyncProcessor though. Unfortunately TBaseAsyncProcessor is 
not structured for reuse. We should probably consider extracting something like:

{code}
TBaseAsyncProcessor {
    boolean doProcess(AsyncFrameBuffer fb, TProtocol in,TProtocol out) 
{code}

that would enable TMultiplexedProcessor.StoredMessageProtocol-style decoration 
with no TBaseAsyncProcessor code duplication in TMultiplexedAsyncProcessor.

> Add support for Multiplexed Async Processors
> --------------------------------------------
>
>                 Key: THRIFT-2427
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2427
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>            Reporter: Lior Neudorfer
>         Attachments: 
> THRIFT_2427_add_support_for_multiplexed_async_processors_by_copy_pasting_most_of_TBaseAsyn.patch,
>  TMultiplexedAsyncProcessor.java
>
>
> THRIFT-1972 added support for Asynchronous processors to be used with Non 
> blocking servers. THRIFT-563 added support for multiplexed servers.
> I would like to build a Non Blocking server which runs multiple, multiplexed 
> async processors. However, the current Java implementation does not allow a 
> multiplexed asynchronous server:
> 1. TMultiplexedProcessor implements TProcessor, which causes 
> TNonBlockingServer to create a FrameBuffer, not a AsyncFrameBuffer for it.
> 2. TMultiplexedProcessor calls the underlying processors with the 
> {code:xml}process(TProtocol in, TProtocol out){code} method variant, which 
> returns false in TBaseAsyncProcessor. It should, instead, be able to call the 
> {code:xml}process(final AsyncFrameBuffer fb){code} variant.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to