A configurable and reconfigurable middleware solution for dynamically discovering services advertised using heterogeneous protocols in diverse environments is presented. A component framework architecture based on a set of architectural elements are proposed for developing individual discovery protocols that plug into the middleware. A discovery platform uses a user agent to discover services on behalf of clients, a service agent to represent and advertise services, and a directory agent where SAs register their local services and UAs send their service requests. An important characteristic of most excited fixed, ad hoc and overlay SDPs is their use of a service directory. Many discovery protocols must also consider important nonfunctional features such as security, quality of service, and semantic discovery.