— Heterogeneous wireless sensor networks are made up of different kinds of nodes. Some nodes, the sensors, are used as an interface to the physical environment. Other nodes act instead as servers, providing various services to the sensors. In this paper we define an architecture to enable the sensors to efficiently localize the services, and hence the servers. Our is a two-tier server architecture. The first tier is made up of the actual servers. The second tier is formed by nodes that are basically standard nodes (like the sensors). These nodes know the current position of the servers (they are called server locators). Sensors needing service query the server locators to find the corresponding service. The service locator sends a service position to the sensor. Finally, once got ahold of a server location, a sensor uses the service directly. Our server architecture provides load balancing (of queries to the servers) and is tolerant to server faults. Sensor nodes are endowed with...