You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Charles Woodson <cl...@yahoo.com> on 2007/08/06 04:54:11 UTC

Thanks and a question

I've recently found Mina and am using it to develop a
server application for a non-profit organization I
volunteer my time for.  I'd like to give the
developers who have contributed to this framework a
big thanks for your work.  This project would
basically be impossible if I was not able to leverage
Mina to speed up development.

The project I am working on will use a flash client
that connects with a java server using flash
actionscript's XMLSocket.  I'll be creating a custom
ProtocolCodecFilter to handle flash's xml socket
protocol (xml document terminated by the 0 byte).  

Since this could be used with any Flash client
application, would this ProtocolCodecFilter be useful
for commital to Mina to be part of the general
distribution?

-Lance Woodson


      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


Re: Thanks and a question

Posted by Frederick Haebin Na <mo...@gmail.com>.
That's how I can contribute to the Mina.
Oh!

Gotta love this mailing list!
Keep up the wonderful work, Mian Team.



2007/8/14, Trustin Lee <tr...@gmail.com>:
>
> Hi Charles,
>
> On 8/7/07, Charles Woodson <cl...@yahoo.com> wrote:
> > Will do, Trustin.  As for making this a part of the
> > general distribution and submitting the patch through
> > Jira, I assume that I should follow the guidelines in
> > the developer guide and then attach the patch's source
> > files for classes & unit tests to the jira issue.  Am
> > I missing anything there?
>
> Yes.  Until your patch is ready, you could just create a JIRA issue so
> that people find it's a known issue and work is in progress.  :)
>
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: Thanks and a question

Posted by Trustin Lee <tr...@gmail.com>.
On 10/16/07, Drac <th...@gmail.com> wrote:
>
> You don't need a new protocol class for this, just add a constructor overide
> to the TextLineCodecFactory class (or extend the class) to take custom
> encoder and decoder LineDelmiter strings like so:
>
> public TextLineCodecFactory(Charset charset, String encoderDelimStr, String
> decoderDelimStr) {
>         encoder = new TextLineEncoder(charset, new LineDelimiter(encoderDelimStr));
>         decoder = new TextLineDecoder(charset, new LineDelimiter(decoderDelimStr));
> }
>
> Then just construct your codec like so:
>
> TextLineCodecFactory codec = new TextLineCodecFactory(Charset.forName(
> "UTF-8"), "\0", "\0");
>
> I was a little surprised that the line delimiters were hard coded into the
> constructor to begin with, and that there was no way to access the
> decoder/encoder to change them. Wouldn't this be one of the most varied
> values from application to application? I'm not sure, I don't do much
> networking stuff so maybe the defaults are used by most systems and Flash is
> a bit of an oddball in that respect. I also guess it's easy enough to extend
> the class and work this in, but it had me scratching my head for half a day
> before I dug deep enough to find this.

Your concern already has been addressed in our development branch
(trunk); LineDelimiter.NUL and related constructors have been added.

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

Re: Thanks and a question

Posted by Drac <th...@gmail.com>.
You don't need a new protocol class for this, just add a constructor overide
to the TextLineCodecFactory class (or extend the class) to take custom
encoder and decoder LineDelmiter strings like so: 

public TextLineCodecFactory(Charset charset, String encoderDelimStr, String
decoderDelimStr) {
	encoder = new TextLineEncoder(charset, new LineDelimiter(encoderDelimStr));
	decoder = new TextLineDecoder(charset, new LineDelimiter(decoderDelimStr));
}

Then just construct your codec like so:

TextLineCodecFactory codec = new TextLineCodecFactory(Charset.forName(
"UTF-8"), "\0", "\0");

I was a little surprised that the line delimiters were hard coded into the
constructor to begin with, and that there was no way to access the
decoder/encoder to change them. Wouldn't this be one of the most varied
values from application to application? I'm not sure, I don't do much
networking stuff so maybe the defaults are used by most systems and Flash is
a bit of an oddball in that respect. I also guess it's easy enough to extend
the class and work this in, but it had me scratching my head for half a day
before I dug deep enough to find this.


Trustin Lee wrote:
> 
> Hi Charles,
> 
> On 8/7/07, Charles Woodson <cl...@yahoo.com> wrote:
>> Will do, Trustin.  As for making this a part of the
>> general distribution and submitting the patch through
>> Jira, I assume that I should follow the guidelines in
>> the developer guide and then attach the patch's source
>> files for classes & unit tests to the jira issue.  Am
>> I missing anything there?
> 
> Yes.  Until your patch is ready, you could just create a JIRA issue so
> that people find it's a known issue and work is in progress.  :)
> 
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/Thanks-and-a-question-tf4221995s16868.html#a13226736
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: Thanks and a question

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

On 8/7/07, Charles Woodson <cl...@yahoo.com> wrote:
> Will do, Trustin.  As for making this a part of the
> general distribution and submitting the patch through
> Jira, I assume that I should follow the guidelines in
> the developer guide and then attach the patch's source
> files for classes & unit tests to the jira issue.  Am
> I missing anything there?

Yes.  Until your patch is ready, you could just create a JIRA issue so
that people find it's a known issue and work is in progress.  :)

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

Re: Thanks and a question

Posted by Charles Woodson <cl...@yahoo.com>.
Will do, Trustin.  As for making this a part of the
general distribution and submitting the patch through
Jira, I assume that I should follow the guidelines in
the developer guide and then attach the patch's source
files for classes & unit tests to the jira issue.  Am
I missing anything there?

-Lance
--- Trustin Lee <tr...@gmail.com> wrote:

> Hi Charles,
> 
> On 8/6/07, Charles Woodson <cl...@yahoo.com>
> wrote:
> > I've recently found Mina and am using it to
> develop a
> > server application for a non-profit organization I
> > volunteer my time for.  I'd like to give the
> > developers who have contributed to this framework
> a
> > big thanks for your work.  This project would
> > basically be impossible if I was not able to
> leverage
> > Mina to speed up development.
> 
> Thanks for using MINA, too!  We are always waiting
> for your input
> about new features and improvements.  Please don't
> hesitate.
> 
> > The project I am working on will use a flash
> client
> > that connects with a java server using flash
> > actionscript's XMLSocket.  I'll be creating a
> custom
> > ProtocolCodecFilter to handle flash's xml socket
> > protocol (xml document terminated by the 0 byte).
> >
> > Since this could be used with any Flash client
> > application, would this ProtocolCodecFilter be
> useful
> > for commital to Mina to be part of the general
> > distribution?
> 
> Definitely!  That will help many server developers
> who interact with
> flash clients.  If you are interested in
> contribution, please file a
> JIRA issue with your patch:
> 
> http://issues.apache.org/jira/browse/DIRMINA
> 
> Cheers,
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


Re: Thanks and a question

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

On 8/6/07, Charles Woodson <cl...@yahoo.com> wrote:
> I've recently found Mina and am using it to develop a
> server application for a non-profit organization I
> volunteer my time for.  I'd like to give the
> developers who have contributed to this framework a
> big thanks for your work.  This project would
> basically be impossible if I was not able to leverage
> Mina to speed up development.

Thanks for using MINA, too!  We are always waiting for your input
about new features and improvements.  Please don't hesitate.

> The project I am working on will use a flash client
> that connects with a java server using flash
> actionscript's XMLSocket.  I'll be creating a custom
> ProtocolCodecFilter to handle flash's xml socket
> protocol (xml document terminated by the 0 byte).
>
> Since this could be used with any Flash client
> application, would this ProtocolCodecFilter be useful
> for commital to Mina to be part of the general
> distribution?

Definitely!  That will help many server developers who interact with
flash clients.  If you are interested in contribution, please file a
JIRA issue with your patch:

http://issues.apache.org/jira/browse/DIRMINA

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

Re: Thanks and a question

Posted by Charles Woodson <cl...@yahoo.com>.
Because flash actionscript 2.0 uses a generic xml
string terminated by the 0 byte as its bidirectional
asynchronous server/client socket communication
protocol.  This socket is a predefined object in
flash, and I don't believe that its behavior is able
to be overriden.  I'll double check this, though.

Someone could develop a SOAP api on the flash side
using this socket behavior, but I will not have time
to make that part of this project's scope.

Lance

--- Rodrigo Madera <ro...@gmail.com> wrote:

> Why not use a standard XML serving protocol like
> SOAP?
> 
> Rodrigo
> 
> On 8/6/07, Charles Woodson <cl...@yahoo.com>
> wrote:
> >
> > I've recently found Mina and am using it to
> develop a
> > server application for a non-profit organization I
> > volunteer my time for.  I'd like to give the
> > developers who have contributed to this framework
> a
> > big thanks for your work.  This project would
> > basically be impossible if I was not able to
> leverage
> > Mina to speed up development.
> >
> > The project I am working on will use a flash
> client
> > that connects with a java server using flash
> > actionscript's XMLSocket.  I'll be creating a
> custom
> > ProtocolCodecFilter to handle flash's xml socket
> > protocol (xml document terminated by the 0 byte).
> >
> > Since this could be used with any Flash client
> > application, would this ProtocolCodecFilter be
> useful
> > for commital to Mina to be part of the general
> > distribution?
> >
> > -Lance Woodson
> >
> >
> >
> >      
>
____________________________________________________________________________________
> > Fussy? Opinionated? Impossible to please? Perfect.
>  Join Yahoo!'s user
> > panel and lay it on us.
> >
>
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> >
> >
> 



      ____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

Re: Thanks and a question

Posted by Rodrigo Madera <ro...@gmail.com>.
Why not use a standard XML serving protocol like SOAP?

Rodrigo

On 8/6/07, Charles Woodson <cl...@yahoo.com> wrote:
>
> I've recently found Mina and am using it to develop a
> server application for a non-profit organization I
> volunteer my time for.  I'd like to give the
> developers who have contributed to this framework a
> big thanks for your work.  This project would
> basically be impossible if I was not able to leverage
> Mina to speed up development.
>
> The project I am working on will use a flash client
> that connects with a java server using flash
> actionscript's XMLSocket.  I'll be creating a custom
> ProtocolCodecFilter to handle flash's xml socket
> protocol (xml document terminated by the 0 byte).
>
> Since this could be used with any Flash client
> application, would this ProtocolCodecFilter be useful
> for commital to Mina to be part of the general
> distribution?
>
> -Lance Woodson
>
>
>
>       ____________________________________________________________________________________
> Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user
> panel and lay it on us.
> http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
>