Automatic service composition is an active research area in the field of service computing. This paper presents a distributed approach to automatically discover a composition of services based on the desired input to and output from the process. The algorithm makes use of the contentbased publish/subscribe model, with service inputs modeled as subscriptions, and outputs as advertisements. Service interfaces are mapped to publish/subscribe messages in such a way that publish/subscribe matching is used to evaluate service compatibility. In this way, large-scale distributed service composition and process discovery is achieved with a distributed publish/subscribe network. Evaluations in a distributed environment of a real implementation of the system demonstrate the scalability of the distributed approach, especially with respect to the number of services, the complexity of the discovered processes, and the number of concurrent searches. Categories and Subject Descriptors C.2.4 [Computer...