SMS: Distributed algorithms on graphs