graph algorithms with the spark framework