mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Bosteels" <mbosteels....@gmail.com>
Subject Re: Making ProtocolEncoder and ProtocolDecoder independent from IoSession
Date Fri, 17 Aug 2007 09:03:07 GMT
Trustin.

I like the idea, but I guess some people (like me) use the IoSession for
logging the remote address.
And I guess codec implementations will still depend on mina because of
ProtocolDecoderOutput, right ?

About logging, I guess slf4j does not have something as log4j's NDC concept
?
I have an IoFilter that pushes the remote address in the NDC before
propagating the event and pops it afterwards.
Very handy, because all logging events down the call stack will contain the
remote address, without depending on mina's
SessionLog.

I guess we cannot add this IoFilter to mina since it depends on log4j ?
maybe I should write a wiki page about it ?

Maarten

On 8/17/07, Trustin Lee <trustin@gmail.com> wrote:
>
> Hi all,
>
> Currently, ProtocolEncoder and ProtocolDecoder uses IoSession
> user-defined attributes to store their state information.
>
> If what ProtocolEncoder and ProtocolDecoder do with IoSession is just
> to access user defined attributes, we could simply remove the coupling
> with IoSession and replace it with java.util.Map (or ConcurrentMap).
> By doing this, we can make our codecs reusable across various
> applications, even that don't use MINA as a network layer.
>
> Please let me know if there's a use case that you access other
> properties or operations of IoSession in your codec implementation and
> why it's mandatory.
>
> Thanks in advance,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message