• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Client- Server chat application

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to develop a Chat application. It is a Client-Server application. The Chat server will listen on port #6789. It will allow upto 10 connections. i.e. upto 10 participants in the chat session. On receiving a connection request, the server will spawn a thread to service that connection's input. Any text message that the user types will be sent to all the users who are connected. This will be handled by an output thread at the server.
The client will be an applet. It will display the messages received and also let the user input the message. The message will consist of the user name and the text message that the user types.

Q : what is M-V-C design pattern ?
Q : how to Design the Java classes according to the pattern.
Q : how Thread synchronization, semaphores for access of
common data areas common to the threads.

Deliverables
The JAVA code
HTML to launch the client applet
Javadoc for the different modules
A paper on MVC design pattern and how to use it to design Java GUI
pl let me know details at an earliest.
Thanx in advance.
sujitdash@rediffmail.com
 
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nice homework assignment....

MVC = Model View Controler.
Check out the Patterns forum for detailed infos.
Used to separate presentation layer from the app.
Semaphores: in java there is the synchronized keyword.
you can male either make whole methods synchronized or just a block:
public synchronized void doSomeFoo() {
// this method is fully synchronized
}
public void doSomeBar() {
// not synchronized
synchronized(someObject) {
// this block is synchronized
}
// also not snychrnized
}
cheers,
karl
 
reply
    Bookmark Topic Watch Topic
  • New Topic