You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Rodrigo Madera <ro...@gmail.com> on 2007/07/25 00:20:43 UTC

Coding ASN.1 Support

Community,

I am in the process of writing the engine (or shall we more appropriately
say "glue"?) as I posted on the other thread that will automatically
generate the encoders for a given Message (or Sequence, in ASN.1 lingo).

Before I go any further, there is something that only the commiters can tell
me: What have you done for ASN.1 support so far?

Anything nice (or sad) that you wish to say when ASN.1 and MINA are on the
same sentence?

Our business is in the need of a library to handle complex binary protocols,
and since we will be using MINA, which has not cost us a single cent, we
will contribute everything we make as Open Source.

Our current plan is to use a compiler for ASN.1 (we are looking at
BinaryNotes) and use the generated classes for the Apache BCEL input so we
can get the automatic code generation for MINA Encoders/Decoders.

Please share your thoughts and experience with this matter.

Thank you for your help,
Rodrigo Madera

Re: Coding ASN.1 Support

Posted by Trustin Lee <tr...@gmail.com>.
Hi Rodrigo,

On 7/25/07, Rodrigo Madera <ro...@gmail.com> wrote:
> Community,
>
> I am in the process of writing the engine (or shall we more appropriately
> say "glue"?) as I posted on the other thread that will automatically
> generate the encoders for a given Message (or Sequence, in ASN.1 lingo).
>
> Before I go any further, there is something that only the commiters can tell
> me: What have you done for ASN.1 support so far?
>
> Anything nice (or sad) that you wish to say when ASN.1 and MINA are on the
> same sentence?

Apache Directory project team is interested in implementing ASN.1
support as you already noticed.  Apache MINA was a subproject of the
Directory project, so we could say we are on the same track.
Personally, I prefer to add as many codec implementations as I can
unless it's duplicate of existing one.

> Our business is in the need of a library to handle complex binary protocols,
> and since we will be using MINA, which has not cost us a single cent, we
> will contribute everything we make as Open Source.

I am glad to hear that!

> Our current plan is to use a compiler for ASN.1 (we are looking at
> BinaryNotes) and use the generated classes for the Apache BCEL input so we
> can get the automatic code generation for MINA Encoders/Decoders.

Sounds like a great idea.  It seems like asm is gaining more
popularity these day though.  I have never compare each other though.

Cheers,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Coding ASN.1 Support

Posted by Rodrigo Madera <ro...@gmail.com>.
Thanks for the note.

I wrote MINA objects but that was vague... I meant MINA Encoders/Decoders,
the way I explained on the other thread.

Thanks,
Rodrigo

On 7/27/07, Alex Karasulu <ak...@apache.org> wrote:
>
> Hi Rodrigo,
>
> On 7/27/07, Rodrigo Madera <ro...@gmail.com> wrote:
> >
> > Thanks for the input.
> >
> > I've done some research on it, and I can't find any other documentation
> on
> > using the embedded ASN1 MINA codec in Directory on other projects.
>
>
> I don't think there is much documentation about it.
>
> Do you happen to have any information or pointers to it?
>
>
> Sorry no I don't think anyone other than the Directory folks are using it.
>
> I'll be reading the source code in the meantime, but if there'e a document
> > out there if will surely save time.
> >
> > On the other hand, MINA already has an ASN1 Codec implementation,
>
>
> I guess you're referring to this here:
>
>      http://svn.apache.org/repos/asf/directory/shared/trunk/asn1-codec/
>
> Note that this is not a general ASN.1 codec but one for BER which I figure
> you already know.
>
> so it only
> > needs Dungeon to generate classes. We are still working on the engine to
> > generate MINA objects at runtime.
>
>
> MINA objects?
>
> Alex
>

Re: Coding ASN.1 Support

Posted by Alex Karasulu <ak...@apache.org>.
Hi Rodrigo,

On 7/27/07, Rodrigo Madera <ro...@gmail.com> wrote:
>
> Thanks for the input.
>
> I've done some research on it, and I can't find any other documentation on
> using the embedded ASN1 MINA codec in Directory on other projects.


I don't think there is much documentation about it.

Do you happen to have any information or pointers to it?


Sorry no I don't think anyone other than the Directory folks are using it.

I'll be reading the source code in the meantime, but if there'e a document
> out there if will surely save time.
>
> On the other hand, MINA already has an ASN1 Codec implementation,


I guess you're referring to this here:

     http://svn.apache.org/repos/asf/directory/shared/trunk/asn1-codec/

Note that this is not a general ASN.1 codec but one for BER which I figure
you already know.

so it only
> needs Dungeon to generate classes. We are still working on the engine to
> generate MINA objects at runtime.


MINA objects?

Alex

Re: Coding ASN.1 Support

Posted by Rodrigo Madera <ro...@gmail.com>.
Thanks for the input.

I've done some research on it, and I can't find any other documentation on
using the embedded ASN1 MINA codec in Directory on other projects.

Do you happen to have any information or pointers to it?

I'll be reading the source code in the meantime, but if there'e a document
out there if will surely save time.

On the other hand, MINA already has an ASN1 Codec implementation, so it only
needs Dungeon to generate classes. We are still working on the engine to
generate MINA objects at runtime.

Thanks,
Rodrigo

On 7/24/07, Emmanuel Lecharny <el...@gmail.com> 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. MINA itself is pretty versatile,
> but yiu have to be sure that the codec is threadsafe, this is the only
> point.
>
> I nerver heard about BinaryNotes, I don't know if it generates good
> codecs (both in term of reliability, security and performance -, but I
> see that its license is LGPL, and I think it's not compatible with ASL
> 2.0 license so far (at least, it means that ASF can't distribute code
> under LGPL license, but nothing forbid you to distribute ASL 2.0 code
> withing LGPL licensed code. IANAL though, so you'd better check this
> 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...
>
> My 2cts, hope it helps !
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>

Re: Coding ASN.1 Support

Posted by Alex Karasulu <ak...@apache.org>.
Hi

On 7/24/07, Emmanuel Lecharny <el...@gmail.com> 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

Re: Coding ASN.1 Support

Posted by Emmanuel Lecharny <el...@gmail.com>.
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. MINA itself is pretty versatile,
but yiu have to be sure that the codec is threadsafe, this is the only
point.

I nerver heard about BinaryNotes, I don't know if it generates good
codecs (both in term of reliability, security and performance -, but I
see that its license is LGPL, and I think it's not compatible with ASL
2.0 license so far (at least, it means that ASF can't distribute code
under LGPL license, but nothing forbid you to distribute ASL 2.0 code
withing LGPL licensed code. IANAL though, so you'd better check this
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...

My 2cts, hope it helps !


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Coding ASN.1 Support

Posted by akira_ag <ab...@gmail.com>.
Hi Emmanuel!
I'm sorry for late response.
You can try to use the version 1.5 (from SVN at bnotes.sf.net).
After if you will want to use this project for Apache projects, please
report me and I'll change the license for version 1.5 and later.

Please, note: BinaryNotes supports: BER, DER(experimental), and PER only.
And many extended features in the new ASN.1 specs (like CLASS) doesn't
supported now.
Thanks!


Emmanuel Lecharny-3 wrote:
> 
> Hi Abdulla,
> 
> this is a very interesting news ! FYI, we have a labs going on
> (slowly) about a ASN.1 compiler, with a couple of person trying to
> spend a few hours here and there on it. Having a generic ASN.1
> compiler (generating BER/DER/CER/XER and PER codec) in Apache would
> definitively be a big plus !
> 
> Let's see how we can do that based on your work (BinaryNotes) which
> seems to be very good !
> 
> Emmanuel
> 
> On 7/29/07, akira_ag <ab...@gmail.com> wrote:
>>
>> Hello people!
>> I'm an author  of BinaryNotes project at sourceforge. Recently to me has
>> addressed Rodrigo Madera with the request to change the license from LGPL
>> to
>> Apache License. And I found this forum and post.
>> I think that it's possible. I would like to understand how much to you it
>> will help. If there is a need for use in projects by Apache, I am glad to
>> help.
>> Thanks!
>>
>>
>> Rodrigo Madera wrote:
>> >
>> > Community,
>> >
>> > I am in the process of writing the engine (or shall we more
>> appropriately
>> > say "glue"?) as I posted on the other thread that will automatically
>> > generate the encoders for a given Message (or Sequence, in ASN.1
>> lingo).
>> >
>> > Before I go any further, there is something that only the commiters can
>> > tell
>> > me: What have you done for ASN.1 support so far?
>> >
>> > Anything nice (or sad) that you wish to say when ASN.1 and MINA are on
>> the
>> > same sentence?
>> >
>> > Our business is in the need of a library to handle complex binary
>> > protocols,
>> > and since we will be using MINA, which has not cost us a single cent,
>> we
>> > will contribute everything we make as Open Source.
>> >
>> > Our current plan is to use a compiler for ASN.1 (we are looking at
>> > BinaryNotes) and use the generated classes for the Apache BCEL input so
>> we
>> > can get the automatic code generation for MINA Encoders/Decoders.
>> >
>> > Please share your thoughts and experience with this matter.
>> >
>> > Thank you for your help,
>> > Rodrigo Madera
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Coding-ASN.1-Support-tf4138961s16868.html#a11847087
>> Sent from the Apache MINA Support Forum mailing list archive at
>> Nabble.com.
>>
>>
> 
> 
> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Coding-ASN.1-Support-tf4138961s16868.html#a12324089
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: Coding ASN.1 Support

Posted by Emmanuel Lecharny <el...@gmail.com>.
Hi Abdulla,

this is a very interesting news ! FYI, we have a labs going on
(slowly) about a ASN.1 compiler, with a couple of person trying to
spend a few hours here and there on it. Having a generic ASN.1
compiler (generating BER/DER/CER/XER and PER codec) in Apache would
definitively be a big plus !

Let's see how we can do that based on your work (BinaryNotes) which
seems to be very good !

Emmanuel

On 7/29/07, akira_ag <ab...@gmail.com> wrote:
>
> Hello people!
> I'm an author  of BinaryNotes project at sourceforge. Recently to me has
> addressed Rodrigo Madera with the request to change the license from LGPL to
> Apache License. And I found this forum and post.
> I think that it's possible. I would like to understand how much to you it
> will help. If there is a need for use in projects by Apache, I am glad to
> help.
> Thanks!
>
>
> Rodrigo Madera wrote:
> >
> > Community,
> >
> > I am in the process of writing the engine (or shall we more appropriately
> > say "glue"?) as I posted on the other thread that will automatically
> > generate the encoders for a given Message (or Sequence, in ASN.1 lingo).
> >
> > Before I go any further, there is something that only the commiters can
> > tell
> > me: What have you done for ASN.1 support so far?
> >
> > Anything nice (or sad) that you wish to say when ASN.1 and MINA are on the
> > same sentence?
> >
> > Our business is in the need of a library to handle complex binary
> > protocols,
> > and since we will be using MINA, which has not cost us a single cent, we
> > will contribute everything we make as Open Source.
> >
> > Our current plan is to use a compiler for ASN.1 (we are looking at
> > BinaryNotes) and use the generated classes for the Apache BCEL input so we
> > can get the automatic code generation for MINA Encoders/Decoders.
> >
> > Please share your thoughts and experience with this matter.
> >
> > Thank you for your help,
> > Rodrigo Madera
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Coding-ASN.1-Support-tf4138961s16868.html#a11847087
> Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
>
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Coding ASN.1 Support

Posted by Trustin Lee <tr...@gmail.com>.
Keep up the good work guys!

Cheers,
Trustin

On 7/29/07, Rodrigo Madera <ro...@gmail.com> wrote:
> Hi Abdulla, nice to hear from you right here.
>
> Just so everyone understands what's going on here:
>
> Since we need to implement ASN.1 here in our products, we will be creating a
> complete ASN.1 codec for MINA.
>
> We really wished that we could continue the work with the currently
> available (and before mentioned) ASN.1 codec attached on Apache Directory's
> "shared" folder. However, there is no documentation and we are short on time
> here, so we are starting a competing protocol. This was a bummer for us, but
> we had to go.
>
> Our protocol will support the full ASN.1 specification X.690 0702.
>
> Since we are going to release this codec as open source, we would send this
> codec to Trustin for inclusion into MINA, as he stated codecs are welcome.
>
> However, since our codec is based on the excellent work made by Abdulla (I
> recommend you all to take a look at his excellent contribution:
> http://bnotes.sourceforge.net) there would be a problem distributing the
> codec with the BinaryNotes code. So I suggested Abdulla to adapt the license
> to ASF's.
>
> Now, a whole different story: since Apache has yet to see an ASN.1 compiler,
> Abdulla's work could be transformed into an Apache project, since it's way
> ahead of anything Apache currently has. This is something that I told
> Abdulla he would need to search for, as I don't know the steps to do this.
> But I am sure he has what it needs to get there.
>
> Please let me know of your opinions on this.
>
> Thank you all from the community,
> Rodrigo Madera
>
>
> On 7/28/07, akira_ag <ab...@gmail.com> wrote:
> >
> >
> > Hello people!
> > I'm an author  of BinaryNotes project at sourceforge. Recently to me has
> > addressed Rodrigo Madera with the request to change the license from LGPL
> > to
> > Apache License. And I found this forum and post.
> > I think that it's possible. I would like to understand how much to you it
> > will help. If there is a need for use in projects by Apache, I am glad to
> > help.
> > Thanks!
> >
> >
> > Rodrigo Madera wrote:
> > >
> > > Community,
> > >
> > > I am in the process of writing the engine (or shall we more
> > appropriately
> > > say "glue"?) as I posted on the other thread that will automatically
> > > generate the encoders for a given Message (or Sequence, in ASN.1 lingo).
> > >
> > > Before I go any further, there is something that only the commiters can
> > > tell
> > > me: What have you done for ASN.1 support so far?
> > >
> > > Anything nice (or sad) that you wish to say when ASN.1 and MINA are on
> > the
> > > same sentence?
> > >
> > > Our business is in the need of a library to handle complex binary
> > > protocols,
> > > and since we will be using MINA, which has not cost us a single cent, we
> > > will contribute everything we make as Open Source.
> > >
> > > Our current plan is to use a compiler for ASN.1 (we are looking at
> > > BinaryNotes) and use the generated classes for the Apache BCEL input so
> > we
> > > can get the automatic code generation for MINA Encoders/Decoders.
> > >
> > > Please share your thoughts and experience with this matter.
> > >
> > > Thank you for your help,
> > > Rodrigo Madera
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Coding-ASN.1-Support-tf4138961s16868.html#a11847087
> > Sent from the Apache MINA Support Forum mailing list archive at Nabble.com
> > .
> >
> >
>


-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Coding ASN.1 Support

Posted by Rodrigo Madera <ro...@gmail.com>.
Hi Abdulla, nice to hear from you right here.

Just so everyone understands what's going on here:

Since we need to implement ASN.1 here in our products, we will be creating a
complete ASN.1 codec for MINA.

We really wished that we could continue the work with the currently
available (and before mentioned) ASN.1 codec attached on Apache Directory's
"shared" folder. However, there is no documentation and we are short on time
here, so we are starting a competing protocol. This was a bummer for us, but
we had to go.

Our protocol will support the full ASN.1 specification X.690 0702.

Since we are going to release this codec as open source, we would send this
codec to Trustin for inclusion into MINA, as he stated codecs are welcome.

However, since our codec is based on the excellent work made by Abdulla (I
recommend you all to take a look at his excellent contribution:
http://bnotes.sourceforge.net) there would be a problem distributing the
codec with the BinaryNotes code. So I suggested Abdulla to adapt the license
to ASF's.

Now, a whole different story: since Apache has yet to see an ASN.1 compiler,
Abdulla's work could be transformed into an Apache project, since it's way
ahead of anything Apache currently has. This is something that I told
Abdulla he would need to search for, as I don't know the steps to do this.
But I am sure he has what it needs to get there.

Please let me know of your opinions on this.

Thank you all from the community,
Rodrigo Madera


On 7/28/07, akira_ag <ab...@gmail.com> wrote:
>
>
> Hello people!
> I'm an author  of BinaryNotes project at sourceforge. Recently to me has
> addressed Rodrigo Madera with the request to change the license from LGPL
> to
> Apache License. And I found this forum and post.
> I think that it's possible. I would like to understand how much to you it
> will help. If there is a need for use in projects by Apache, I am glad to
> help.
> Thanks!
>
>
> Rodrigo Madera wrote:
> >
> > Community,
> >
> > I am in the process of writing the engine (or shall we more
> appropriately
> > say "glue"?) as I posted on the other thread that will automatically
> > generate the encoders for a given Message (or Sequence, in ASN.1 lingo).
> >
> > Before I go any further, there is something that only the commiters can
> > tell
> > me: What have you done for ASN.1 support so far?
> >
> > Anything nice (or sad) that you wish to say when ASN.1 and MINA are on
> the
> > same sentence?
> >
> > Our business is in the need of a library to handle complex binary
> > protocols,
> > and since we will be using MINA, which has not cost us a single cent, we
> > will contribute everything we make as Open Source.
> >
> > Our current plan is to use a compiler for ASN.1 (we are looking at
> > BinaryNotes) and use the generated classes for the Apache BCEL input so
> we
> > can get the automatic code generation for MINA Encoders/Decoders.
> >
> > Please share your thoughts and experience with this matter.
> >
> > Thank you for your help,
> > Rodrigo Madera
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Coding-ASN.1-Support-tf4138961s16868.html#a11847087
> Sent from the Apache MINA Support Forum mailing list archive at Nabble.com
> .
>
>

Re: Coding ASN.1 Support

Posted by akira_ag <ab...@gmail.com>.
Hello people!
I'm an author  of BinaryNotes project at sourceforge. Recently to me has
addressed Rodrigo Madera with the request to change the license from LGPL to
Apache License. And I found this forum and post.
I think that it's possible. I would like to understand how much to you it
will help. If there is a need for use in projects by Apache, I am glad to
help. 
Thanks!


Rodrigo Madera wrote:
> 
> Community,
> 
> I am in the process of writing the engine (or shall we more appropriately
> say "glue"?) as I posted on the other thread that will automatically
> generate the encoders for a given Message (or Sequence, in ASN.1 lingo).
> 
> Before I go any further, there is something that only the commiters can
> tell
> me: What have you done for ASN.1 support so far?
> 
> Anything nice (or sad) that you wish to say when ASN.1 and MINA are on the
> same sentence?
> 
> Our business is in the need of a library to handle complex binary
> protocols,
> and since we will be using MINA, which has not cost us a single cent, we
> will contribute everything we make as Open Source.
> 
> Our current plan is to use a compiler for ASN.1 (we are looking at
> BinaryNotes) and use the generated classes for the Apache BCEL input so we
> can get the automatic code generation for MINA Encoders/Decoders.
> 
> Please share your thoughts and experience with this matter.
> 
> Thank you for your help,
> Rodrigo Madera
> 
> 

-- 
View this message in context: http://www.nabble.com/Coding-ASN.1-Support-tf4138961s16868.html#a11847087
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.