Tribbler

UCSD, California | May 2022

What is Tribbler?

Tribbler is a simple online microblogging service (think Twitter but shhh 🤫). The aim of this project was to refactor a simple single process-single machine into a scalable distributed system that's robust to machine crashes and can handle many concurrent connections while maintaining causal consistency

How did I construct the distributed system?

The basic implementation of Tribbler is based on a key-value storage service called via RPCs.
Scalability: In order to ensure scalability, the key-value store was distributed over multiple backends. This ensures that requests to Tribbler aren't bottlenecked by the existence of a mere single backend storing all the data.
Robustness: The system is robust to hardware (backend) failures. Whenever a backend fails, the system detects this failure and migrates all the data in that backend to another one. This ensures zero data loss and the end user is oblivious to the backend failure, ensuring smooth, uninterrupted service.
Causal consistency: The system needs to necessarily maintain causal consistency. Causal consistency will ensure things such as replies to tribs (think tweets) appearing in a logical order. Causal consistency is maintained using a subsystem of keepers whose responsibility is to maintain a synchronized logical clock across the backends. Additionally, they detect backend failures and facilitate data migration.

This system is built to withstand up to 297 backend failures and 9 keeper failures without any data loss!

Check it out