MVI Beyond State Reducers: A Modern Kotlin-Based MVI Architecture
Article Summary
Zsolt Kocsi from Bumble reveals how their chat module had bugs so elusive that QA could record them happening but developers could never reproduce them. The culprit? Uncontrolled state management in a massively asynchronous system.
Bumble's Android team faced a critical problem: their rewritten chat module was causing fewer first messages to be sent, hurting business metrics. Even with Clean Architecture, race conditions and unpredictable state changes created bugs that were nearly impossible to debug. This led them to develop MVICore, an open-source MVI framework that goes beyond simple state reducers.
Key Takeaways
- Single immutable State object eliminates race conditions and unpredictable bugs
- Reducer creates new states through deterministic transactions, making behavior traceable
- Features encapsulate all business logic with optional Actor, NewsPublisher, and Bootstrapper components
- Built-in middleware for logging and time-travel debugging on every component
- Solves the SingleLiveEvent problem with News type for one-time events
MVICore provides a complete MVI architecture that scales from simple reducers to complex async workflows while keeping all business logic deterministic and debuggable.
About This Article
Badoo's chat module had race conditions that were nearly impossible to reproduce. The same sequence of events would only happen occasionally, so bugs that QA caught on video couldn't be reliably triggered again.
Zsolt Kocsi's team built MVICore, an open-source MVI framework that manages state through immutable State objects and deterministic Reducer transactions. This approach removed the parallel execution callbacks that were causing the problems.
With MVICore, Badoo could put all business logic into reusable Feature components. The framework included built-in logging and time-travel debugging, so developers could see exactly how state changed without needing to add extra code elsewhere.