You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Bharath Sundararaman <Bh...@starthis.com> on 2005/06/15 20:47:28 UTC

[Mina] Dynamic message detection

Hi all,

I would like to write a small client-server application where a server
will be able to dynamically decode packets sent by a client. For
example, some parts of the message sent by client can be of a different
type each time; I looked at the Sum up client example and I saw that it
requires some of the classes from Netty. Do I need Netty for an
application of this nature?

Am I being vague in describing the application?

Thanks,

Bharath.

-----Original Message-----
From: Barry Kaplan [mailto:groups1@memelet.com] 
Sent: Wednesday, June 15, 2005 11:26 AM
To: Apache Directory Developers List
Subject: Re: blocking/polling events?

Trustin Lee wrote:

>  
> MINA will work fine even if thread takes long time to process events.

> But There is a possibility that one thread handle more than two 
> connection, and then other connection can starve because other 
> connection's blocking.


For this particular scenario, there will be only one thread since the 
entire fix-engine is to work in synchronous mode, all 
connections/sessions included. (I haven't yet been able to determine 
what types of FIX applications require this, but we need to maintain 
backward compatibility.)

>  
> By default, thread pool filters adjusts its size automatically, and it

> will increase the size of pool to maximum size (default is 
> 'unlimited', oops)  if all threads are busy.  So you'll have to be 
> careful.


What I have not configured any thread pool filters? Specically, no 
protocol pool. Will there be then just one IO thread and one Protocol 
thread?

-- 
barry kaplan
groups1@memelet.com


Re: [Mina] Dynamic message detection

Posted by Trustin Lee <tr...@gmail.com>.
2005/6/16, Bharath Sundararaman <Bh...@starthis.com>: 
> 
> Hi all,
> 
> I would like to write a small client-server application where a server
> will be able to dynamically decode packets sent by a client. For
> example, some parts of the message sent by client can be of a different
> type each time; I looked at the Sum up client example and I saw that it
> requires some of the classes from Netty. Do I need Netty for an
> application of this nature?

 SumUp example only demonstrates how to migrate Netty applications to MINA 
applications with minimal effort. You'll have to use 
DemuxingProtocolCodecFactory. It looks very similar with how Netty decodes 
and encodes messages, but DemuxingProtocolCodecFactory is more clear.
 You'll have to take a look at DemuxingProtocolCodecFactory, MessageEncoder, 
and MessageDecoder.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/