In distributed computing, the peer-to-peer paradigm enables two or more entities to collaborate spontaneously in an overlay network of equals (peers) by using appropriate information and communication schemes without the necessity for central coordination. The key concept of the peer-to-peer paradigm is leveraging idle resources to do something useful, based on a collaborative approach. The increasing academic and industrial interest is resulting in the definition of standards and writing of patents. In this paper we propose a categorization for the peer-to-peer overlay schemes and a survey of the most popular ones, comparing each other with respect to effectiveness and security. Most of them have been or are being used in content sharing systems, that over the last few years have enjoyed explosive popularity. Others are used in parallel and distributed computing, massively multi-player gaming, Internet streaming, ambient intelligence, etc. Considering such a wide range of applications, we discuss the importance of reputation management in supporting trust management among peer participants.