We can fix that.  ;)

Your mission should you choose to accept it is:

Build a simple text chat room server with 10 chat rooms.  When a client 
connects they should be prompted to enter a number between 1-10 and press 
return to select a chat room.  Appropriate error handling should be implemented 
to return an error message and re-prompt the user if they enter anything but 
1-10.  Once the user has selected a chat room the only way to leave it is for 
them to terminate the connection.  All users who enter the same chat room 
should get messages from everyone else in the same chat room.
Telnet will be the chat room client application, so no need to build that.  
(Hint, use the TextLineCodec Mina supplies when you build the server.)

Have it done and post it on a website, then announce it to the list for peer 
review by Friday 9/14/2007.

For extra credit:

1) When a user logs into a chat room they should get the last 10 messages that 
were sent in the chat room.
2) Prompt user's for a nickname and the chat room they want to join.  They 
should be prompted for one, then the other.  Not both at the same time.
3) When a user logs into a chat room they should get a list of the other users 
in the chat room automatically.
4) When a new user logs into a chat room other users already in the room should 
get an announcement about the new user.
5) There should be some visual indication which user sent each message.

You must at least implement the basic functionality before any 'extra credit' 
will be awarded.

While this sounds like a very simple application it will require you to handle 
both per connection state and 'global' state.  You will also have to deal with 
concurrency issues properly.  

Rob

----- Original Message ----
From: Simon Aquilina <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, September 7, 2007 10:58:49 AM
Subject: Re: MINA: Design Patterns

Hi,

Thanks for your reply :) I never read anyone of the books you have 
mentioned. So I believe I will take your suggestions and read 
Head-First-Design-Patterns first.

I believe that your suggestion to experiment and ask questions is what I 
need to do. I wrote some small server applications, however I stopped short 
from completing them since I felt I was doing them wrongly. At the moment I 
am doing this research as a hobby, so I do not have deadlines to follow, 
something I feel it is playing in my disadvantage!

Anyways, thanks again for the reply :)

Regards,
Simon J.


>From: Rob Butler <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: MINA: Design Patterns
>Date: Fri, 7 Sep 2007 07:10:11 -0700 (PDT)
>
>The official tome of design patterns by the Gang Of Four (GOF) is of course 
>required reading.  But it's a bit dry, and simply boring!
>
>http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612
>
>I really enjoyed Head First Design Patterns.  Much better read.  It covers 
>some of the patterns in GOF (not all) but does a better job of making it 
>readable and interesting. They cover some other patterns as well which are 
>useful.  If you've read neither start with this one first.  Not only will 
>you actually finish it because it's enjoyable, but it will better prepare 
>you for the dry GOF.
>
>http://www.amazon.com/Head-First-Design-Patterns/dp/0596007124
>
>The poster is nice too:  
>http://www.amazon.com/Head-First-Design-Patterns-Poster/dp/0596102143
>
>There are some other design patterns books, some even in Java.  I haven't 
>read any of them yet (plan to).  So there could be some good ones.
>
>A good basic understanding of design patterns will help you with all sorts 
>of software development, not just Mina.  Unfortunately, I don't know of any 
>books on SEDA (Staged Event-Driven Architecture) based design, which MINA 
>closely mirrors.
>
>The best way to learn, once you have a basic understanding from the books, 
>is to build applications and work/talk/exchange ideas with other 
>developers.  You will learn so much more from your peers than you could 
>ever get anywhere else.  Especially if you can interact with either senior 
>developers with lots of general experience, or in the case of Mina 
>developers with in-depth specific experience.  You've started down that 
>path already though by posting to this list.  ;)
>
>Looking at the source of well built open-source projects is also a great 
>way to learn too.  (Unfortunately, not all open source projects are well 
>built).  Mina's code would be a great example to learn from.
>
>Hope that helps some.
>Rob
>
>----- Original Message ----
>From: Simon Aquilina <[EMAIL PROTECTED]>
>To: [email protected]
>Sent: Friday, September 7, 2007 9:38:00 AM
>Subject: MINA: Design Patterns
>
>Hi,
>
>First of all I am sorry if this is not strictly related with MINA
>development. However I thought it was a good thing to ask this question to
>people who I consider to be experts in the subject.
>
>Basically I have spent this last year reading about sockets, servers,
>clients, etc. This last month I came across MINA and I started study the
>examples. I feel I can build simple applications now, however I am far away
>from the talent I have seen here.
>
>I was wondering if anyone here knows about any good books regarding Design
>Patterns when building server / client applications that can help me 
>develop
>better MINA applications and such applications in general as well.
>
>My concerns is when building server applications that need to handle
>hundreds of clients at the same time, how to manage multiple connections
>with the same clients (for example one to chat, one to talk, and for web 
>cam
>and so on), and many other problems that at the moment (due to my limited
>experience) I still can not for see.
>
>Again I am sorry if this thread may seem too much like an off-topic. 
>However
>I would be very great full for anyone with a reply.
>
>Thanks and Regards,
>Sim085
>
>_________________________________________________________________
>FREE pop-up blocking with the new MSN Toolbar - get it now!
>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>
>
>
>
>
>
>____________________________________________________________________________________
>Looking for a deal? Find great prices on flights and hotels with Yahoo! 
>FareChase.
>http://farechase.yahoo.com/

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/






       
____________________________________________________________________________________Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

Reply via email to