The position of Erlang in social applications underscores the importance of having a large, high-volume, concurrent IM server to become less unreachable. Ejabberd is such a good choice, at least a great reference. For a server with 4 cores of 16G memory, a single ejabberd node can support 300,000 of IM users.
Ejabberd is an Instant Messaging server based on the JABBER/XMPP protocol, licensed by GPLV2 (free and open source), with ERLANG/OTP development. It is characterized by cross-platform, fault tolerance, clustering and modularity.
XMPP is an extensible Instant Messaging communication protocol developed by the IETF. XMPP has two basic components, part of its core protocol, and part of the extension protocol. The core protocols are mainly composed of RFC-6120, RFC-6121 and RFC-6122. There is also a bunch of extension protocols that can be found in the XMPP Website Extension Protocol list section. The extended protocols commonly used include XEP-0160 XEP-0013 offline message processing, XEP-0045 multi-user chat, and XEP-0096 file transfer. Smack is an XMPP Library written in the Java language and looks like a better XMPP client in Java.
Ejabberd System Architecture: (http://docs.ejabberd.im/architect/)
The main features supported by Ejabberd are:
L Point-to-point message one-to-onemessaging
L Storage and forwarding Store-and-forward (offline messages)
L Contacts and Status display
L Group Chat
L Message Archive Management
L Online Status extension: Personal Event Protocol (PEP) and input status indication
L Privacy settings
L Support vcards User profile
L Web support based on BOSH and WebSockets
• Streaming management for mobile devices (aka XEP-0198)
L Message Send receipts (akaXEP-184)
L Last Message activity
L Command Line management tool ...
Ejabberd can either use Mnesia as a database, or MySQL. Based on good scalability, Ejabberd also supports SIP and WEBRTC.
A glimpse of the--ejabberd to develop social applications