Architecture and Components

Rocket.Chat's architecture is a comprehensive, multi-component system designed for robustness, flexibility, and scalability. It is based on a client-server model, with the server component written in JavaScript using Node.js and MongoDB for data storage. This architecture is designed for scalability, high performance, and real-time communication, making it suitable for many use cases, whether deployed on-premise or on the cloud. Rocket.Chat is modular, which comprises separate components (modules) that can function independently but are designed to work together. This modular design enhances the flexibility and scalability of the application.

Rocket.Chat Enterprise Edition Architecture

The Enterprise Edition of Rocket.Chat is an advanced, scalable solution that extends the capabilities of the Community Edition. It is specifically designed to cater to the needs of larger organizations and complex use cases, focusing on scalability, reliability, and ease of maintenance.

  1. Server: Rocket.Chat Monolith/Microservices: The Enterprise Edition can be deployed as a Monlith, with multiple nodes next to each other, or as a Microservices architecture. This architecture enhances scalability, load balancing, and high availability. Each system component can be deployed and scaled independently, thereby improving the system's overall scalability and reliability. This architecture facilitates easier updates and maintenance, as individual components can be updated without affecting the entire system.

  2. Clients: Rocket.Chat clients provide users with an interface on the web, desktop, or mobile application, connecting with the server mainly through HTTP requests and Websockets. As all functionalities are exposed by REST APIs and websockets, it's possible to integrate the chat in your own UX easily. This multi-platform design ensures that users can access the chat application from virtually any device.

  3. Push Notifications: Push notifications are crucial for any real-time communication platform. The Enterprise Edition includes advanced unlimited, secure push notifications. Push notifications are sent to mobile devices through a cloud push notification gateway, ensuring real-time communication. SMTP and email notifications can also be configured, providing flexibility in how users receive notifications.

  4. Reverse Proxy: The use of a server proxy in the Rocket.Chat Enterprise Edition adds an extra layer of security and efficiency to the system. The server proxy is an intermediary for client requests seeking resources from other servers. It can provide functionalities such as load balancing, caching, and security checks. This optimizes the data flow and helps protect the system from potential attacks by filtering out malicious requests.

  5. Apps, Integrations, and Bridges: Rocket.Chat is designed to be extensible and interoperable. Apps are developed using the Apps Engine, which interfaces with the Rocket.Chat server. Examples include the WhatsApp app and Google Calendar app. Integrations allow for incorporating other external systems and services using APIs and webhooks. Bridge services provide a way of seamlessly transmitting data and conversation with different conversational platforms or protocols. Rocket.Chat currently supports bridging with the Matrix protocol.

  6. Matrix Protocol Integration: Rocket.Chat supports bridging with the Matrix protocol, which is an open standard for interoperable, decentralized, real-time communication. This integration allows Rocket.Chat to transmit data and conversations seamlessly with different conversational platforms or protocols supporting Matrix.

  7. Permission Management: Rocket.Chat has components for managing user permissions. This is crucial for access control within the chat application, ensuring users can only access the features and data they are authorized to use.

  8. Apps Engine: The Rocket.Chat Apps Engine is a framework that allows users to create and host custom apps for Rocket.Chat.

  9. Reactivity (OpLog) Layer: Rocket.Chat features a reactivity layer, which ensures real-time data updates in the system. This is crucial for a real-time chat application like Rocket.Chat, ensuring that users see the most up-to-date information in their chat interfaces.

  10. WebSocket: Rocket.Chat uses the WebSocket protocol to enable real-time communication between the client and server. The WebSocket protocol is a high-performance, bi-directional communication protocol that enables instant data transfer, essential for a real-time chat application.

  11. Database and Storage: Rocket.Chat uses MongoDB as a database to store all chat messages, user information, and other system configurations and related data. Files like assets, user files, images, and other media files are stored locally on the system running the server or over network services like Amazon S3, and WebDAV. This layered approach to data storage ensures efficient management of data.

  12. Authentication and Authorization: User authentication, authorization, and access control can be managed using open standard protocols like OAuth, SAML, and LDAP. This integration with multiple authentication protocols ensures secure user login processes.

Rocket.Chat Community Edition Architecture

  1. Server: The server is referred to as the Rocket.Chat Monolith, manages the logic and computation, user accounts, message storage, and communication with other components. This central processing unit interacts with all other components, ensuring the system's smooth operation.

  2. Clients: Rocket.Chat clients provide users with an interface on the web, desktop, or mobile application, connecting with the server mainly through HTTP requests and Websockets. This multi-platform design ensures that users can access the chat application from virtually any device.

  3. Push Notifications: Push notifications are sent to mobile devices through a cloud push notification gateway, ensuring real-time communication. SMTP and email notifications can also be configured, providing flexibility in how users receive notifications.

  4. WebSocket: Rocket.Chat uses the WebSocket protocol to enable real-time communication between the client and server. The WebSocket protocol is a high-performance, bi-directional communication protocol that enables instant data transfer, essential for a real-time chat application.

  5. Reverse Proxy: Rocket.Chat uses a reverse proxy for load balancing or caching purposes. This helps optimize the application's performance, ensuring smooth and efficient operation even under heavy load.

  6. Reactivity (OpLog) Layer: Rocket.Chat features a reactivity layer, which ensures real-time data updates in the system. This is crucial for a real-time chat application like Rocket.Chat, ensuring that users see the most up-to-date information in their chat interfaces.

  7. Permission Management: Rocket.Chat has components for managing user permissions. This is crucial for access control within the chat application, ensuring that users can only access the features and data they are authorized to use.

  8. Apps Engine: The Rocket.Chat Apps Engine is a framework that allows users to create and host custom apps for Rocket.Chat.

  9. Database and Storage: Rocket.Chat uses MongoDB as a database to store all chat messages, user information, and other system configurations and related data. Files like assets, user files, images, and other media files are stored locally on the system running the server or over network services like Amazon S3, and WebDAV. This layered approach to data storage ensures efficient management of data.

  10. Authentication and Authorization: User authentication, authorization, and access control can be managed using open standard protocols like OAuth and SAML. This integration with multiple authentication protocols ensures secure user login processes.

The Rocket.Chat architecture is a testament to its resourcefulness as a chat solution. It accommodates various platforms, integrates with multiple protocols and systems, and effectively manages data, ensuring a seamless and efficient chat experience for its users.

Last updated

Rocket.Chat versions receive support for six months after release.