powered by Jive Software

Difference between a module and component

I am new to OpenFire development. I have gone through the JavaDoc for OpenFire, but I am not able to understand the basic difference between a Module and Component in OpenFire. Can anyone plz help me with this. Thanks…

Hi Vishal, welcome to IgniteRealtime community B-).

I think of a module as a piece of puzzle that contributes to the completeness of a picture. And so, a missing puzzle means that it is not a complete picture. A missing puzzle may or may not spoil the picture as a whole depending on the importance of the puzzle. In Openfire XMPP server software context, an IQAuthHandler module handles client authentication. This module is so important in client-to-server communication that whenever it breaks, everything else is unuseable. Modules such as IQPEPHandler is less important in that it is not required to make the whole system works.

If modules are for software, like puzzles are for a picture, a component is a separate picture containing its own pieces of puzzle. However, this new picture is meaningless without the main picture.

A component in an XMPP context is an extension to the server that normally provides additional services on top of the main server and present itself as a sub-domain of the XMPP server. For example, if the server’s domain (server name) is example.com, a “search” component that provides user search service can be named as search.example.com. It is important to note that Openfire manages such components with some software module.

Components are further divided into internal and external components. An internal component runs from within the XMPP server process/thread. An external component is a separate software that runs in its own thread. The connection between an external component and the main server is through an inter-process-communication mechanism, which is normally TCP/IP. The protocol that makes communications possible and XMPP compliant is XEP-0114: Jabber Component Protocol.