Search code examples
javaservletsxmppforumirc

choice between xmpp or java servlet for a chat server


I have done a some (but not advanced level expert) research for xmpp protocol and learned java and Java EE for making JSPs and Servlets.

I want to make a web based chat system. obviously that requires javascript, css, html based front end UI (and if done with xmpp, some desktop xmpp clients can be used).

I really cant make a decision what to use. xmpp or java servlets (as they can be used besides typical jsp websites). It can be done in both. there are open-source xmmp servers which I can use and customize or I can write my own servlet based server application from scratch.

should I make it xmpp compliant or just use a Socket class in java and dont care about xmpp?

I depict the chat server having similar attributes like a blend of IRC, facebook chat, and a forum like stackoverflow

This is a question of longterm strategy, planning ahead for benefits, features and problems or limitations.


Solution

  • XMPP is a protocol. Java EE is a technology.

    XMPP has implementations in Java, but also for lots of other technologies

    Your question makes no sense: choice between a leather seat and a family car...

    Well, you can pick both the family car and the leather seat. Or the sports car with a leather seat. Or a SUV with a leather seat. ...


    Edit according to your comment:

    I wanted to ask that should I make it xmpp compliant or just use a Socket class in java and do all workings with port 80

    Why not use an existing Java library implementing the XMPP protocol? You should be saving time by not re-inventing the wheel ...

    "should I make it xmpp compliant or just use a Socket class in java and dont care about xmpp?"

    You should use existing libraries and protocols if they fit your needs. If an existing server can do what you want then go for it. If it does not but you can customize it fairly easily, then go for it, if not, then create your server using existing XMPP libraries if XMPP covers your needs.

    You are the only one who knows what you need. You have the XMPP protocol specifications to decide if it covers them or not.