Wireless Sensor Networks is a new technology with many promising applications, such as military surveillance, infrastructure protection, scientific exploration and smart environments. To date, researchers in this area have accumulated a large portfolio of components, effectively addressing a wide range of individual research problems. However, because of the limited understanding on how to integrate the components effectively, researchers are facing urgent and challenging questions on how to build efficient sensor network systems and how to create reusable sensor network architecture for widespread use. In this project, these challenges are addressed by (i) creating an architecture structure for sensor networks based on two design principles which are novel with respect to their application to sensor networks: asymmetric function placement and reflective composition, (ii) developing various new component solutions based on these two design principles, and extracting reusable design patterns from them, and (iii) designing and implementing a reference implementation, called Essentia, to investigate how these design principles can be applied over a wide range of sensor network functions and applications. The major impacts of this work are establishing the key design principles for the next generation of sensor network architecture and creating such reference architecture. The success of this work will effectively organize the large set of individual network components, into highly extensible and reusable systems, consequently reducing the design, development and maintenance cost for building useful sensor systems.