Hi

On 7/24/07, Emmanuel Lecharny <[EMAIL PROTECTED]> wrote:

Hi Rodrigo,

I can tell about LDAP codec support, as I was involved in the ASN.1
codec we are using in Apache Directory Server.

So far, there is nothing existing to generate codec in MINA. We have
started a lab called Dungeon
(http://cwiki.apache.org/confluence/display/labs/dungeon), but due to
lack of time, we haven't gone very far.

Considering you have an ASN.1 compiler which generate codecs, then
using the codec is pretty straigth forward in MINA. The current LDAP
ASN.1 codec is based on a state machine, and is totally statefull (so
that you can stop the decoding in the middle of a stream, and start
again 10 minutes later, as soon as the container associated with the
structure being decoded is kept in memory).

I can see the interest of having a generic ASN.1 compiler coupled with
MINA to provide an efficient stack.


Any ASN.1 code generated by such a compiler could be MINA independent
however I don't know why it would be.  I would predominantly use it for MINA
based protocols.  I guess someone might want the compiler generated code
to produce buffers of bytes for storage on disk but MINA could stream this
to disk or into buffers.

This is an interesting question to explore though.  Perhaps a better devils
advocate exists out there since for now I cannot see the benefit of
separation
in my shoes.

MINA itself is pretty versatile,
but yiu have to be sure that the codec is threadsafe, this is the only
point.


...

Last, not least, I _think_ that writing a BER/CER/DER codec generator
is quite an easy task, compared to a PER codec. And even a BER/CER/DER
codec is not really that simple, if you want to avoid problems like
OutOfMemory exceptions, buffer overflows, and deliver good
performances...


Yes PER is a PITA however it would be nice to have a bunch of encodings.

Ideally it would be nice to have a switch that enables such a codec
generator
to utilize any encoding for an ASN.1 grammar.  So the user of such a tool
just needs to say "use BER" or "use "CER" a wala you have your codec for
a particular encoding.  This would be a dream come true.

And as you say Emmanuel it would be nice to have some configurable controls
to tweak the sizes of PDUs so OOMEs do not occur if not streaming to disk
etc.

Alex

Reply via email to