- Book Title: Programming the Internet of Things. An Introduction to Building Integrated, Device-to-Cloud IoT Solutions
- Author: Andy King
- URL: Programming the Internet of Things
- Formats: Paperback, Kindle, eBook
- ISBN: 978-1492081418
- Publisher: O’Reilly Media, Inc.
- Release Date: June 2021
- Pages: ~417
- Topics: Programming, Internet of Things, Java, Python, Design, Protocols
Structure of Connected Devices (Author’s Course)
Programming the Internet of Things was written primarily to support the course I teach at Northeastern University called ‘Connected Devices’. It essentially represents the lab-portion of the course, and focuses on the design and implementation (in Java and Python) of a basic IoT ecosystem – from the edge (where devices collect data and trigger actions) to the cloud (where historical data is stored and more complex decisions can be made).
Each chapter’s exercises build upon those implemented in previous chapters, so it’s important for students to go step-by-step, chapter-by-chapter, to develop their system.
Please NOTE: While I hope the content is useful, please see the documentation and source code usage licenses on GitHub, as well as the Disclaimer for this site.
Programming the Internet of Things and my associated course ‘Connected Devices’ does not require hardware for completion of the required exercises. The edge tier applications – the Constrained Device App (CDA) and Gateway Device App (GDA) – can be developed and executed on a modern computer running Ubuntu or Raspbian.
Although not required or covered in the book / online content, you can incorporate hardware devices as the host systems for the CDA and / or the GDA. In fact, I’ve deployed my own CDA and GDA solutions on a variety of Raspberry Pi SBC’s running the Raspbian OS. You can also make use of the additional exercises introduced in Part II of the GitHub Kanban Board that require hardware for implementation and testing.
- Part I (Chapters 1 – 2) focuses on development environment setup and the initial edge tier applications (Constrained Device App and Gateway Device App).
- Part II (Chapters 3 – 5) deals with data management and interoperability.
- Part III (Chapters 6 – 10) addresses device-to-device communications using MQTT and CoAP.
- Part IV (Chapters 11 – 12) introduces cloud integration and discuss some notional use cases, enabling your students to use their IoT environment to process edge-to-cloud telemetry while incorporating simple decision making characteristics into their system.
By the end of the course, students can use what they’ve learned as the basis to build out more advanced solutions as extensions to their applications and cloud service functionality. All exercises are technically tracked as ‘issues’ within their own repository.
- Read more about the book’s exercise task repository, the tagging approach used, usage license, etc. by clicking this link.
What Students Will Learn
In addition to learning HOW to build a basic, end-to-end IoT solution from device to cloud, students will also learn about:
- IoT Value Proposition: Learn about why outcomes matter within an IoT ecosystem.
- IoT System Design: Learn about the key components of an IoT ecosystem and what they do.
- Measure, Model and Manage: Learn about the core features of an IoT ecosystem and how they map.
- IoT-specific DevOps: Learn about dev env setup, source code management, and Git-based branching.
- Unit and Integration Testing: Learn some basic about testing approaches – unit and integration.
- Data Management: Learn why data-centric thinking is important, and how to create interoperable data.
- Communications: Learn about the MQTT and CoAP protocols – how they work, are used, and why.
- Cloud Integration: Learn about various IoT-enabled cloud service provider integration approaches.
- IoT Use Cases: Learn how to apply systems-thinking to building different IoT ecosystems.
- IoT Agile Governance: Learn about managing complexity and how to provide guidance for IoT projects.
Class Structure Considerations
Programming the Internet of Things is segmented into four parts and twelve chapters. It’s designed such that each chapter from the book can be used as the basis to teach a single class. For semesters that run longer than 12 weeks (e.g., more than 12 classes total), let’s consider an example with 15 teaching weeks:
- Classes 1 – 12: Each week follows each chapter in the book (e.g., Class No. 1 = Chapter 1, etc.). Class 12 is typically managed as a deep dive into the Semester Project’s requirements, along with some design / implementation ideas for students to consider.
- Class 13: This class can be a deep(er) dive into one of the major Cloud Service Provider’s (CSP’s) IoT stack and include some additional edge integration design / implementation ideas for students to consider.
- Class 14: The penultimate class can either extend Week 13 with additional CSP discussions, advanced IoT use case explorations, or guest lectures / discussions (which is my personal favorite).
- Class 15: The final class of the semester can be reserved for end of semester project presentations (which is what I do), a final exam, a round table discussion, etc.
To get the most out of this content, it’s suggested that students, TA’s and instructors have a basic foundation in the following:
- Programming in Java and Python
- Object-Oriented Design
- Familiarity with Cloud Computing
- Linux-based Shell Scripting
- Source Code Management (using Git)
For advanced students, the basic requirements for the Semester Project (described in Lab Module 12) may be supplemented with any additional requirements necessary to implement one of the three use cases described in Chapter 12 of Programming the Internet of Things. Note that specific requirements to implement each use case described are out of scope for the Kanban board and book and will require student and instructor to agree upon the requisite assessment metrics.
Sample Syllabus (Overview)
The following represents a simplified sample syllabus for the Connected Devices course and follows the exercises discussed in Programming the Internet of Things using the associated GitHub Kanban Board:
- Part I – Getting Started (Creating your Dev Environment) [Kanban board exercises]
- Class No. 1 (Chapter 1): Getting Started [Kanban board exercises]
- Class No. 2 (Chapter 2): Initial Edge Tier Applications [Kanban board exercises]
- Part II – Connecting to the Physical World (Data Generation and Management) [Kanban board exercises]
- Class No. 3 (Chapter 3): Data Simulation [Kanban board exercises]
- Class No. 4 (Chapter 4): Data Emulation [Kanban board exercises]
- Class No. 5 (Chapter 5): Data Management [Kanban board exercises]
- Part III – Connecting to Other Things (Protocols and Connectivity) [Kanban board exercises]
- Class No. 6 (Chapter 6): MQTT Integration – Overview and Python Client [Kanban board exercises]
- Class No. 7 (Chapter 7): MQTT Integration – Java Client [Kanban board exercises]
- Class No. 8 (Chapter 8): CoAP Server Implementation [Kanban board exercises]
- Class No. 9 (Chapter 9): CoAP Client Integration [Kanban board exercises]
- Class No. 10 (Chapter 10): Edge Integration [Kanban board exercises]
- Part IV – Connecting to the Cloud (Design and Use Cases) [Kanban board exercises]
- Class No. 11 (Chapter 11): Integrating with Various Cloud Services [Kanban board exercises]
- Class No. 12 (Chapter 12): Taming the IoT [Kanban board exercises]
- Part V – Class suggestions only (not currently part of book content)
- Class No. 13: CSP IoT stack deep dive, more IoT use cases, Semester Project working session
- Class No. 14: Guest lectures and / or round-table discussion
- Class No. 15: Semester Project presentations or Final Exam
NOTE: The solutions for each exercise are largely covered within the book and maintained within the Kanban board as embedded code snippets. The intent is for students to work through the exercises step-by-step: following the instructions listed within each card, reading through the explanations within the book, and implementing their own solution by considering the notional examples provided within each. The example snippets are taken from my own private solution repository, which follows the recommended branching strategy and have been tested within my own development environment. These should be considered notional only of course.
Grading Considerations (Example)
Evaluation methods and specific criteria will vary depending on your learning objectives for the course. For weighting, one approach I’ve found helpful is to split the overall grade into two parts: 50% for lab module and project work, and 50% for quizzes, with the following in mind:
- 25%: Lab Module Assignments
- 20%: Semester Project
- 5%: Semester Project Presentation
- 50%: Quizzes (one per Part with 4 total)
The rubrics I created for my own course to evaluate lab and project work are comprised of various criteria that consider design, code documentation and formatting, functionality and accuracy, and of course testing. Quiz questions are drawn from a larger question bank mapped to each Part and include many that are associated with the additional lecture content I deliver during each class.
As time permits, I’m hoping to create additional teaching content (mostly videos). If you’re interested in learning more, feel free to fill out the information request form at the bottom of this page.
Course Content and Links
- Book errata and clarifications
- Course and book exercises (GitHub Kanban Board)
- GitHub Kanban Board (see LICENSE and REFERENCES for usage details)
- Source code and document repositories (GitHub)
- GDA code templates (java-components) (see LICENSE and REFERENCES for usage details)
- CDA code templates (python-components) (see LICENSE and REFERENCES for usage details)
- Exercise doc templates (book-exercise-docs) (see LICENSE for usage details)
- Additional content (videos, etc.)
- Links: Stay tuned for more content!
Where to Buy the Book
Subscriber Only Content – for Instructors
How to Get in Touch
If you’re interested in additional course content or would like to discuss potential commercial usage for some of the referenced or additional content, please click ‘Yes’ in the appropriate fields below.