Hi all,

I've spent some time trying to familiarize myself with MINA, reading
tutorials, PowerPoint presentations, source code and examples.

What I lack is a quick architectural overview and a summary of the
type of guarantees MINA gives you as a developer. Questions which I
found hard to get answers to are:

*What are the semantics of the messageReceived method (without
filters)?  Will you receive one message per TCP package? Will the same
ByteBuffer always be reused for the whole message? How are the
positions you set interpreted, and will they be reset? This has been
hinted on this list and in the tutorial for ProtocolDecoder, but more
thorough documentation would be handy.
 Basically I'm worried about not getting the header in one buffer
(HTTP header), so it would be fragmented between two ByteBuffers. Is
this possible? Is there a size limit or so? What if you get a huge
header?

*Why is the cross-request-buffering techniques used in
CumulativeProtocolDecoder and DemuxingProtocolCodecFactory not using
the same interface? Are they different? I can see thet cumulative adds
all messages to an internal buffer, in demuxing I can't really find
any such code, but I might be overlooking something.

*How are you supposed to handle mixed high/low level protocols? For
instance, if you write a HTTP proxy based on header contents, you need
to parse the header into an object at first (maybe using
MessageDecoder)? When the subsequent packages arrive, you will want to
stream them directly. This means that the lower-level filters (the
messageDecoder perhaps), needs to know the result of the higher-level
parsing. Right now I'm doing this by sharing session variables between
layers (low-level checks if higher layer has set a flag in session).
Is this the recommended way?

Finally, thanks a lot for providing nio with a usable interface and
adding all these nice features!

Best Regards

Alexander T

Reply via email to