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 <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> 2008/4/10 Mark Webb <[EMAIL PROTECTED]>:
>
> > 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 <
> [EMAIL PROTECTED]>
> > wrote:
> >
> > > Hello Mark,
> > >
> > > Great to hear you will have some time to work on the examples.
> > >
> > > 2008/4/9 Mark Webb <[EMAIL PROTECTED]>:
> > >
> > > > 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 <[EMAIL PROTECTED]>:
> > > >
> > > > > I have some free time coming up.  I will give it a shot.
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Apr 9, 2008 at 1:29 PM, Maarten Bosteels <
> > > > [EMAIL PROTECTED]>
> > > > > wrote:
> > > > >
> > > > > > On Wed, Apr 9, 2008 at 6:08 PM, "이희승 (Trustin Lee) <
> > > [EMAIL PROTECTED]>
> > > > > > 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 <
> > > > > > [EMAIL PROTECTED]
> > > > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > >> 2008/4/9 Mark Webb <[EMAIL PROTECTED]>:
> > > > > > > >>> 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.

Reply via email to