A peer-to-peer system is a logical network built on top of a physical infrastructure such as the Internet. Existing peer-to-peer systems, such as Skype and BitTorrent, are highly heterogeneous. Small fractions of nodes possess disproportionally large fractions of system resources. To avoid performance bottlenecks, services are usually placed on the fastest and most reliable nodes, so called super-peers. This book describes a novel class of peer-to-peer topologies, called gradient topologies, which generalise the concept of super-peers. In gradient topologies, the position of each node is determined by a utility function that captures node's ability to contribute resources. The topology guarantees that high utility nodes are well connected and can be efficiently discovered. System functions are assigned to nodes according to their utility. In particular, the highest utility nodes can host data and provide services to other nodes as super-peers.