Extensible messaging and presence protocol (XMPP ):
Scalable message attendance Protocol
Simply put, it is a protocol for sending, receiving, and processing messages.
Spark smack and openfire
There are always a lot of interesting things in the open source world. These three are combined into a complete XMPP im implementation. Including the implementation of the server -- openfire, client -- spark, and XMPP transmission protocols -- smack (Remember, XMPP is a protocol that needs to be implemented, smack plays this role ). The three are implemented based on the Java language, so it is not difficult for developers familiar with Java.
Spark provides a basic implementation of the client and provides a good plug-in architecture. This is a good news for developers. I strongly recommend that you use plug-ins to implement your new functions, instead of modifying the source code. This will benefit your project architecture and minimize the impact of the original project, later sections of the article are developed based on this plug-in system.
Openfire is an implementation of an IM Server Based on XMPP protocol. Although two users can send messages in point-to-point mode after connection, however, you still need to connect to the server to obtain some connection information and communication information. Therefore, the server must be implemented. Openfire also provides some basic functions, but it is really basic! Fortunately, it also provides plug-in extensions. Like spark, I strongly recommend using plug-in extensions to add new features, rather than modifying people's source code.
Smack is a Java implementation of XMPP protocol and provides a set of scalable APIs. However, sometimes you still have to use your own custom XML file content to implement your own functions.