Messaging Sync — Scaling Mobile Messaging at Airbnb

By Zhiyao Wang, Michelle Leon, Jason Goodman, Nick Reynolds, Julia Fu, Jeff Hodnett, Manuel Deschamps, John Pottebaum, Charlie Jiang

Zhiyao Wang
5 min readbeginner
--
View Original

Overview

The article discusses the implementation of Messaging Sync at Airbnb, aimed at improving the mobile messaging experience by reducing latency and enhancing data consistency. It highlights the transition from an outdated inbox fetch method to a more efficient sync mechanism that optimizes network usage and user experience.

What You'll Learn

1

How to implement a delta sync mechanism for mobile applications

2

Why reducing API request latency is crucial for mobile user experience

3

When to use local storage for data consistency in mobile apps

Key Questions Answered

How does Messaging Sync improve the mobile messaging experience at Airbnb?
Messaging Sync reduces the number of network requests by fetching new messages and updates only when data changes, resulting in faster navigation and a 2x improvement in API latency. This is particularly beneficial in areas with slow network conditions, allowing users to read messages even under poor connectivity.
What are the scenarios for implementing Messaging Sync?
The article outlines three scenarios: Full Delta Update, Initial Sync, and Threads Removal. Each scenario describes how the mobile client interacts with the API to efficiently manage message synchronization and maintain a responsive user experience.
What challenges did Airbnb face while migrating to Messaging Sync?
Airbnb's messaging system is tightly integrated with its booking flow, requiring careful management of data changes that affect the inbox display. Challenges included ensuring threads are updated in the correct order and capturing relevant changes for UI rendering.
How did Airbnb catch regressions during the Messaging Sync rollout?
To identify discrepancies between the old and new APIs, a small percentage of mobile apps ran both simultaneously, logging attribute values and thread orders. This allowed the team to quickly catch and address regressions in the new API.

Key Statistics & Figures

API request latency improvement
2x
This improvement was achieved through the implementation of Messaging Sync, leading to a more stable request duration.
Increase in messages sent from mobile
+3.8% for Android and +5.3% for iOS
This increase followed the rollout of Messaging Sync and other messaging improvements.
Daily inbox visits increase
+200% for Android and +96% for iOS
The increase indicates that the inbox has become the main screen for hosts after the improvements.

Key Actionable Insights

1
Implementing a delta sync mechanism can significantly enhance the performance of mobile applications by reducing unnecessary network requests.
This is particularly important for applications that require real-time updates, as it allows for a more responsive user experience, especially in areas with poor connectivity.
2
Utilizing local storage effectively can improve data consistency and reduce load times for users.
By caching data locally, applications can provide users with immediate access to information, even when offline or on slow networks, enhancing overall satisfaction.
3
Monitoring and logging discrepancies between old and new APIs can help catch regressions early in the development process.
This proactive approach allows teams to maintain high-quality standards and quickly address issues that may arise during transitions to new systems.

Common Pitfalls

1
Failing to manage the order of updated threads can lead to a confusing user experience.
If new data is merged without ensuring the correct order, users may see outdated information or experience delays in updates, which can frustrate them.
2
Neglecting to capture all relevant data changes can result in inconsistencies in the UI.
It's crucial to monitor all changes that could affect the display of messages to ensure that users receive accurate and timely updates.