Engineering Resilient Collaborative Edge-Enabled IoT