You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Arto Pastinen <ar...@gmail.com> on 2008/12/08 09:48:01 UTC

about threading

Hi,

I am working with server, which should be able to open & accept connections.

What i have understand, the IoConnector and IoAcceptor will both
create one new worker thread, is it correct?

I like to do first draft with single thread model so there is no need
to spend time with synchronization.

tnhx, Artsi

Re: about threading

Posted by Arto Pastinen <ar...@gmail.com>.
2008/12/8 Ashish <pa...@gmail.com>:
> For Server, you need to use IoAcceptor.

Yes i am using.

>
> On Mon, Dec 8, 2008 at 2:18 PM, Arto Pastinen <ar...@gmail.com> wrote:
>> Hi,
>>
>> I am working with server, which should be able to open & accept connections.
>>
>> What i have understand, the IoConnector and IoAcceptor will both
>> create one new worker thread, is it correct?
>
> Worker thread for receiving or processing? MINA's processing is Event
> Driven, unlike traditional
> networking applications that use a thread to process a request.

Yes but events are also driven in thread.
I like that there is only ONE worker thread, which serves events from
ioconnector and ioacceptor, is it possible with mina?

>
>> I like to do first draft with single thread model so there is no need
>> to spend time with synchronization.
>
>  Its difficult to say what model you need based on the description provided.
>

Concepts and model are clear to me i don't need help with those. First
draft will be single threaded because it is clear to do. Both
connected and accepted sessions will update and provide data from
databank, and sessions could be open very long time.

Re: about threading

Posted by Ashish <pa...@gmail.com>.
For Server, you need to use IoAcceptor.

On Mon, Dec 8, 2008 at 2:18 PM, Arto Pastinen <ar...@gmail.com> wrote:
> Hi,
>
> I am working with server, which should be able to open & accept connections.
>
> What i have understand, the IoConnector and IoAcceptor will both
> create one new worker thread, is it correct?

Worker thread for receiving or processing? MINA's processing is Event
Driven, unlike traditional
networking applications that use a thread to process a request.

> I like to do first draft with single thread model so there is no need
> to spend time with synchronization.

 Its difficult to say what model you need based on the description provided.