With the increasing use of web services in everyday tasks, we are entering an era of the Internet of Services (IoS). Service discovery and selection has become a critical issue in the area of web services. Traditional service discovery approaches are often supported by centralized registries that could suffer from single-point failure, performance bottleneck, and scalability issues in large-scale systems. To address these issues, in this paper we propose a context-aware service discovery and selection approach in a decentralized peer-to-peer environment. In the approach homophily similarity was used for bootstrapping and distribution of nodes. The discovery process is based on the similarity of nodes, previous interaction and behaviour of the nodes, which will help the discovery process in a dynamic environment. Our approach is not only considering service discovery, but also the selection of the best available web service by taking into account the QoS properties of the web services. Experimental results were based on a real-world semantic web service dataset, the results showed that the approach achieved better performance and efficiency in both discovery and selection processes.