Apache Directory Project - [Mina] Dynamic message detection

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > June 2005 > [Mina] Dynamic message detection





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [Mina] Dynamic message detection
Bharath Sundararaman

2005-06-15, 8:45 pm

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-oTlvBSL8hjVBDgjK7y7TUQ@public.gmane.org]=20
Sent: Wednesday, June 15, 2005 11:26 AM
To: Apache Directory Developers List
Subject: Re: blocking/polling events?

Trustin Lee wrote:

> =20
> 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=20
> connection, and then other connection can starve because other=20
> connection's blocking.



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

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


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



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

--=20
barry kaplan
groups1-oTlvBSL8hjVBDgjK7y7TUQ@public.gmane.org


Trustin Lee

2005-06-15, 8:45 pm

2005/6/16, Bharath Sundararaman <Bharath.Sundararaman-mQz424w23F1Wk0Htik3J/w@public.gmane.org>:
>
> 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/

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com