Breadth-first graph search using an iterative map-reduce algorithm