distributed system for the K-nearest-neighbors algorithm