Tigase Architecture

The most important thing to understand is that Tigase is very modular and you can have multiple components running inside single instance. However one of the most important components is MessageRouter, which sits in the centre and serves as a, as name suggest, packet router directing packets to the appropriate components.

There is also a group of specialised component responsible for handling users connections: ConnectionManagers (c2s, s2s, ws2s, bosh). They receive packets from the incoming connection, then subsequently they forward processed packet to MessageRouter. Most of the time, especially for packets coming from user connections, packet is routed to SessionManager component (with the session object referring to appropriate user in case of client to server connection). After processing in SessionManager packet goes back to MessageRouter and then, based on the stanza addressing` can go to different component (muc, pubsub) or if it’s addressed to another user it can go through:

  • SessionManager (again), MessageRouter and then (user) ConnectionManagers or,
  • s2s (server to server connection manager) if the user or component is on the different, federated, xmpp server;

In a very broad view this can be depicted with a following graph:

Tigase architecture