The lack of standardization and the continuous inflow of novel sensor network technologies have made their deployment the main factor of manpower consumption, considerably complicate the interconnection of heterogeneous sensor networks, and make portable application development a challenging and time-consuming task. To address these problems we propose our Global Sensor Networks middleware which supports the rapid and simple deployment of a wide range of sensor network technologies, facilitates the flexible integration and discovery of sensor networks and sensor data, enables fast deployment and addition of new platforms, provides distributed querying, filtering, and combination of sensor data, and supports the dynamic adaption of the system configuration during operation. GSN offers virtual sensors as a simple and powerful abstraction which enables the user to declaratively specify XML-based deployment descriptors in combination with the possibility to integrate sensor network data through plain SQL queries over local and remote sensor data sources. The paper describes GSN's conceptual model and system architecture, and demonstrates the efficiency of the implementation through experiments with typical high-load application profiles. The GSN implementation is available from http://globalsn.sourceforge.net/.