Instant Messaging (IM) has a wealth of experience in high-concurrency and high-reliability operations. For app developers who are using self-developed or third-party instant messaging services and hope to integrate IM, the issue of migration needs to be considered. IM provides targeted migration solutions for different scenarios.
Terminology
In subsequent documents, we will use the following terminology:
Old system: the original instant messaging service used by an app
New system: Tencent Cloud IM service
App 1.0: an app that implements the instant messaging feature based on the old system
App 2.0: an app that implements the instant messaging feature based on the new system
Message routing (message callback) service: after receiving a message, a third-party communication service provider forwards the message to the app backend. This is similar to the callback after sending one-to-one messages of IM. The migration process is essential to switch the instant messaging service backend from the old system to the new system and upgrade App 1.0 to App 2.0.
Migration Solutions
IM provides the following two migration solutions for you to choose from. Different solutions have different migration effects and differ sharply in implementation difficulty. You need to take the overall existing instant messaging situation of your app into account when choosing a proper migration solution.
Mandatory upgrade solution
The mandatory upgrade policy forcibly upgrades App 1.0 to App 2.0 after IM data synchronization is completed. This solution is easy to implement, and compatibility between the new and old apps after the upgrade does not need to be addressed. The following figure shows the detailed solution:
The main process is as follows:
1. Import historical data to IM, including:
Accounts
User profiles
User relationship chains
Message history of one-to-one chats
Group data
Message history of group chats
2. Force users to upgrade App 1.0 to App 2.0.
3. The old system is discontinued, and all user communication activities are processed in the new system.
New and old app compatibility solution
In this solution, the new and old apps can coexist, and messages are synchronized between both apps. Before App 1.0 is disabled, the app backend needs to maintain real-time two-way synchronization between the new and old systems. This solution is relatively complicated, but provides a better experience for end users. The following figure shows the detailed solution:
The main process is as follows:
1. Import historical data to IM, including:
Accounts
User profiles
User relationship chains
Message history of one-to-one chats
Group data
Message history of group chats
2. Synchronize app data between the new and old systems in a two-way manner, including:
Synchronize one-to-one messages in real time
Synchronize group data and group messages in real time
3. The new and old systems coexist, messages are synchronized between both systems, and the old app will be naturally phased out.
Detailed Migration Operations
Importing accounts
Importing user profiles
Importing user relationship chains
Importing message history of one-to-one chats
Marking one-to-one messages as read
Importing group data and message history of group chats
Follow the directions below to import the group data and message history of group chats:
One-to-one messages, group data, and group messages all need to be hosted to the new system. When new data of these types is generated in the new system, use the callbacks provided by IM to synchronize the new data to the old system. Meanwhile, new data generated in the old system also needs to be synchronized to the new system.
Synchronizing one-to-one messages
Synchronizing group data and group messages
Synchronizing group profiles
Synchronizing group member information
Synchronizing group messages
Caution
If the solutions provided here do not apply to the existing instant messaging service of your app, please contact a customer service agent or business manager to formulate an appropriate migration solution.
Was this page helpful?