Reputation: 526
i will start a new project. In this project i have a server and many clients (over 100000). Clients and the server continuously will communicate with each other. They use only text messages. I think, It is too hard to manage with tcp socket so I should choose XMPP or SIP. I will use Java in this project. Which one do you suggest me? and What are their pros and cons? or do you know more efficient solution?
Upvotes: 12
Views: 7692
Reputation: 350
I think you should use SIP because it supports Peer-to-Peer protocol and is over UDP/TCP. It supports SIP SIMPLE and CPM see http://www.linkedin.com/groups/Differences-betwen-SIP-SIMPLE-CPM-1890406.S.150607448 for details.
You will write less code if you use open source SIP stack bundled with SIP SIMPLE and CPM features.
Take a look at Mobicent's Sip servlets based on Jain-SIP. https://code.google.com/p/sipservlets/. You can use either Tomcat/JBoss for your server deployment.
You can add a Lightweight Presence server on top of opensource SIP server to supports Presence between SIP clients.
On the client side stack, you can use the basic Opensource stack.
More details @ Looking for a SIP Stack for Android
https://code.google.com/p/android-rcs-ims-stack/
Upvotes: 7
Reputation: 116397
It is like comparing apples to oranges, because SIP was originally designed for VoIP, and XMPP for instant messaging.
In my opinion, for text messages only, XMPP is more appropriate.
XMPP is much easier from firewall point of view - it only needs one TCP port 5222 (and port 5269 for server to server communication). Since 5222 is the same port as Google Talk is using, is it rarely filtered by corporate firewalls. XMPP also supports STARTTLS over the same port 5222, so traffic can be easily secured.
SIP, on other hand, normally works over UDP, needs more than one port and is commonly filtered by corporate firewalls.
Upvotes: 14