A resilient Internet of Things architecture for smart cities