Tencent Upgrades Mobile QQ Architecture with NT Framework

TapTechNews May 16th - On June 27, 2023, Mobile QQ Android version 8.9.63/iOS version 8.9.65 was released. This is the first official version of Mobile QQ based on the NT architecture. On July 3, 2023, NT architecture Windows QQ was launched on the official website, achieving official unified reconstruction across three platforms. Tencent developer He Jinyuan wrote an article today, introducing the technical story behind the upgrade of Mobile QQ's architecture.

In 2020, the QQ development team started to upgrade the architecture. Due to the complexity of Mobile QQ's business and the large amount of code, they adopted a phased and progressive strategy to upgrade the architecture.

The new architecture of Mobile QQ is divided into modules based on business, with modules decoupled from each other, communicating through interfaces and routes. At the same time, it is divided into levels, with dependencies from top to bottom. Upper modules can rely on lower modules, but lower modules cannot reverse depend on upper modules.

Due to the separate development of QQ on different platform clients, the code reuse rate is extremely low, leading to high development and maintenance costs. It also resulted in inconsistent multi-end experiences and inconsistent business experiences within the same end. The development team decided to promote the Mobile QQ NT architecture upgrade project.

In order to achieve architecture upgrades and unity, the project team first developed a cross-platform core layer with QQIM core functions using C++: IM core business logic (e.g. friend, group, channel message logic, profile and relationship logic, rich media sending and receiving logic for images, voice, and video, real-time audio and video logic), QQ common components, as well as thread/network/IO and other common resource management modules and operating system encapsulation parts were originally implemented in various platform native languages, and unified into the C++ cross-platform layer.

To control project quality risks, the NT cross-platform core first connected to a relatively small number of users. For the desktop end with high urgency for feature completion, the desktop end was completely rewritten using the new architecture. After successfully completing feature validation and quality testing on the desktop end, the migration to the mobile end began, and the integration for iOS and Android platforms was successfully completed.

Based on the refactored architecture, the development team conducted comprehensive performance optimization. Taking the chat window (AIO) as an example, based on the design idea of a new data flow architecture + data preloading + UI logic parallelization, completed one-way data flow driving and asynchronous loading rendering. System resources fully support the AIO message list, and the final performance indicators have significantly improved, making AIO viewing, navigation, and message scrolling smooth and silky. Other QQ main scenes, such as message list page, message and rich media sending and receiving, image and video viewing, etc., were also optimized using the same approach, resulting in a comprehensive performance improvement.

Likes