A distributed leader selection algorithm using ABS API