Solved

java based chat system

Posted on 2004-10-20
6
239 Views
Last Modified: 2010-04-01
Hi,
I am trying to build a java based chat system, basically i have not done this before and i would like to know from top to bottom what i need to do and how to go about doing it, what tchnology i need to use or if i need a different programming language to program a chat system.
My chat system should have a main window bywhere all the users could chat in a public environment and a private one to one window if they so choose.

As i am a student, this is very important to me as it is the subject of my last year project.
Thank you.

 
0
Comment
Question by:chris_black23
  • 3
  • 2
6 Comments
 
LVL 13

Expert Comment

by:petmagdy
ID: 12361082
Will You need to build a Chatting server first, I would like u to take a look at an open source chatting engine called jabber, you will find it at:

http://www.jabber.org


It has differnet Server implmentations and different clients thay was working on a Java server implementation
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12367729
Do you mean a web-based chat server?  So you can chat using JSP webpages only (no applets)?

Have a look at this:  http://www.javazoom.net/jzservlets/jchatbox/jchatbox.html

It should give you some ideas of what is required :-)

Good luck with your project!!

Tim
0
 

Author Comment

by:chris_black23
ID: 12371587
Thanks Tim,
Have you done this before? would you like to give me in your own words where to start and the whole picture if you can.
THX
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 35

Accepted Solution

by:
TimYates earned 500 total points
ID: 12371662
The major problem you are going to have with a web-based chat system, is that web-pages are a "pull technology".  

That is, they can fetch data whenever they want, but the server cannot just send them data as and when it fancies.  

So it becomes hard to know if a user is actually there or not...you have to wait for them to ask for the page again, and then you know they are still there...

Basically, at its heart, you will have a list of users per room.  And each of these users will build up a list of what has been said since the last time they requested the information.

If they time-out (ie don't request the information for more than 2 mins), then you can remove them from the list

When they do request the information for that room, you can clear their list of things, and send the data to them (where the browser can display it)...

I'd start with a dead simple implementation of a User, a Room (which is a list of users), and a mechanism for the room to send a message to each user in that room (and store it in a list in that user)

Then you should be able to test that the basic mechanism works...

I haven't written one of these before, no...  but the concept isn't that hard...

Have a look at that chat server, and do a quick search on google for others, as they should give you ideas about what is needed, and what is possible :-)

Good luck with it!

Tim
0
 

Author Comment

by:chris_black23
ID: 12379222
Thanks TIM, that helped a lot!!
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12379227
:-)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
logging jar 1 109
report generation frameworks 1 64
best tutorial on log4j and logging for servlets/jsp codes 1 64
dateFashion java challenge 9 138
How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
For months I had no idea how to 'discover' the IP address of the other end of a link (without asking someone who knows), and it drove me batty. Think about it. You can't use Cisco Discovery Protocol (CDP) because it's not implemented on the ASAs.…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question