Data-driven Adaptation in Microservice-based IoT Architectures