Pervasive: Efficient Resource-Aware Hybrid Configuration of Distributed Pervasive Applications