Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Closed Thread
 
Thread Tools Display Modes
Old Nov 27th, 2005, 1:36 PM   #1
bondito
Newbie
 
Join Date: Nov 2005
Posts: 2
Rep Power: 0 bondito is on a distinguished road
Instant Messaging System Final Year Project

Hi Everyone

I am planning to build an instant messaging system for my final year computer science project using java sockets. I really need ideas on how i can go about implementing the system. I would really appreciate any help i get, thanks.
bondito is offline  
Old Nov 27th, 2005, 1:44 PM   #2
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
Very basic idea:
Well, you have a server computer, which runs the serverprogram for your protocol, and a database to save all the usernames in. The serverprogram receives all the messages, and sends them to the computers which need to receive the message.

Then you have the client of course, which connects to the server.
Polyphemus_ is offline  
Old Nov 27th, 2005, 2:15 PM   #3
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
The client side is easy. Create a class for a server link that allows you to Login, SendMessage, Tick (call it every so many milliseconds to check your sockets, or alternatively spawn a thread), and Disconnect with events such as LoginDone, Disconnected, and MessageReceived.

For the server side, have a class for a connected client that, in the constructor, takes a socket. It should have a tick method similar to the server link class. Methods would include SendMessage (that additionally takes a From parameter) and Disconnect. Events would include LoginAttempt, MessageReceived, and Disconnected. When your listening socket has an incoming connection, accept it and use the returned socket to create a client link object. Set up your event handlers and lastly add it to your client list. The MessageReceived event handler simply enumerates the list to find a matching destination and calls SendMessage. LoginAttempt should return a success or error code to the client and if it was an error proceed to call disconnect. Disconnected is obvious.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline  
Old Nov 27th, 2005, 2:45 PM   #4
B3TA_SCR1PT3R
Hobbyist Programmer
 
B3TA_SCR1PT3R's Avatar
 
Join Date: Jul 2005
Location: Dallas, Texas
Posts: 101
Rep Power: 0 B3TA_SCR1PT3R is an unknown quantity at this point
Send a message via AIM to B3TA_SCR1PT3R
"Sams Teach Yourself Java 2 in 21 Days" has a great example of client/server apps. and a whole chapter on 'Communicating Across The Internet', maybe theres a e-book out there somewhere you could download
__________________
Hoes telling me to calm down but I'm like fuck that shit!
B3TA_SCR1PT3R is offline  
Old Nov 28th, 2005, 12:00 AM   #5
andro
Professional Programmer
 
Join Date: Oct 2005
Location: California
Posts: 310
Rep Power: 3 andro is on a distinguished road
Send a message via AIM to andro
Rather than an IM system, I would suggest a client/server based chat instead. Just a thought. Plus, there are plenty of client/server chat code examples available.
andro is offline  
Old Nov 28th, 2005, 5:40 PM   #6
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
@andro, what's the difference?
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline  
Old Nov 28th, 2005, 6:41 PM   #7
andro
Professional Programmer
 
Join Date: Oct 2005
Location: California
Posts: 310
Rep Power: 3 andro is on a distinguished road
Send a message via AIM to andro
Availability of example code.

For an IM system, you need a central server that allows multiple user authentication and proper threading/routing between client's for sending IM's. All in all it's just more complicated.

A client/server chat, on the other hand, is pretty straightforward. And like I said, there's TONS of example code floating around out there.

Also, it seems like this is your first stab at sockets and what-not in Java. Client/server chat seems to be a pretty standard way to introduce the concepts and api from what I've seen.

If you have the time to learn about sockets in Java, and then to design an IM system, by all means do it. It would admittedly be a little cooler than the client/server chat.
andro is offline  
Old Nov 28th, 2005, 8:46 PM   #8
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Quote:
Originally Posted by andro
For an IM system, you need a central server that allows multiple user authentication and proper threading/routing between client's for sending IM's. All in all it's just more complicated.

A client/server chat, on the other hand, is pretty straightforward.
It was my understanding that a client/server chat is synonomous. You still need to be able to log in, even if any username is accepted without prior registration or password (ex IRC), as well as route messages to their destinations.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline  
Old Oct 26th, 2007, 11:13 PM   #9
hemant
haward2010
 
Join Date: Oct 2007
Posts: 10
Rep Power: 0 hemant is on a distinguished road
Re: Instant Messaging System Final Year Project

If you need readymade project then contactme at hk_pamnani@yahoo.co.in

Quote:
Originally Posted by bondito View Post
Hi Everyone

I am planning to build an instant messaging system for my final year computer science project using java sockets. I really need ideas on how i can go about implementing the system. I would really appreciate any help i get, thanks.
hemant is offline  
Old Oct 26th, 2007, 11:39 PM   #10
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: Instant Messaging System Final Year Project

Quote:
I am planning to build an instant messaging system for my final year computer science project
@hemant: What do you charge for making a person's grade for them? Just curious. The rest of the responses were very nice.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline  
Closed Thread

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:05 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC