TTT: Architecting Scalable Software Platforms for IoT Applications