views:

369

answers:

3

I am thinking of implementing an easy Instant Messaging server in Java, but I don't want to create yet another protocol, but instead use an already simple IM-protocol. But I don't know which protocol I should use.

The reason Why I want to use an already existing IM-protocol, is that I would like my 'users' to be able to use their own clients, for example pidgin - which already offers a wide spread of protocols, such as XMPP, Simple, Bonjour, etc - and I don't have to develop any clients.

I have looked a bit a XMPP but it since a lot of work embed that protocol into a new server. Maybe there are other protocols that are easier to use?

My questions is, do you guys have any suggestions of protocols that are real basic and easy to use in Java? Pidgin supports a whole bunch of protocols, but which protocols are relevant for me?

+9  A: 

XMPP is widely used and has standards backing behind it. It is pretty easy to use if you use an existing library - there are many client libraries for it in many languages. The google says there are many in java.

An advantage of using XMPP is that your server can act as a gateway to all the other Xmpp/Jabber servers on the net, so your users can talk in & out of your network - like to people logged into GoogleTalk, using standard JID addresses, like [email protected]/desktop.

sean riley
Do you suggest any of those XMPP Java libs? Got any first hand experience?
corgrath
I suggest the Igniterealtime Library called Smack. I wrote some thing with it and you get a good start and the library is very useful for extension of the xmpp protocol
Janusz
suggest: http://www.igniterealtime.org/projects/openfire/index.jsp as their XMPP library, smack
basszero
Go with Smack; I used it for a small project and it was dead easy. Import, create a class, call a few methods on it, and I was up and running.
Alex Feinman
+1  A: 

For the widest support I would go with XMPP/Jabber. There's no other choice really.

rein
A: 

According to this thread, it seems like a pain to develop an XMPP-server in Java:

http://stackoverflow.com/questions/177514/good-xmpp-java-libraries-for-server-side

Even one comment stated that its better of using an existing server instead of creating one from scratch with a library.

corgrath
I think that was the point of the "reinventing the wheel" comment on the question. Why would you write your own server if you can simply download and install, unless it is an exercise of some sort.
Robin