Dropbox Mike Nakhimovich

Dropbox's Store Grand Re-opening: Loading Android Data with Coroutines

Original post Store Grand Re-opening: Loading Android Data with Coroutines

Article Summary

Dropbox just took over Store, the popular Android data loading library, and rewrote it from scratch in Kotlin. The reason? RxJava was making it too easy for developers to leak memory.

Originally created at the New York Times, Store (3,500+ GitHub stars) helps Android apps manage data fetching, caching, and sharing. Dropbox rebuilt it as Store 4 using Kotlin Coroutines and Flow to align with modern Android architecture and solve critical memory management issues.

Key Takeaways

Critical Insight

Store 4 provides production-ready repository pattern implementation with memory caching, disk persistence, request deduplication, and guaranteed leak prevention through Kotlin's structured concurrency.

Continue reading

What This Article Covers

Problem

Android apps were using too much data because RxJava's disposable-based subscription model made it easy for engineers to forget calling dispose(). This directly caused memory leaks in embedded systems that had limited resources.

Solution

Dropbox rewrote Store 4 in Kotlin using Flow's suspend functions. These enforce structured concurrency by requiring coroutine scope definition at creation time, rather than relying on manual disposal later.

Impact

Store's built-in inflight debouncer prevented duplicate requests for identical data. After the New York Times implemented it, data usage dropped significantly.

The article reveals how Store's inflight debouncer handles 12 simultaneous requests for the same data at app startup without breaking a sweat.

This page summarizes “Store Grand Re-opening: Loading Android Data with Coroutines” by Dropbox, published Jan 15, 2020. All credit for the original work goes to the authors.

Read the original on dropbox.tech (opens in new tab)

AI tools for Android

Browse all AI tools →