Affinity database C++ kernel library