An attempt at converting MongoDB into FoundationDB