Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   Instant Messaging System Final Year Project (http://www.programmingforums.org/showthread.php?t=7225)

bondito Nov 27th, 2005 1:36 PM

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.
:)

Polyphemus_ Nov 27th, 2005 1:44 PM

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.

Dameon Nov 27th, 2005 2:15 PM

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.

B3TA_SCR1PT3R Nov 27th, 2005 2:45 PM

"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

andro Nov 28th, 2005 12:00 AM

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.

Dameon Nov 28th, 2005 5:40 PM

@andro, what's the difference?

andro Nov 28th, 2005 6:41 PM

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.

Dameon Nov 28th, 2005 8:46 PM

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.

hemant Oct 26th, 2007 11:13 PM

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 (Post 69759)
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.
:)


DaWei Oct 26th, 2007 11:39 PM

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.


All times are GMT -5. The time now is 5:41 PM.

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