how to connect a chat applet to the server

R

rkj

Hi,
I have just started dabbling in applets and as a practise am trying to
develop a chat server and client. I am confused which technology to
use. I want it to be able to support a large number of users. On
searching i found three different ways to make the connection between
the chat server and the client:
1) HTTP: This will require a continuous polling which itself makes it
non appealing
2) RMI: I donot have much experience in it and have no idea about its
pro and cons
3) JMS: I have done some work in JMS using OpenJms but am not sure
whether it will work fine for large user base and accross firewall and
other such stuff.

Please suggest what is better. If some other way is better i am open to
that too.

Thanks,
rkj
 
M

mgungora

rkj said:
Hi,
I have just started dabbling in applets and as a practise am trying to
develop a chat server and client. I am confused which technology to
use. I want it to be able to support a large number of users. On
searching i found three different ways to make the connection between
the chat server and the client:
1) HTTP: This will require a continuous polling which itself makes it
non appealing
2) RMI: I donot have much experience in it and have no idea about its
pro and cons
3) JMS: I have done some work in JMS using OpenJms but am not sure
whether it will work fine for large user base and accross firewall and
other such stuff.

Please suggest what is better. If some other way is better i am open to
that too.

Thanks,
rkj

AFAIK, whatever you select, you need to poll the server from the
client...
 
J

John C. Bollinger

rkj said:
Hi,
I have just started dabbling in applets and as a practise am trying to
develop a chat server and client. I am confused which technology to
use. I want it to be able to support a large number of users. On
searching i found three different ways to make the connection between
the chat server and the client:
1) HTTP: This will require a continuous polling which itself makes it
non appealing

You do not necessarily need to poll in this case; you can simply use a
multithreaded approach with blocking I/O. That really isn't much
dependent on the protocol, however.
2) RMI: I donot have much experience in it and have no idea about its
pro and cons

I wouldn't recommend it, but perhaps you could make it work, and even
work well. It would tie your clients to Java, however. In any event,
RMI runs on top of a network connection, and you need to worry about the
connection. Also, RMI by itself does not necessarily eliminate polling.
If you have no prior experience with RMI and don't want to use the
project to learn its intricacies, then this is not the approach to choose.
3) JMS: I have done some work in JMS using OpenJms but am not sure
whether it will work fine for large user base and accross firewall and
other such stuff.

I can't comment about JMS.
Please suggest what is better. If some other way is better i am open to
that too.

4) Connect via a plain network Socket, and implement your own chat
protocol over the connection. This also does not by itself eliminate
polling, but you can use it in ways that do not require polling (as you
can at least some of the other methods).

I would personally lean toward 4. Do note, however, that if the client
is implemented as an applet, then either the applet must be digitally
signed, or the chat server must be the same machine as the one the
serves up the applet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top