Coupang May 5, 2022

Evolution of Android Message Passing Mechanism

Article Summary

Ju Cai from Coupang reveals how their Android app went from Stone Age message passing to a custom LiveData-based event bus that cut development time in half. The journey through three architectural eras offers a masterclass in scaling mobile architecture.

As Coupang's e-commerce business exploded in the late 2010s, their Android app became a tangled mess of dependencies where simple changes required full regression testing. The engineering team evolved through three distinct phases of message passing architecture, ultimately building ElegantLiveDataBus to decouple modules and enable parallel development at scale.

Key Takeaways

Critical Insight

Coupang's custom LiveData-based message bus reduced cross-activity development time by 50% and codebase size by 60% while solving lifecycle and memory leak issues.

The article includes detailed code showing how they prevented data loss in postValue() and implemented hierarchical event processing across multiple activities.

Recent from Coupang

Related Articles