Introduction to open Source Jabber (XMPP) IM server

Source: Internet
Author: User

A This is the product of the Jabber protocol and related technical articles that I have read roughly once, and some places are not necessarily accurate. Some of the code referenced in the article comes from an article on www.jabber.org.

Two What is Jabber
Jabber, like Icq,msn, is an Internet-based instant messaging system, but unlike these instant messaging software, it is an open instant messaging system and an XML Stream-based protocol. Used to exchange information, field status (presence), and other structured information between two entities on the Internet. You can set up your own Jabber server, use different Jabber Client software, but not like ICQ or MSN, rely on the server and software of AIM or MSN.
The first Jabber technology, developed by Jeremie Miller in 1998, has so far had tens of thousands of Jabber servers and millions of Jabber users on the Internet. The IETF has set Jabber as the standard protocol for Instant Messaging and field technology, called XMPP (extensible Messaging and Presence Protocol), and the relevant specifications are RFC3920 and RFC3921, and JSF ( Jabber software Foundations) has also developed more extension protocols (such as groupchat and file transfer) in its Jep, which are not yet standard, but are likely to become standard in the future.
As a standard protocol, there is currently a large number of Jabber servers and client terminals based on various languages, various platforms, and various license (commercial, GPL, Apache) and open source, along with a large library, On the basis of these libraries, you can develop your own Jabber application.
For more information, see www.jabber.org
Three Use of Jabber
Jabber use similar to other instant messaging software, you download a Jabber client based on your platform (e.g. exodus under Windows, Gabber under Linux, PSI, etc.), Find a Jabber server on the Internet (such as jabber.cn), register an account, and then add your friends to the mailing list to start chatting. You can also set up your own Jabber server, which need to download the corresponding Jabber server software (such as Jive, Jabberd, etc.), after installing the configuration, the address of the server to tell your friends, you can have an own Instant Messenger server.
Jabber can realize the interconnection between different instant messaging software. For example, with a Jabber Client, you can use your MSN or ICQ account to log on to MSN or ICQ servers via the Jabber gateway and communicate with your MSN and ICQ friends.
In the real-time communication function, Jabber with other instant messaging software is not much different, ordinary instant messaging, group chat, friends List classification, on-line reminders, and so on, these features with the specific Jabber client software different and slightly different, but in general are similar.
Four Architecture of the Jabber
Jabber from the structure, more like a mail server, it is distributed, that is, not like other instant messaging software, all Instant Messaging users are connected to the same server, but like a mail server, different users connect to their own server, Exchange information between servers through a standard protocol
An entity is called a contact on the Jabber network, it has a unique identifier, called Jid, which is used to represent a jabber user, but can also represent other content, such as a chat room. It's formatted as[email protected]/resource,[email protected]A bit like the e-mail address format, resource used to represent node different device or location, this is optional, for example, I registered a user on Server1, the user name is Doom, then my Jid is[email protected], when sending a message, indicate[email protected]Yes, resource can not be specified, but when I log in to this server, my Jid may be[email protected]/exodus (if I log in with Exodus software), it may also be[email protected]/PSI (if I log in with PSI)
Jabber is a typical C/s architecture, not like most instant messaging software, using a peer-to architecture, which means that in most cases, when two clients are communicating, their messages are delivered through the server (with exceptions, For example, when transferring files to two client). This architecture is designed to simplify the client side and place most of the work in the server segment, so that the client side is relatively simple and, when added, is mostly done on the server side.
Jabber is a set of XML stream-based protocols that, when a Jabber client is connected to a Jabber server, the client establishes an XML stream from client to server. The server also builds an XML stream from XML to server that looks like this:
|--------------------|
| |
|--------------------|
| |
| |
| |
|--------------------|
| |
| |
| |
|--------------------|
| |
| |
| |
|--------------------|
| ...             |
|--------------------|
| | All information is added to this stream in XML format (this information is called stanzas), such as the following message:
from= ' [email protected] ' to= '[email protected]' >
Wherefore art thou, Romeo?

Because it is XML-formatted data, users can augment their own data by adding their own XML-based private data.
Five Simple Introduction to XMPP protocol
XMPP was identified by the IETF as a standard protocol in October 2004 and includes RFCs 3920 and RFCs 3921, of which 3920 are referred to as extensible Messaging and Presence Protocol (XMPP): Core, Describes the core technologies of XML stream in Jabber, including some technologies of security and internationalization; 3921 is known as extensible Messaging and Presence Protocol (XMPP): Instant Messaging and presence, mainly based on instant messaging technologies such as mailing lists, blacklists, etc.
The IETF also developed two extension protocols, 3922, known as mapping the extensible Messaging and Presence Protocol (XMPP) to Common presence and Instant Messag ING (CPIM), 3923, is known as End-to-end Signing and Object encryption for the extensible Messaging and Presence Protocol (XMPP).
At the same time, JSF has developed a series of extension protocols about Jabber, called jeps (Jabber enhancement proposals), to develop Jabber extensions that, although not part of XMPP, are expected to happen sooner or later.
The following are some of the special description concepts that are required in XMPP:
A child element of Message:stream, which is used to represent a transmitted message, has some related properties, such as to, from, type, etc., to indicate the sender or receiver, which can include some child elements, such as, etc., when the user sends a message, A message element is inserted in the context of the stream, with relevant information in the middle.
Gateway: Used to convert the XMPP protocol to a non-XMPP protocol, or to convert a non-XMPP protocol into an XMPP protocol, to be used for jabber communication with other IM, or other systems such as email
Presence:stream a child element that indicates the user's state, such as online, offline, etc., when the user is offline or changes his or her state, a presence element is inserted in the context of the stream to indicate its state.
I/Q: A child element of the Info/query stream, a request/response mechanism from one entity that sends a request, another entity accepts the request, and makes the corresponding. For example, the client inserts an element into the context of the stream, asks the server for its friend list, and the server returns one, which is the result of the request.
Subscriptions: subscription mechanism to ensure that users can manage the presence of subscribers to a specified user
Tls/sasl:jabber Security Authentication mechanism (this Part I did not understand too, to the effect that before the client and the Server,server and the server to communicate, must have a set of security mechanisms for certification, after certification, to communicate TLS and SASL are two authentication-based technologies)
Six The development trend of Jabber
I personally feel that, as MSN,QQ,ICQ after years of development, already have a large consumer-grade end-user base, for these users, Jabber high-level Open Agreement banner in this respect does not have much advantage. At the same time, there are more and more additional functions on these instant messaging software (such as voice, video, games, etc.), and the Jabber function is weaker in this regard. However, I think in the enterprise instant Messaging and application areas, there may be a relatively large. The current commercial Jabber software is aimed at enterprise instant messaging services.
Because Jabber is an XML-based streaming protocol, it is more suitable for the transmission of structured information, so that in the enterprise Application field, there will be a relatively large development prospects, more typical is that Jabber has been as a part of the COE (public operating environment), in the U.S. Military FBS (future Combat Systems provides services to provide chat services and to receive battlefield information from sensors, allowing real-time information to be transmitted between individual combat platforms, sensors and other resources.
At the same time, due to the Jabber cross-platform features, IP phones and handheld devices that support Jabber have emerged, and there are reports that companies have developed subscription/distribution platforms based on Jabber.
As Jabber's founder Jeremie Miller hoped, Jabber might be more useful in the future for real-time XML data transfer, rather than just as a platform for instant messaging.

Seven Common Open Source Jabber
1. OpenFire (wildfire) 3.x
License: GPL or Commercial
Operating system platform: all (using Java development)
XMPP Jabber Protocol Implementation scenario: 98%
Tim Rating:
Installation and use is very simple, after installation into the Web interface for a 2-3-minute configuration All things are set up. With Java language development, the cost of maintenance and expansion is very low at a time when Java developers are ubiquitous. A single server can support 300,000 concurrent users in the case of my test with Connection Manager. The disadvantage is that cluster is not supported at this time. If the enterprise on-premises im using wildfire + Spark is the best combination.


2. Ejabberd
License: GPL
Operating system platforms: Linux, Windows, MacOS X, etc.
XMPP Jabber Protocol Implementation scenario: 91%
Tim Rating:
Ejabberd is currently the best scalability Jabber/xmpp Server, supporting the distribution of multiple servers, and fault-tolerant processing, single server failure does not affect the entire cluster operation.
The concern is that it is developed in a language that everyone has never heard of, so a lot of people may have given up on it for this reason, just like me.

3. Jabberd 2.x
License: GPL
Operating system platform: mainly Linux, (Windows also support, but do not know how performance)
XMPP Jabber Protocol Implementation scenario: 76%
Tim Rating:
Jabberd has been on the decline since jabber.org switched to Ejabberd. Extensibility is less than ejabberd, ease of use than wildfire, the only advantage is that using C development, if you insist on the development of C, then choose Jabberd Bar.

4. Jabberd 1.x
License: GPL
Operating system platform: mainly Linux, (Windows also support, but do not know how performance)
XMPP Jabber Protocol Implementation scenario: 45%
Tim Rating:
A few years ago Jabberd was synonymous with Jabber, and so far many Jabber documents still introduce Jabber 1.4,
In my previous write "Jabber server occupancy comparison" still ranked first. But many of its new specifications are not supported, and it is believed that most users will turn to the new server.


5. Rising Star Djabberd
Authorization: Open source
Operating system platform: mainly Linux, (Perl written, other platforms should also support)
XMPP Jabber Protocol Implementation situation: N/A
Tim Rating:
Djabberd uses Epoll technology, in theory a single server can support more users. Djabberd is currently used mainly in LiveJournal, most XMPP protocols are supported, and stability is not to be questioned. But because the launch time is short, many detail functions may take time to improve slowly.

Introduction to open Source Jabber (XMPP) IM server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.