Re: MINA3.0 recommended

2017-08-18 Thread Emmanuel Lécharny


Le 18/08/2017 à 15:54, Jonathan Valliere a écrit :
> I don't have the code in front of me, but are you saying that the
> modification of the Write Queue is no longer concurrent?  Possibly the
> Write Queue is a concurrent data structure and the synchronize mechanism is
> no longer required.  It seems odd that someone would remove concurrency
> from that critical section.

Please check the answer on teh dev@mina.a.o mailing list.

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org



Re: MINA3.0 recommended

2017-08-18 Thread Jonathan Valliere
I don't have the code in front of me, but are you saying that the
modification of the Write Queue is no longer concurrent?  Possibly the
Write Queue is a concurrent data structure and the synchronize mechanism is
no longer required.  It seems odd that someone would remove concurrency
from that critical section.

On Thu, Aug 17, 2017 at 11:41 PM, 胡阳  wrote:

> Hi guys:
>
>  I read the source code of MINA3.0M2. The style of the code is
> very good, the structure is clear, the design is concise and efficient,
> especially the use of Selector is unexpected. However, the
> enqueueWriteRequest method and the processWrite method in the
> AbstractNioSession are somewhat flawed.
>
> I see the source code in the enqueueWriteRequest method was originally
> "synchronized (writeQueue)", but was commented out, personal speculation
> may be the author feel that this treatment will affect performance.
>
> My approach is to use CAS to ensure memory visibility and atomic, see I
> see the startSync, finishSync method, feeling that this may be more secure
> after some of the performance will not lose too much.
>
> A little personal humble opinion.
>


Re: MINA3.0 recommended

2017-08-18 Thread Emmanuel Lécharny
Replying on dev@mina.a.o. Thanks to avoid cross posting in the future :-)


Le 18/08/2017 à 05:41, 胡阳 a écrit :
> Hi guys:
>  I read the source code of MINA3.0M2. The style of the code is very 
> good, the structure is clear, the design is concise and efficient, especially 
> the use of Selector is unexpected. However, the enqueueWriteRequest method 
> and the processWrite method in the AbstractNioSession are somewhat flawed.
> I see the source code in the enqueueWriteRequest method was originally 
> "synchronized (writeQueue)", but was commented out, personal speculation may 
> be the author feel that this treatment will affect performance.
> My approach is to use CAS to ensure memory visibility and atomic, see I see 
> the startSync, finishSync method, feeling that this may be more secure after 
> some of the performance will not lose too much.
> A little personal humble opinion.

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org



MINA3.0 recommended

2017-08-18 Thread 胡阳
Hi guys:
 I read the source code of MINA3.0M2. The style of the code is very 
good, the structure is clear, the design is concise and efficient, especially 
the use of Selector is unexpected. However, the enqueueWriteRequest method and 
the processWrite method in the AbstractNioSession are somewhat flawed.
I see the source code in the enqueueWriteRequest method was originally 
"synchronized (writeQueue)", but was commented out, personal speculation may be 
the author feel that this treatment will affect performance.
My approach is to use CAS to ensure memory visibility and atomic, see I see the 
startSync, finishSync method, feeling that this may be more secure after some 
of the performance will not lose too much.
A little personal humble opinion.