Etsy John Kalmi Mar 18, 2024

Macramé: Untangling the Knot on the Etsy Android Listing Screen

Article Summary

Etsy's Android listing screen had 4,000+ lines of code in a single file, single-digit test coverage, and 200 experiments running. Something had to give.

The Etsy Android team rebuilt their most critical screen using a reactive architecture called Macramé. This post details their 5-month journey from spaghetti code to a maintainable, testable system inspired by Spotify's Mobius.

Key Takeaways

Critical Insight

Etsy's architectural rewrite delivered both faster performance and happier developers, with the pattern now expanding to Cart and Shop screens.

The team shares honest tradeoffs they made and specific pain points still on their roadmap to fix.

About This Article

Problem

The listing screen had a monolithic architecture that made it hard for developers to test business logic. Tests became complex and brittle, causing continuous integration failures whenever unrelated changes were made.

Solution

John Kalmi's team built Macramé, a reactive architecture based on immutable State objects sent through StateFlow. They used sealed Event classes and Handler classes, each one handling a single Event type.

Impact

After the architectural rewrite, buyers viewed 2.4% more listings on average. Searches went up 2%, and photo views on buyer reviews increased 3.3%.