Uniformly Programmable, Distributed, Reliable, Event-based Systems for Multi-Tier IoT Deployments