You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Owen Gu <ow...@topcmm.com> on 2008/05/28 17:15:02 UTC

Could mina write the message directly before using a selector

Hi,
A lot of our users complain about the latency problem, If mina could write
the message directly before using a selector to dectect whether the
SocketChannel could be written and when the message counln't be sent
completly, using a selector to write the remaining messages, I think the
latency problem will better than now.

Re: Could mina write the message directly before using a selector

Posted by "이희승 (Trustin Lee)" <tr...@gmail.com>.
I think MINA 1 is more stable, but there are people who are using a MINA 2  
snapshot in production.  It's up to you anyway.

HTH,

On Thu, 29 May 2008 00:56:46 +0900, Owen Gu <ow...@topcmm.com> wrote:

> Hi Trustin,
> Yes, I'm using MINA2, I'll try to edit it. By the way, is MINA2-m1 stable
> than MINA 1.x?
>
> On Wed, May 28, 2008 at 11:45 PM, 이희승 (Trustin Lee)  
> <tr...@gmail.com>
> wrote:
>
>> If you are using MINA 2, please take a look into
>> AbstractPollingIoProcessor.flush().  There's some lines commented out.   
>> You
>> could uncomment that block and give it a try.  You can also provide us  
>> some
>> patch.  It's open source at last. :)
>>
>> HTH,
>>
>>
>> On Thu, 29 May 2008 00:43:02 +0900, Owen Gu <ow...@topcmm.com> wrote:
>>
>>  Hi,
>>> Thanks for your reply, I know a good framework will not expose the
>>> SocketChannel directly, I guess you could add some filter to solve the
>>> problem, could you tell me an approximate time I can get the low  
>>> latency
>>> version, I don't want wait a long time, because it's a big problem for
>>> me:P,
>>> or could give me some hint so I can solve the problem by myself before  
>>> I
>>> get
>>> the new version.
>>>
>>> On Wed, May 28, 2008 at 11:26 PM, 이희승 (Trustin Lee)  
>>> <tr...@gmail.com>
>>> wrote:
>>>
>>>  Hi Owen,
>>>>
>>>> It's a known issue and should be dealt with before MINA 2 RC1.   
>>>> However,
>>>> we
>>>> should not expose SocketChannel directly - we should assure low  
>>>> latency
>>>> even
>>>> without doing so.
>>>>
>>>> HTH,
>>>>
>>>>
>>>> On Thu, 29 May 2008 00:15:02 +0900, Owen Gu <ow...@topcmm.com> wrote:
>>>>
>>>>  Hi,
>>>>
>>>>> A lot of our users complain about the latency problem, If mina could
>>>>> write
>>>>> the message directly before using a selector to dectect whether the
>>>>> SocketChannel could be written and when the message counln't be sent
>>>>> completly, using a selector to write the remaining messages, I think  
>>>>> the
>>>>> latency problem will better than now.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
>>>> --
>>>> what we call human nature is actually human habit
>>>> --
>>>> http://gleamynode.net/
>>>>
>>>>
>>
>>
>> --
>> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>>



-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: Could mina write the message directly before using a selector

Posted by Owen Gu <ow...@topcmm.com>.
Hi Trustin,
Yes, I'm using MINA2, I'll try to edit it. By the way, is MINA2-m1 stable
than MINA 1.x?

On Wed, May 28, 2008 at 11:45 PM, 이희승 (Trustin Lee) <tr...@gmail.com>
wrote:

> If you are using MINA 2, please take a look into
> AbstractPollingIoProcessor.flush().  There's some lines commented out.  You
> could uncomment that block and give it a try.  You can also provide us some
> patch.  It's open source at last. :)
>
> HTH,
>
>
> On Thu, 29 May 2008 00:43:02 +0900, Owen Gu <ow...@topcmm.com> wrote:
>
>  Hi,
>> Thanks for your reply, I know a good framework will not expose the
>> SocketChannel directly, I guess you could add some filter to solve the
>> problem, could you tell me an approximate time I can get the low latency
>> version, I don't want wait a long time, because it's a big problem for
>> me:P,
>> or could give me some hint so I can solve the problem by myself before I
>> get
>> the new version.
>>
>> On Wed, May 28, 2008 at 11:26 PM, 이희승 (Trustin Lee) <tr...@gmail.com>
>> wrote:
>>
>>  Hi Owen,
>>>
>>> It's a known issue and should be dealt with before MINA 2 RC1.  However,
>>> we
>>> should not expose SocketChannel directly - we should assure low latency
>>> even
>>> without doing so.
>>>
>>> HTH,
>>>
>>>
>>> On Thu, 29 May 2008 00:15:02 +0900, Owen Gu <ow...@topcmm.com> wrote:
>>>
>>>  Hi,
>>>
>>>> A lot of our users complain about the latency problem, If mina could
>>>> write
>>>> the message directly before using a selector to dectect whether the
>>>> SocketChannel could be written and when the message counln't be sent
>>>> completly, using a selector to write the remaining messages, I think the
>>>> latency problem will better than now.
>>>>
>>>>
>>>
>>>
>>> --
>>> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
>>> --
>>> what we call human nature is actually human habit
>>> --
>>> http://gleamynode.net/
>>>
>>>
>
>
> --
> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>

Re: Could mina write the message directly before using a selector

Posted by "이희승 (Trustin Lee)" <tr...@gmail.com>.
If you are using MINA 2, please take a look into  
AbstractPollingIoProcessor.flush().  There's some lines commented out.   
You could uncomment that block and give it a try.  You can also provide us  
some patch.  It's open source at last. :)

HTH,

On Thu, 29 May 2008 00:43:02 +0900, Owen Gu <ow...@topcmm.com> wrote:

> Hi,
> Thanks for your reply, I know a good framework will not expose the
> SocketChannel directly, I guess you could add some filter to solve the
> problem, could you tell me an approximate time I can get the low latency
> version, I don't want wait a long time, because it's a big problem for  
> me:P,
> or could give me some hint so I can solve the problem by myself before I  
> get
> the new version.
>
> On Wed, May 28, 2008 at 11:26 PM, 이희승 (Trustin Lee)  
> <tr...@gmail.com>
> wrote:
>
>> Hi Owen,
>>
>> It's a known issue and should be dealt with before MINA 2 RC1.   
>> However, we
>> should not expose SocketChannel directly - we should assure low latency  
>> even
>> without doing so.
>>
>> HTH,
>>
>>
>> On Thu, 29 May 2008 00:15:02 +0900, Owen Gu <ow...@topcmm.com> wrote:
>>
>>  Hi,
>>> A lot of our users complain about the latency problem, If mina could  
>>> write
>>> the message directly before using a selector to dectect whether the
>>> SocketChannel could be written and when the message counln't be sent
>>> completly, using a selector to write the remaining messages, I think  
>>> the
>>> latency problem will better than now.
>>>
>>
>>
>>
>> --
>> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>>



-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: Could mina write the message directly before using a selector

Posted by Mark Webb <el...@gmail.com>.
The easiest way I know of to decrease latency is to cut down on the
filters you are using.  This includes thread pools as well.  Have you
read this page: http://mina.apache.org/configuring-thread-model.html?
It might help you along...




2008/5/28 Owen Gu <ow...@topcmm.com>:
> Hi,
> Thanks for your reply, I know a good framework will not expose the
> SocketChannel directly, I guess you could add some filter to solve the
> problem, could you tell me an approximate time I can get the low latency
> version, I don't want wait a long time, because it's a big problem for me:P,
> or could give me some hint so I can solve the problem by myself before I get
> the new version.
>
> On Wed, May 28, 2008 at 11:26 PM, 이희승 (Trustin Lee) <tr...@gmail.com>
> wrote:
>
>> Hi Owen,
>>
>> It's a known issue and should be dealt with before MINA 2 RC1.  However, we
>> should not expose SocketChannel directly - we should assure low latency even
>> without doing so.
>>
>> HTH,
>>
>>
>> On Thu, 29 May 2008 00:15:02 +0900, Owen Gu <ow...@topcmm.com> wrote:
>>
>>  Hi,
>>> A lot of our users complain about the latency problem, If mina could write
>>> the message directly before using a selector to dectect whether the
>>> SocketChannel could be written and when the message counln't be sent
>>> completly, using a selector to write the remaining messages, I think the
>>> latency problem will better than now.
>>>
>>
>>
>>
>> --
>> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>>
>

Re: Could mina write the message directly before using a selector

Posted by Owen Gu <ow...@topcmm.com>.
Hi,
Thanks for your reply, I know a good framework will not expose the
SocketChannel directly, I guess you could add some filter to solve the
problem, could you tell me an approximate time I can get the low latency
version, I don't want wait a long time, because it's a big problem for me:P,
or could give me some hint so I can solve the problem by myself before I get
the new version.

On Wed, May 28, 2008 at 11:26 PM, 이희승 (Trustin Lee) <tr...@gmail.com>
wrote:

> Hi Owen,
>
> It's a known issue and should be dealt with before MINA 2 RC1.  However, we
> should not expose SocketChannel directly - we should assure low latency even
> without doing so.
>
> HTH,
>
>
> On Thu, 29 May 2008 00:15:02 +0900, Owen Gu <ow...@topcmm.com> wrote:
>
>  Hi,
>> A lot of our users complain about the latency problem, If mina could write
>> the message directly before using a selector to dectect whether the
>> SocketChannel could be written and when the message counln't be sent
>> completly, using a selector to write the remaining messages, I think the
>> latency problem will better than now.
>>
>
>
>
> --
> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>

Re: Could mina write the message directly before using a selector

Posted by "이희승 (Trustin Lee)" <tr...@gmail.com>.
Hi Owen,

It's a known issue and should be dealt with before MINA 2 RC1.  However,  
we should not expose SocketChannel directly - we should assure low latency  
even without doing so.

HTH,

On Thu, 29 May 2008 00:15:02 +0900, Owen Gu <ow...@topcmm.com> wrote:

> Hi,
> A lot of our users complain about the latency problem, If mina could  
> write
> the message directly before using a selector to dectect whether the
> SocketChannel could be written and when the message counln't be sent
> completly, using a selector to write the remaining messages, I think the
> latency problem will better than now.



-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/