Fundamentals of IoT Architecture and Design