Complex Queries in DHT-based Peer-to-Peer Networks