Coping With Selfishness In Distributed Systems