You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Niall Pemberton <ni...@gmail.com> on 2008/04/09 11:19:35 UTC

MINA v2.0 Quick Start Guide

The  MINA v2.0 Quick Start Guide needs updating for the current API

http://mina.apache.org/mina-v20-quick-start-guide.html

In the last MinaTimeServer code snippet it has...

acceptor.setLocalAddress( new InetSocketAddress(PORT) );
acceptor.bind();

...but setLocalAddress() doesn't exist (in Mina 2.0.0-M1) - should be
changed to setDefaultLocalAddress() or replace those lines with

acceptor.bind(new InetSocketAddress(PORT));

The other thing is the lines added in the 3rd MinaTimeServer code
snippet have been dropped from the 4th(last) code snippet, i.e.

acceptor.getSessionConfig().setReadBufferSize( 2048 );
acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );

Niall

Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
Maarten,

I added in steps 2 and 3.  Take a look and let me know what you think of
this so far.

Thanks
Mark


On Thu, Apr 10, 2008 at 3:40 AM, Maarten Bosteels <mb...@gmail.com>
wrote:

> Hi,
>
> 2008/4/10 Mark Webb <el...@gmail.com>:
>
> > Sorry for the mis-typing of your name....
>
> no worries.
>
>
> >
> >
> > The more I think about this, the more I think that each step should be a
> > stand-alone program.  Step 2 should include all the code from step 1 and
> > the
> > code that was introduced in step 2.  For instance, in step 1 you might
> > have
> > :
> >
> > IoAcceptor acceptor = new NioSocketAcceptor();
> > acceptor.setHandler( new MyHandler() );
> > acceptor.bind( new InetSocketAddress(PORT));
> >
> > Then when you introduce step 2, you will add in an ExecutorFilter to all
> > the
> > code above.
>
>
> That's what I meant: in step2 you have another main, that builds the
> IoFilter chain all by itself.
> So that would be copy-paste from step1 with an ExecutorFilter added.
> But I see no point, in copying for example the custom encoder/decoder from
> step1 to step2 ?
>
> When entire classes from step-n are reused in step-(n+1), there is IMO no
> reason to copy them.
>
> >
> > Then when you introduce step 3, you will add JMX code to the code that
> > includes steps 1 and 2.  So by the time you reach the end, the code in
> > step
> > 1 (above) will contain much more code and not be so simple and
> > understandable and the person reading the tutorial might get confused.
>
>
> I agree.
> After adding step2, the code in step1 shouldn't have changed.
> That's the reason I called it step1 :-)
>
> regards,
> Maarten
>
>
> >
> > --Mark
> >
> >
> >
> > On Wed, Apr 9, 2008 at 4:23 PM, Maarten Bosteels <
> mbosteels.dns@gmail.com>
> > wrote:
> >
> > > Hello Mark,
> > >
> > > Great to hear you will have some time to work on the examples.
> > >
> > > 2008/4/9 Mark Webb <el...@gmail.com>:
> > >
> > > > I hit the send button much too quickly.  Maartin, what is your plan
> > for
> > > > how
> > > > the codebase will look?  I see that in the examples subproject there
> > is
> > > a
> > > > package called "imagine.step1".  For step 2, will you take a copy of
> > all
> > > > the
> > > > code from step 1 and add more functionality (like ExecutorFilter)?
> > >
> > >
> > > I think most of the code from step1 can be reused by step2 etc, so
> there
> > > would be no need to copy code.
> > > IMO, the imagine.step2 package should only contain the code that needs
> > to
> > > be
> > > added or changed compared to step1. Probably only the main method
> where
> > > the
> > > filterChain is built.
> > >
> > > But feel free to disagree :-)
> > >
> > > regards,
> > > Maarten (not Maartin)
> > >
> > >
> > > >
> > > > How do you see all this coming together?
> > > >
> > > > --Mark
> > > >
> > > > 2008/4/9 Mark Webb <el...@gmail.com>:
> > > >
> > > > > I have some free time coming up.  I will give it a shot.
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Apr 9, 2008 at 1:29 PM, Maarten Bosteels <
> > > > mbosteels.dns@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <
> > > trustin@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > I think it's good time for someone to write a MINA curriculum
> > and
> > > > > > revamp
> > > > > > > all examples to follow the curriculum.  Maarten once started
> an
> > > > > > > 'imagine' example but he ended up with stage1.  He might have
> > > > > > something
> > > > > > > in his mind about setting up the MINA curriculum.  ;)
> > > > > >
> > > > > >
> > > > > > :-)
> > > > > > Yes, my plan was to build upon the ImageServer and add extra
> > > > > > functionality
> > > > > > step-by-step
> > > > > > * step1: what is now in the protocol-codec tutorial (and in svn)
> > > > > > * step2 : add an ExecutorFilter
> > > > > > * step3 : add some JMX stuff
> > > > > > * step4 : show how to cleanly shut down the server
> > > > > > * step5 : add a throttle filter
> > > > > > ...
> > > > > > (the order doesn't really matter)
> > > > > >
> > > > > > Unfortunately, until now I didn't get further than step1 ...
> > > > > > I still have the intention though, just can't promise when I
> will
> > > find
> > > > > > that
> > > > > > scarce resource called  time.
> > > > > >
> > > > > > I'd welcome anyone who wants to work on this.
> > > > > >
> > > > > > Maarten
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Cheers,
> > > > > > >
> > > > > > > Mark Webb wrote:
> > > > > > > > that is the funniest description of one's software I ever
> > heard.
> > > > > > > bravo...
> > > > > > > >
> > > > > > > > On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <
> > > > > > niklas@protocol7.com
> > > > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > >> 2008/4/9 Mark Webb <el...@gmail.com>:
> > > > > > > >>> sounds like that is the direction we want to go.  My only
> > > > concern
> > > > > > is
> > > > > > > >> that we
> > > > > > > >>>  start getting apps in the examples directory that
> overlap.
> > > >  There
> > > > > > is
> > > > > > > >>>  currently a chat program in examples, but maybe your's is
> > > more
> > > > > > > >> feature-rich
> > > > > > > >>>  or more robust.  One think I do like about the current
> chat
> > > > > > example
> > > > > > > is
> > > > > > > >> that
> > > > > > > >>>  it is the only example that uses Spring.
> > > > > > > >> No it's certainly not more feature rich, it's probably the
> > > > > > stupidest
> > > > > > > >> chat server ever built. The purpose was to make it as
> simple
> > as
> > > > > > > >> possible to be able to communicate it during a talk.
> > > > > > > >>
> > > > > > > >> /niklas
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> > > > > > > --
> > > > > > > what we call human nature is actually human habit
> > > > > > > --
> > > > > > > http://gleamynode.net/
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > --------------------------------
> > > > > Talent hits a target no one else can hit; Genius hits a target no
> > one
> > > > else
> > > > > can see.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > --------------------------------
> > > > Talent hits a target no one else can hit; Genius hits a target no
> one
> > > else
> > > > can see.
> > > >
> > >
> >
> >
> >
> > --
> > --------------------------------
> > Talent hits a target no one else can hit; Genius hits a target no one
> else
> > can see.
> >
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
ok.  So we agree.  We were just describing it differently.

I will start working on it and see how things turn out.

Thanks...


On Thu, Apr 10, 2008 at 3:40 AM, Maarten Bosteels <mb...@gmail.com>
wrote:

> Hi,
>
> 2008/4/10 Mark Webb <el...@gmail.com>:
>
> > Sorry for the mis-typing of your name....
>
> no worries.
>
>
> >
> >
> > The more I think about this, the more I think that each step should be a
> > stand-alone program.  Step 2 should include all the code from step 1 and
> > the
> > code that was introduced in step 2.  For instance, in step 1 you might
> > have
> > :
> >
> > IoAcceptor acceptor = new NioSocketAcceptor();
> > acceptor.setHandler( new MyHandler() );
> > acceptor.bind( new InetSocketAddress(PORT));
> >
> > Then when you introduce step 2, you will add in an ExecutorFilter to all
> > the
> > code above.
>
>
> That's what I meant: in step2 you have another main, that builds the
> IoFilter chain all by itself.
> So that would be copy-paste from step1 with an ExecutorFilter added.
> But I see no point, in copying for example the custom encoder/decoder from
> step1 to step2 ?
>
> When entire classes from step-n are reused in step-(n+1), there is IMO no
> reason to copy them.
>
> >
> > Then when you introduce step 3, you will add JMX code to the code that
> > includes steps 1 and 2.  So by the time you reach the end, the code in
> > step
> > 1 (above) will contain much more code and not be so simple and
> > understandable and the person reading the tutorial might get confused.
>
>
> I agree.
> After adding step2, the code in step1 shouldn't have changed.
> That's the reason I called it step1 :-)
>
> regards,
> Maarten
>
>
> >
> > --Mark
> >
> >
> >
> > On Wed, Apr 9, 2008 at 4:23 PM, Maarten Bosteels <
> mbosteels.dns@gmail.com>
> > wrote:
> >
> > > Hello Mark,
> > >
> > > Great to hear you will have some time to work on the examples.
> > >
> > > 2008/4/9 Mark Webb <el...@gmail.com>:
> > >
> > > > I hit the send button much too quickly.  Maartin, what is your plan
> > for
> > > > how
> > > > the codebase will look?  I see that in the examples subproject there
> > is
> > > a
> > > > package called "imagine.step1".  For step 2, will you take a copy of
> > all
> > > > the
> > > > code from step 1 and add more functionality (like ExecutorFilter)?
> > >
> > >
> > > I think most of the code from step1 can be reused by step2 etc, so
> there
> > > would be no need to copy code.
> > > IMO, the imagine.step2 package should only contain the code that needs
> > to
> > > be
> > > added or changed compared to step1. Probably only the main method
> where
> > > the
> > > filterChain is built.
> > >
> > > But feel free to disagree :-)
> > >
> > > regards,
> > > Maarten (not Maartin)
> > >
> > >
> > > >
> > > > How do you see all this coming together?
> > > >
> > > > --Mark
> > > >
> > > > 2008/4/9 Mark Webb <el...@gmail.com>:
> > > >
> > > > > I have some free time coming up.  I will give it a shot.
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Apr 9, 2008 at 1:29 PM, Maarten Bosteels <
> > > > mbosteels.dns@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <
> > > trustin@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > I think it's good time for someone to write a MINA curriculum
> > and
> > > > > > revamp
> > > > > > > all examples to follow the curriculum.  Maarten once started
> an
> > > > > > > 'imagine' example but he ended up with stage1.  He might have
> > > > > > something
> > > > > > > in his mind about setting up the MINA curriculum.  ;)
> > > > > >
> > > > > >
> > > > > > :-)
> > > > > > Yes, my plan was to build upon the ImageServer and add extra
> > > > > > functionality
> > > > > > step-by-step
> > > > > > * step1: what is now in the protocol-codec tutorial (and in svn)
> > > > > > * step2 : add an ExecutorFilter
> > > > > > * step3 : add some JMX stuff
> > > > > > * step4 : show how to cleanly shut down the server
> > > > > > * step5 : add a throttle filter
> > > > > > ...
> > > > > > (the order doesn't really matter)
> > > > > >
> > > > > > Unfortunately, until now I didn't get further than step1 ...
> > > > > > I still have the intention though, just can't promise when I
> will
> > > find
> > > > > > that
> > > > > > scarce resource called  time.
> > > > > >
> > > > > > I'd welcome anyone who wants to work on this.
> > > > > >
> > > > > > Maarten
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Cheers,
> > > > > > >
> > > > > > > Mark Webb wrote:
> > > > > > > > that is the funniest description of one's software I ever
> > heard.
> > > > > > > bravo...
> > > > > > > >
> > > > > > > > On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <
> > > > > > niklas@protocol7.com
> > > > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > >> 2008/4/9 Mark Webb <el...@gmail.com>:
> > > > > > > >>> sounds like that is the direction we want to go.  My only
> > > > concern
> > > > > > is
> > > > > > > >> that we
> > > > > > > >>>  start getting apps in the examples directory that
> overlap.
> > > >  There
> > > > > > is
> > > > > > > >>>  currently a chat program in examples, but maybe your's is
> > > more
> > > > > > > >> feature-rich
> > > > > > > >>>  or more robust.  One think I do like about the current
> chat
> > > > > > example
> > > > > > > is
> > > > > > > >> that
> > > > > > > >>>  it is the only example that uses Spring.
> > > > > > > >> No it's certainly not more feature rich, it's probably the
> > > > > > stupidest
> > > > > > > >> chat server ever built. The purpose was to make it as
> simple
> > as
> > > > > > > >> possible to be able to communicate it during a talk.
> > > > > > > >>
> > > > > > > >> /niklas
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> > > > > > > --
> > > > > > > what we call human nature is actually human habit
> > > > > > > --
> > > > > > > http://gleamynode.net/
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > --------------------------------
> > > > > Talent hits a target no one else can hit; Genius hits a target no
> > one
> > > > else
> > > > > can see.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > --------------------------------
> > > > Talent hits a target no one else can hit; Genius hits a target no
> one
> > > else
> > > > can see.
> > > >
> > >
> >
> >
> >
> > --
> > --------------------------------
> > Talent hits a target no one else can hit; Genius hits a target no one
> else
> > can see.
> >
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by Maarten Bosteels <mb...@gmail.com>.
Hi,

2008/4/10 Mark Webb <el...@gmail.com>:

> Sorry for the mis-typing of your name....

no worries.


>
>
> The more I think about this, the more I think that each step should be a
> stand-alone program.  Step 2 should include all the code from step 1 and
> the
> code that was introduced in step 2.  For instance, in step 1 you might
> have
> :
>
> IoAcceptor acceptor = new NioSocketAcceptor();
> acceptor.setHandler( new MyHandler() );
> acceptor.bind( new InetSocketAddress(PORT));
>
> Then when you introduce step 2, you will add in an ExecutorFilter to all
> the
> code above.


That's what I meant: in step2 you have another main, that builds the
IoFilter chain all by itself.
So that would be copy-paste from step1 with an ExecutorFilter added.
But I see no point, in copying for example the custom encoder/decoder from
step1 to step2 ?

When entire classes from step-n are reused in step-(n+1), there is IMO no
reason to copy them.

>
> Then when you introduce step 3, you will add JMX code to the code that
> includes steps 1 and 2.  So by the time you reach the end, the code in
> step
> 1 (above) will contain much more code and not be so simple and
> understandable and the person reading the tutorial might get confused.


I agree.
After adding step2, the code in step1 shouldn't have changed.
That's the reason I called it step1 :-)

regards,
Maarten


>
> --Mark
>
>
>
> On Wed, Apr 9, 2008 at 4:23 PM, Maarten Bosteels <mb...@gmail.com>
> wrote:
>
> > Hello Mark,
> >
> > Great to hear you will have some time to work on the examples.
> >
> > 2008/4/9 Mark Webb <el...@gmail.com>:
> >
> > > I hit the send button much too quickly.  Maartin, what is your plan
> for
> > > how
> > > the codebase will look?  I see that in the examples subproject there
> is
> > a
> > > package called "imagine.step1".  For step 2, will you take a copy of
> all
> > > the
> > > code from step 1 and add more functionality (like ExecutorFilter)?
> >
> >
> > I think most of the code from step1 can be reused by step2 etc, so there
> > would be no need to copy code.
> > IMO, the imagine.step2 package should only contain the code that needs
> to
> > be
> > added or changed compared to step1. Probably only the main method where
> > the
> > filterChain is built.
> >
> > But feel free to disagree :-)
> >
> > regards,
> > Maarten (not Maartin)
> >
> >
> > >
> > > How do you see all this coming together?
> > >
> > > --Mark
> > >
> > > 2008/4/9 Mark Webb <el...@gmail.com>:
> > >
> > > > I have some free time coming up.  I will give it a shot.
> > > >
> > > >
> > > >
> > > > On Wed, Apr 9, 2008 at 1:29 PM, Maarten Bosteels <
> > > mbosteels.dns@gmail.com>
> > > > wrote:
> > > >
> > > > > On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <
> > trustin@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > I think it's good time for someone to write a MINA curriculum
> and
> > > > > revamp
> > > > > > all examples to follow the curriculum.  Maarten once started an
> > > > > > 'imagine' example but he ended up with stage1.  He might have
> > > > > something
> > > > > > in his mind about setting up the MINA curriculum.  ;)
> > > > >
> > > > >
> > > > > :-)
> > > > > Yes, my plan was to build upon the ImageServer and add extra
> > > > > functionality
> > > > > step-by-step
> > > > > * step1: what is now in the protocol-codec tutorial (and in svn)
> > > > > * step2 : add an ExecutorFilter
> > > > > * step3 : add some JMX stuff
> > > > > * step4 : show how to cleanly shut down the server
> > > > > * step5 : add a throttle filter
> > > > > ...
> > > > > (the order doesn't really matter)
> > > > >
> > > > > Unfortunately, until now I didn't get further than step1 ...
> > > > > I still have the intention though, just can't promise when I will
> > find
> > > > > that
> > > > > scarce resource called  time.
> > > > >
> > > > > I'd welcome anyone who wants to work on this.
> > > > >
> > > > > Maarten
> > > > >
> > > > >
> > > > > >
> > > > > > Cheers,
> > > > > >
> > > > > > Mark Webb wrote:
> > > > > > > that is the funniest description of one's software I ever
> heard.
> > > > > > bravo...
> > > > > > >
> > > > > > > On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <
> > > > > niklas@protocol7.com
> > > > > > >
> > > > > > > wrote:
> > > > > > >
> > > > > > >> 2008/4/9 Mark Webb <el...@gmail.com>:
> > > > > > >>> sounds like that is the direction we want to go.  My only
> > > concern
> > > > > is
> > > > > > >> that we
> > > > > > >>>  start getting apps in the examples directory that overlap.
> > >  There
> > > > > is
> > > > > > >>>  currently a chat program in examples, but maybe your's is
> > more
> > > > > > >> feature-rich
> > > > > > >>>  or more robust.  One think I do like about the current chat
> > > > > example
> > > > > > is
> > > > > > >> that
> > > > > > >>>  it is the only example that uses Spring.
> > > > > > >> No it's certainly not more feature rich, it's probably the
> > > > > stupidest
> > > > > > >> chat server ever built. The purpose was to make it as simple
> as
> > > > > > >> possible to be able to communicate it during a talk.
> > > > > > >>
> > > > > > >> /niklas
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> > > > > > --
> > > > > > what we call human nature is actually human habit
> > > > > > --
> > > > > > http://gleamynode.net/
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > --------------------------------
> > > > Talent hits a target no one else can hit; Genius hits a target no
> one
> > > else
> > > > can see.
> > > >
> > >
> > >
> > >
> > > --
> > > --------------------------------
> > > Talent hits a target no one else can hit; Genius hits a target no one
> > else
> > > can see.
> > >
> >
>
>
>
> --
> --------------------------------
> Talent hits a target no one else can hit; Genius hits a target no one else
> can see.
>

Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
Sorry for the mis-typing of your name....

The more I think about this, the more I think that each step should be a
stand-alone program.  Step 2 should include all the code from step 1 and the
code that was introduced in step 2.  For instance, in step 1 you might have
:

IoAcceptor acceptor = new NioSocketAcceptor();
acceptor.setHandler( new MyHandler() );
acceptor.bind( new InetSocketAddress(PORT));

Then when you introduce step 2, you will add in an ExecutorFilter to all the
code above.

Then when you introduce step 3, you will add JMX code to the code that
includes steps 1 and 2.  So by the time you reach the end, the code in step
1 (above) will contain much more code and not be so simple and
understandable and the person reading the tutorial might get confused.

--Mark



On Wed, Apr 9, 2008 at 4:23 PM, Maarten Bosteels <mb...@gmail.com>
wrote:

> Hello Mark,
>
> Great to hear you will have some time to work on the examples.
>
> 2008/4/9 Mark Webb <el...@gmail.com>:
>
> > I hit the send button much too quickly.  Maartin, what is your plan for
> > how
> > the codebase will look?  I see that in the examples subproject there is
> a
> > package called "imagine.step1".  For step 2, will you take a copy of all
> > the
> > code from step 1 and add more functionality (like ExecutorFilter)?
>
>
> I think most of the code from step1 can be reused by step2 etc, so there
> would be no need to copy code.
> IMO, the imagine.step2 package should only contain the code that needs to
> be
> added or changed compared to step1. Probably only the main method where
> the
> filterChain is built.
>
> But feel free to disagree :-)
>
> regards,
> Maarten (not Maartin)
>
>
> >
> > How do you see all this coming together?
> >
> > --Mark
> >
> > 2008/4/9 Mark Webb <el...@gmail.com>:
> >
> > > I have some free time coming up.  I will give it a shot.
> > >
> > >
> > >
> > > On Wed, Apr 9, 2008 at 1:29 PM, Maarten Bosteels <
> > mbosteels.dns@gmail.com>
> > > wrote:
> > >
> > > > On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <
> trustin@gmail.com>
> > > > wrote:
> > > >
> > > > > I think it's good time for someone to write a MINA curriculum and
> > > > revamp
> > > > > all examples to follow the curriculum.  Maarten once started an
> > > > > 'imagine' example but he ended up with stage1.  He might have
> > > > something
> > > > > in his mind about setting up the MINA curriculum.  ;)
> > > >
> > > >
> > > > :-)
> > > > Yes, my plan was to build upon the ImageServer and add extra
> > > > functionality
> > > > step-by-step
> > > > * step1: what is now in the protocol-codec tutorial (and in svn)
> > > > * step2 : add an ExecutorFilter
> > > > * step3 : add some JMX stuff
> > > > * step4 : show how to cleanly shut down the server
> > > > * step5 : add a throttle filter
> > > > ...
> > > > (the order doesn't really matter)
> > > >
> > > > Unfortunately, until now I didn't get further than step1 ...
> > > > I still have the intention though, just can't promise when I will
> find
> > > > that
> > > > scarce resource called  time.
> > > >
> > > > I'd welcome anyone who wants to work on this.
> > > >
> > > > Maarten
> > > >
> > > >
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Mark Webb wrote:
> > > > > > that is the funniest description of one's software I ever heard.
> > > > > bravo...
> > > > > >
> > > > > > On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <
> > > > niklas@protocol7.com
> > > > > >
> > > > > > wrote:
> > > > > >
> > > > > >> 2008/4/9 Mark Webb <el...@gmail.com>:
> > > > > >>> sounds like that is the direction we want to go.  My only
> > concern
> > > > is
> > > > > >> that we
> > > > > >>>  start getting apps in the examples directory that overlap.
> >  There
> > > > is
> > > > > >>>  currently a chat program in examples, but maybe your's is
> more
> > > > > >> feature-rich
> > > > > >>>  or more robust.  One think I do like about the current chat
> > > > example
> > > > > is
> > > > > >> that
> > > > > >>>  it is the only example that uses Spring.
> > > > > >> No it's certainly not more feature rich, it's probably the
> > > > stupidest
> > > > > >> chat server ever built. The purpose was to make it as simple as
> > > > > >> possible to be able to communicate it during a talk.
> > > > > >>
> > > > > >> /niklas
> > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> > > > > --
> > > > > what we call human nature is actually human habit
> > > > > --
> > > > > http://gleamynode.net/
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > --------------------------------
> > > Talent hits a target no one else can hit; Genius hits a target no one
> > else
> > > can see.
> > >
> >
> >
> >
> > --
> > --------------------------------
> > Talent hits a target no one else can hit; Genius hits a target no one
> else
> > can see.
> >
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by Maarten Bosteels <mb...@gmail.com>.
Hello Mark,

Great to hear you will have some time to work on the examples.

2008/4/9 Mark Webb <el...@gmail.com>:

> I hit the send button much too quickly.  Maartin, what is your plan for
> how
> the codebase will look?  I see that in the examples subproject there is a
> package called "imagine.step1".  For step 2, will you take a copy of all
> the
> code from step 1 and add more functionality (like ExecutorFilter)?


I think most of the code from step1 can be reused by step2 etc, so there
would be no need to copy code.
IMO, the imagine.step2 package should only contain the code that needs to be
added or changed compared to step1. Probably only the main method where the
filterChain is built.

But feel free to disagree :-)

regards,
Maarten (not Maartin)


>
> How do you see all this coming together?
>
> --Mark
>
> 2008/4/9 Mark Webb <el...@gmail.com>:
>
> > I have some free time coming up.  I will give it a shot.
> >
> >
> >
> > On Wed, Apr 9, 2008 at 1:29 PM, Maarten Bosteels <
> mbosteels.dns@gmail.com>
> > wrote:
> >
> > > On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <tr...@gmail.com>
> > > wrote:
> > >
> > > > I think it's good time for someone to write a MINA curriculum and
> > > revamp
> > > > all examples to follow the curriculum.  Maarten once started an
> > > > 'imagine' example but he ended up with stage1.  He might have
> > > something
> > > > in his mind about setting up the MINA curriculum.  ;)
> > >
> > >
> > > :-)
> > > Yes, my plan was to build upon the ImageServer and add extra
> > > functionality
> > > step-by-step
> > > * step1: what is now in the protocol-codec tutorial (and in svn)
> > > * step2 : add an ExecutorFilter
> > > * step3 : add some JMX stuff
> > > * step4 : show how to cleanly shut down the server
> > > * step5 : add a throttle filter
> > > ...
> > > (the order doesn't really matter)
> > >
> > > Unfortunately, until now I didn't get further than step1 ...
> > > I still have the intention though, just can't promise when I will find
> > > that
> > > scarce resource called  time.
> > >
> > > I'd welcome anyone who wants to work on this.
> > >
> > > Maarten
> > >
> > >
> > > >
> > > > Cheers,
> > > >
> > > > Mark Webb wrote:
> > > > > that is the funniest description of one's software I ever heard.
> > > > bravo...
> > > > >
> > > > > On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <
> > > niklas@protocol7.com
> > > > >
> > > > > wrote:
> > > > >
> > > > >> 2008/4/9 Mark Webb <el...@gmail.com>:
> > > > >>> sounds like that is the direction we want to go.  My only
> concern
> > > is
> > > > >> that we
> > > > >>>  start getting apps in the examples directory that overlap.
>  There
> > > is
> > > > >>>  currently a chat program in examples, but maybe your's is more
> > > > >> feature-rich
> > > > >>>  or more robust.  One think I do like about the current chat
> > > example
> > > > is
> > > > >> that
> > > > >>>  it is the only example that uses Spring.
> > > > >> No it's certainly not more feature rich, it's probably the
> > > stupidest
> > > > >> chat server ever built. The purpose was to make it as simple as
> > > > >> possible to be able to communicate it during a talk.
> > > > >>
> > > > >> /niklas
> > > > >>
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> > > > --
> > > > what we call human nature is actually human habit
> > > > --
> > > > http://gleamynode.net/
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > --------------------------------
> > Talent hits a target no one else can hit; Genius hits a target no one
> else
> > can see.
> >
>
>
>
> --
> --------------------------------
> Talent hits a target no one else can hit; Genius hits a target no one else
> can see.
>

Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
I hit the send button much too quickly.  Maartin, what is your plan for how
the codebase will look?  I see that in the examples subproject there is a
package called "imagine.step1".  For step 2, will you take a copy of all the
code from step 1 and add more functionality (like ExecutorFilter)?

How do you see all this coming together?

--Mark

2008/4/9 Mark Webb <el...@gmail.com>:

> I have some free time coming up.  I will give it a shot.
>
>
>
> On Wed, Apr 9, 2008 at 1:29 PM, Maarten Bosteels <mb...@gmail.com>
> wrote:
>
> > On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <tr...@gmail.com>
> > wrote:
> >
> > > I think it's good time for someone to write a MINA curriculum and
> > revamp
> > > all examples to follow the curriculum.  Maarten once started an
> > > 'imagine' example but he ended up with stage1.  He might have
> > something
> > > in his mind about setting up the MINA curriculum.  ;)
> >
> >
> > :-)
> > Yes, my plan was to build upon the ImageServer and add extra
> > functionality
> > step-by-step
> > * step1: what is now in the protocol-codec tutorial (and in svn)
> > * step2 : add an ExecutorFilter
> > * step3 : add some JMX stuff
> > * step4 : show how to cleanly shut down the server
> > * step5 : add a throttle filter
> > ...
> > (the order doesn't really matter)
> >
> > Unfortunately, until now I didn't get further than step1 ...
> > I still have the intention though, just can't promise when I will find
> > that
> > scarce resource called  time.
> >
> > I'd welcome anyone who wants to work on this.
> >
> > Maarten
> >
> >
> > >
> > > Cheers,
> > >
> > > Mark Webb wrote:
> > > > that is the funniest description of one's software I ever heard.
> > > bravo...
> > > >
> > > > On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <
> > niklas@protocol7.com
> > > >
> > > > wrote:
> > > >
> > > >> 2008/4/9 Mark Webb <el...@gmail.com>:
> > > >>> sounds like that is the direction we want to go.  My only concern
> > is
> > > >> that we
> > > >>>  start getting apps in the examples directory that overlap.  There
> > is
> > > >>>  currently a chat program in examples, but maybe your's is more
> > > >> feature-rich
> > > >>>  or more robust.  One think I do like about the current chat
> > example
> > > is
> > > >> that
> > > >>>  it is the only example that uses Spring.
> > > >> No it's certainly not more feature rich, it's probably the
> > stupidest
> > > >> chat server ever built. The purpose was to make it as simple as
> > > >> possible to be able to communicate it during a talk.
> > > >>
> > > >> /niklas
> > > >>
> > > >
> > > >
> > > >
> > >
> > > --
> > > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> > > --
> > > what we call human nature is actually human habit
> > > --
> > > http://gleamynode.net/
> > >
> > >
> >
>
>
>
> --
> --------------------------------
> Talent hits a target no one else can hit; Genius hits a target no one else
> can see.
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
I have some free time coming up.  I will give it a shot.


On Wed, Apr 9, 2008 at 1:29 PM, Maarten Bosteels <mb...@gmail.com>
wrote:

> On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <tr...@gmail.com>
> wrote:
>
> > I think it's good time for someone to write a MINA curriculum and revamp
> > all examples to follow the curriculum.  Maarten once started an
> > 'imagine' example but he ended up with stage1.  He might have something
> > in his mind about setting up the MINA curriculum.  ;)
>
>
> :-)
> Yes, my plan was to build upon the ImageServer and add extra functionality
> step-by-step
> * step1: what is now in the protocol-codec tutorial (and in svn)
> * step2 : add an ExecutorFilter
> * step3 : add some JMX stuff
> * step4 : show how to cleanly shut down the server
> * step5 : add a throttle filter
> ...
> (the order doesn't really matter)
>
> Unfortunately, until now I didn't get further than step1 ...
> I still have the intention though, just can't promise when I will find
> that
> scarce resource called  time.
>
> I'd welcome anyone who wants to work on this.
>
> Maarten
>
>
> >
> > Cheers,
> >
> > Mark Webb wrote:
> > > that is the funniest description of one's software I ever heard.
> > bravo...
> > >
> > > On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <
> niklas@protocol7.com
> > >
> > > wrote:
> > >
> > >> 2008/4/9 Mark Webb <el...@gmail.com>:
> > >>> sounds like that is the direction we want to go.  My only concern is
> > >> that we
> > >>>  start getting apps in the examples directory that overlap.  There
> is
> > >>>  currently a chat program in examples, but maybe your's is more
> > >> feature-rich
> > >>>  or more robust.  One think I do like about the current chat example
> > is
> > >> that
> > >>>  it is the only example that uses Spring.
> > >> No it's certainly not more feature rich, it's probably the stupidest
> > >> chat server ever built. The purpose was to make it as simple as
> > >> possible to be able to communicate it during a talk.
> > >>
> > >> /niklas
> > >>
> > >
> > >
> > >
> >
> > --
> > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> >
> >
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by Maarten Bosteels <mb...@gmail.com>.
On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <tr...@gmail.com>
wrote:

> I think it's good time for someone to write a MINA curriculum and revamp
> all examples to follow the curriculum.  Maarten once started an
> 'imagine' example but he ended up with stage1.  He might have something
> in his mind about setting up the MINA curriculum.  ;)


:-)
Yes, my plan was to build upon the ImageServer and add extra functionality
step-by-step
* step1: what is now in the protocol-codec tutorial (and in svn)
* step2 : add an ExecutorFilter
* step3 : add some JMX stuff
* step4 : show how to cleanly shut down the server
* step5 : add a throttle filter
...
(the order doesn't really matter)

Unfortunately, until now I didn't get further than step1 ...
I still have the intention though, just can't promise when I will find that
scarce resource called  time.

I'd welcome anyone who wants to work on this.

Maarten


>
> Cheers,
>
> Mark Webb wrote:
> > that is the funniest description of one's software I ever heard.
> bravo...
> >
> > On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <niklas@protocol7.com
> >
> > wrote:
> >
> >> 2008/4/9 Mark Webb <el...@gmail.com>:
> >>> sounds like that is the direction we want to go.  My only concern is
> >> that we
> >>>  start getting apps in the examples directory that overlap.  There is
> >>>  currently a chat program in examples, but maybe your's is more
> >> feature-rich
> >>>  or more robust.  One think I do like about the current chat example
> is
> >> that
> >>>  it is the only example that uses Spring.
> >> No it's certainly not more feature rich, it's probably the stupidest
> >> chat server ever built. The purpose was to make it as simple as
> >> possible to be able to communicate it during a talk.
> >>
> >> /niklas
> >>
> >
> >
> >
>
> --
> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>
>

Re: MINA v2.0 Quick Start Guide

Posted by 이희승 (Trustin Lee) <t...@gmail.com>.
I think it's good time for someone to write a MINA curriculum and revamp
all examples to follow the curriculum.  Maarten once started an
'imagine' example but he ended up with stage1.  He might have something
in his mind about setting up the MINA curriculum.  ;)

Cheers,

Mark Webb wrote:
> that is the funniest description of one's software I ever heard.   bravo...
> 
> On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <ni...@protocol7.com>
> wrote:
> 
>> 2008/4/9 Mark Webb <el...@gmail.com>:
>>> sounds like that is the direction we want to go.  My only concern is
>> that we
>>>  start getting apps in the examples directory that overlap.  There is
>>>  currently a chat program in examples, but maybe your's is more
>> feature-rich
>>>  or more robust.  One think I do like about the current chat example is
>> that
>>>  it is the only example that uses Spring.
>> No it's certainly not more feature rich, it's probably the stupidest
>> chat server ever built. The purpose was to make it as simple as
>> possible to be able to communicate it during a talk.
>>
>> /niklas
>>
> 
> 
> 

-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/


Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
that is the funniest description of one's software I ever heard.   bravo...

On Wed, Apr 9, 2008 at 10:25 AM, Niklas Gustavsson <ni...@protocol7.com>
wrote:

> 2008/4/9 Mark Webb <el...@gmail.com>:
> > sounds like that is the direction we want to go.  My only concern is
> that we
> >  start getting apps in the examples directory that overlap.  There is
> >  currently a chat program in examples, but maybe your's is more
> feature-rich
> >  or more robust.  One think I do like about the current chat example is
> that
> >  it is the only example that uses Spring.
>
> No it's certainly not more feature rich, it's probably the stupidest
> chat server ever built. The purpose was to make it as simple as
> possible to be able to communicate it during a talk.
>
> /niklas
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by Niklas Gustavsson <ni...@protocol7.com>.
2008/4/9 Mark Webb <el...@gmail.com>:
> sounds like that is the direction we want to go.  My only concern is that we
>  start getting apps in the examples directory that overlap.  There is
>  currently a chat program in examples, but maybe your's is more feature-rich
>  or more robust.  One think I do like about the current chat example is that
>  it is the only example that uses Spring.

No it's certainly not more feature rich, it's probably the stupidest
chat server ever built. The purpose was to make it as simple as
possible to be able to communicate it during a talk.

/niklas

Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
sounds like that is the direction we want to go.  My only concern is that we
start getting apps in the examples directory that overlap.  There is
currently a chat program in examples, but maybe your's is more feature-rich
or more robust.  One think I do like about the current chat example is that
it is the only example that uses Spring.



2008/4/9 Niklas Gustavsson <ni...@protocol7.com>:

> I got a small chat server example that I wrote for my session at
> ApacheCon. After I clean up that code and add comments to make it
> understandable, would you like me to upload that into the examples
> module as well? Would suite me fine as I promised during the talk to
> make it available at that mythical "somewhere" :-)
>
> /niklas
>
> 2008/4/9 Mark Webb <el...@gmail.com>:
> > will do...
> >
> >
> >  On Wed, Apr 9, 2008 at 8:59 AM, "이희승 (Trustin Lee) <tr...@gmail.com>
> >  wrote:
> >
> >
> >
> >  > Why don't you include it into the trunk?  There's an example module
> >  > already.
> >  >
> >  > Cheers,
> >  >
> >  > Mark Webb wrote:
> >  > > Niall,
> >  > >
> >  > > Thanks for pointing this out to me.  I have updated the wiki and
> also
> >  > placed
> >  > > the code into my sandbox.  You may access the code at:
> >  > >
> >  > >
> >  >
> http://svn.apache.org/repos/asf/mina/sandbox/mwebb/mina/src/main/java/org/apache/mina/gettingstarted/timeserver/
> >  > >
> >  > > --Mark
> >  > >
> >  > > On Wed, Apr 9, 2008 at 5:19 AM, Niall Pemberton <
> >  > niall.pemberton@gmail.com>
> >  > > wrote:
> >  > >
> >  > >> The  MINA v2.0 Quick Start Guide needs updating for the current
> API
> >  > >>
> >  > >> http://mina.apache.org/mina-v20-quick-start-guide.html
> >  > >>
> >  > >> In the last MinaTimeServer code snippet it has...
> >  > >>
> >  > >> acceptor.setLocalAddress( new InetSocketAddress(PORT) );
> >  > >> acceptor.bind();
> >  > >>
> >  > >> ...but setLocalAddress() doesn't exist (in Mina 2.0.0-M1) - should
> be
> >  > >> changed to setDefaultLocalAddress() or replace those lines with
> >  > >>
> >  > >> acceptor.bind(new InetSocketAddress(PORT));
> >  > >>
> >  > >> The other thing is the lines added in the 3rd MinaTimeServer code
> >  > >> snippet have been dropped from the 4th(last) code snippet, i.e.
> >  > >>
> >  > >> acceptor.getSessionConfig().setReadBufferSize( 2048 );
> >  > >> acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10
> );
> >  > >>
> >  > >> Niall
> >  > >>
> >  > >
> >  > >
> >  > >
> >  >
> >  > --
> >  > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> >  > --
> >  > what we call human nature is actually human habit
> >  > --
> >  > http://gleamynode.net/
> >  >
> >  >
> >
> >
> >
> >
> > --
> >  --------------------------------
> >  Talent hits a target no one else can hit; Genius hits a target no one
> else
> >  can see.
> >
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by Niklas Gustavsson <ni...@protocol7.com>.
I got a small chat server example that I wrote for my session at
ApacheCon. After I clean up that code and add comments to make it
understandable, would you like me to upload that into the examples
module as well? Would suite me fine as I promised during the talk to
make it available at that mythical "somewhere" :-)

/niklas

2008/4/9 Mark Webb <el...@gmail.com>:
> will do...
>
>
>  On Wed, Apr 9, 2008 at 8:59 AM, "이희승 (Trustin Lee) <tr...@gmail.com>
>  wrote:
>
>
>
>  > Why don't you include it into the trunk?  There's an example module
>  > already.
>  >
>  > Cheers,
>  >
>  > Mark Webb wrote:
>  > > Niall,
>  > >
>  > > Thanks for pointing this out to me.  I have updated the wiki and also
>  > placed
>  > > the code into my sandbox.  You may access the code at:
>  > >
>  > >
>  > http://svn.apache.org/repos/asf/mina/sandbox/mwebb/mina/src/main/java/org/apache/mina/gettingstarted/timeserver/
>  > >
>  > > --Mark
>  > >
>  > > On Wed, Apr 9, 2008 at 5:19 AM, Niall Pemberton <
>  > niall.pemberton@gmail.com>
>  > > wrote:
>  > >
>  > >> The  MINA v2.0 Quick Start Guide needs updating for the current API
>  > >>
>  > >> http://mina.apache.org/mina-v20-quick-start-guide.html
>  > >>
>  > >> In the last MinaTimeServer code snippet it has...
>  > >>
>  > >> acceptor.setLocalAddress( new InetSocketAddress(PORT) );
>  > >> acceptor.bind();
>  > >>
>  > >> ...but setLocalAddress() doesn't exist (in Mina 2.0.0-M1) - should be
>  > >> changed to setDefaultLocalAddress() or replace those lines with
>  > >>
>  > >> acceptor.bind(new InetSocketAddress(PORT));
>  > >>
>  > >> The other thing is the lines added in the 3rd MinaTimeServer code
>  > >> snippet have been dropped from the 4th(last) code snippet, i.e.
>  > >>
>  > >> acceptor.getSessionConfig().setReadBufferSize( 2048 );
>  > >> acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );
>  > >>
>  > >> Niall
>  > >>
>  > >
>  > >
>  > >
>  >
>  > --
>  > Trustin Lee - Principal Software Engineer, JBoss, Red Hat
>  > --
>  > what we call human nature is actually human habit
>  > --
>  > http://gleamynode.net/
>  >
>  >
>
>
>
>
> --
>  --------------------------------
>  Talent hits a target no one else can hit; Genius hits a target no one else
>  can see.
>

Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
will do...


On Wed, Apr 9, 2008 at 8:59 AM, "이희승 (Trustin Lee) <tr...@gmail.com>
wrote:

> Why don't you include it into the trunk?  There's an example module
> already.
>
> Cheers,
>
> Mark Webb wrote:
> > Niall,
> >
> > Thanks for pointing this out to me.  I have updated the wiki and also
> placed
> > the code into my sandbox.  You may access the code at:
> >
> >
> http://svn.apache.org/repos/asf/mina/sandbox/mwebb/mina/src/main/java/org/apache/mina/gettingstarted/timeserver/
> >
> > --Mark
> >
> > On Wed, Apr 9, 2008 at 5:19 AM, Niall Pemberton <
> niall.pemberton@gmail.com>
> > wrote:
> >
> >> The  MINA v2.0 Quick Start Guide needs updating for the current API
> >>
> >> http://mina.apache.org/mina-v20-quick-start-guide.html
> >>
> >> In the last MinaTimeServer code snippet it has...
> >>
> >> acceptor.setLocalAddress( new InetSocketAddress(PORT) );
> >> acceptor.bind();
> >>
> >> ...but setLocalAddress() doesn't exist (in Mina 2.0.0-M1) - should be
> >> changed to setDefaultLocalAddress() or replace those lines with
> >>
> >> acceptor.bind(new InetSocketAddress(PORT));
> >>
> >> The other thing is the lines added in the 3rd MinaTimeServer code
> >> snippet have been dropped from the 4th(last) code snippet, i.e.
> >>
> >> acceptor.getSessionConfig().setReadBufferSize( 2048 );
> >> acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );
> >>
> >> Niall
> >>
> >
> >
> >
>
> --
> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>
>


-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by 이희승 (Trustin Lee) <t...@gmail.com>.
Why don't you include it into the trunk?  There's an example module already.

Cheers,

Mark Webb wrote:
> Niall,
> 
> Thanks for pointing this out to me.  I have updated the wiki and also placed
> the code into my sandbox.  You may access the code at:
> 
> http://svn.apache.org/repos/asf/mina/sandbox/mwebb/mina/src/main/java/org/apache/mina/gettingstarted/timeserver/
> 
> --Mark
> 
> On Wed, Apr 9, 2008 at 5:19 AM, Niall Pemberton <ni...@gmail.com>
> wrote:
> 
>> The  MINA v2.0 Quick Start Guide needs updating for the current API
>>
>> http://mina.apache.org/mina-v20-quick-start-guide.html
>>
>> In the last MinaTimeServer code snippet it has...
>>
>> acceptor.setLocalAddress( new InetSocketAddress(PORT) );
>> acceptor.bind();
>>
>> ...but setLocalAddress() doesn't exist (in Mina 2.0.0-M1) - should be
>> changed to setDefaultLocalAddress() or replace those lines with
>>
>> acceptor.bind(new InetSocketAddress(PORT));
>>
>> The other thing is the lines added in the 3rd MinaTimeServer code
>> snippet have been dropped from the 4th(last) code snippet, i.e.
>>
>> acceptor.getSessionConfig().setReadBufferSize( 2048 );
>> acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );
>>
>> Niall
>>
> 
> 
> 

-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/


Re: MINA v2.0 Quick Start Guide

Posted by Mark Webb <el...@gmail.com>.
Niall,

Thanks for pointing this out to me.  I have updated the wiki and also placed
the code into my sandbox.  You may access the code at:

http://svn.apache.org/repos/asf/mina/sandbox/mwebb/mina/src/main/java/org/apache/mina/gettingstarted/timeserver/

--Mark

On Wed, Apr 9, 2008 at 5:19 AM, Niall Pemberton <ni...@gmail.com>
wrote:

> The  MINA v2.0 Quick Start Guide needs updating for the current API
>
> http://mina.apache.org/mina-v20-quick-start-guide.html
>
> In the last MinaTimeServer code snippet it has...
>
> acceptor.setLocalAddress( new InetSocketAddress(PORT) );
> acceptor.bind();
>
> ...but setLocalAddress() doesn't exist (in Mina 2.0.0-M1) - should be
> changed to setDefaultLocalAddress() or replace those lines with
>
> acceptor.bind(new InetSocketAddress(PORT));
>
> The other thing is the lines added in the 3rd MinaTimeServer code
> snippet have been dropped from the 4th(last) code snippet, i.e.
>
> acceptor.getSessionConfig().setReadBufferSize( 2048 );
> acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );
>
> Niall
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: MINA v2.0 Quick Start Guide

Posted by Lian Cheng <rh...@gmail.com>.
Hi, all

I've once planned to write a MINA 2.0 tutorial for my colleagues, and here
is some sample code including basic time server/client with Spring/JMX/SSL
support. you may check it out here: http://code.google.com/p/mina-2-tutor/

The tutorial is in Chinese and is far from complete. But all the sample
projects are complete, and they are all maven based. I'm not sure whether
it's useful, but I'll be really happy if these code may help :-)

Cheers
Cheng

2008/4/9, Niall Pemberton <ni...@gmail.com>:
>
> The  MINA v2.0 Quick Start Guide needs updating for the current API
>
> http://mina.apache.org/mina-v20-quick-start-guide.html
>
> In the last MinaTimeServer code snippet it has...
>
> acceptor.setLocalAddress( new InetSocketAddress(PORT) );
> acceptor.bind();
>
> ...but setLocalAddress() doesn't exist (in Mina 2.0.0-M1) - should be
> changed to setDefaultLocalAddress() or replace those lines with
>
> acceptor.bind(new InetSocketAddress(PORT));
>
> The other thing is the lines added in the 3rd MinaTimeServer code
> snippet have been dropped from the 4th(last) code snippet, i.e.
>
> acceptor.getSessionConfig().setReadBufferSize( 2048 );
> acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );
>
>
> Niall
>

Re: MINA v2.0 Quick Start Guide

Posted by Dave Roberts <da...@saaconsultants.com>.
> http://mina.apache.org/mina-v20-quick-start-guide.html

Nice simple tutorial, great stuff.

One point, is that after the second code snippet it reads: "If you 
are interested in adding a thread model to the SocketAcceptor, 
please read the Configuring Thread Model tutorial.".

However, within the linked tutorial it then reads: "MINA 2.0 and 
later versions doesn't have ThreadModel anymore. Please skip this 
section if you are using them."

Given the latter statement, there seems little point in linking to 
it from a MINA 2.0 starter guide.

<pedant mode="on">
BTW "later versions doesn't have ThreadModel" should read "later 
versions *don't* have [a|the] ThreadModel"

Regards