DistroHash is (yet another) implementation of the Kademlia algorithm for distributed has tables. It is also my attempt at learning C++ so please do not get scared if you see all those shared_ptr’s. Even though it was my first project in C++, I wanted to maintain most of my developer principes such as having a great test coverage, and TDD. I was suprised how this was quite easy with Google’s test framework gtest.
My implementation is based on the paper on XLattice that can be seen here. Said this, there are many inconsistencies in my implementation that make it far from production ready but make it still a great way to better understand how fault tolerant systems are implemented. In fact, I was really surprised how amazingly effective, yet simple, the XOR distance metric is! and I encourage anyone who dosen’t know about it to implement it.
Logarithmic time! Booooom!