Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing a IM platform in Java

Tags:

java

rmi

If creating an IM platform in Java, which would be a better way to implement communications between the clients and server? I was thinking either RMI or just a socket connection...

Advice please,

Thanks

like image 883
Freddie Avatar asked Dec 13 '25 07:12

Freddie


1 Answers

I would use straight socket connection, using a well known protocol such as XMPP. You can use a library (like smack) to avoid implementing the whole protocol yourself.

The main advantage of XMPP over RMI or your self-made protocol is that is a well established protocol used for exactly that purpose: IM.

Some chat services already using XMPP include Google Chat (GTALK) and Facebook.

like image 151
Pablo Santa Cruz Avatar answered Dec 14 '25 21:12

Pablo Santa Cruz