Computing Distance-based metrics on Very Large Graphs