A model-based approach for data processing in IoT environments