Programming the Internet of Things: Part IV, Chapter 11, Figure 11-5.

Programming the Internet of Things: 1st Edition – For Instructors

Book Details

  • 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

About Connected Devices

So, what’s a Connected Device?

Think of it as a computing module that can interact with other computing modules via a wired or wireless network. An IoT device is a Connected Device that provides an interface between the physical world and virtual world and can interact with other IoT devices via the Internet – in both cases either directly or indirectly through another device.

Some IoT devices serve purely as gateways (or bridges) that connect different networks. Others collect data from, and send signals to, attached physical transducers (e.g., sensors and actuators). Connected devices are key components of an Internet of Things ecosystem, enabling information and instructions to pass between the physical and virtual worlds.

In my University graduate course, called Connected Devices, students will learn how to build a software test bed that represents a simple end-to-end IoT ecosystem. Through the in-class discussions and Lab Module exercises, students will develop a deeper understanding of IoT technologies, their application, and the potential value they can provide.

Programming the Internet of Things was written primarily to support Connected Devices. The book 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 01 (Chapters 1 – 2) focuses on development environment setup and the initial edge tier applications (Constrained Device App and Gateway Device App).
  • Part 02 (Chapters 3 – 5) deals with data management and interoperability.
  • Part 03 (Chapters 6 – 10) addresses device-to-device communications using MQTT and CoAP.
  • Part 04 (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.

What Students Will Learn

In addition to learning HOW to build a basic, end-to-end IoT ecosystem test bed, from device to cloud, students will also learn about:

  • IoT System Design: Learn how to define an IoT Reference Architecture and understand the key components of an IoT ecosystem and how they work together.
  • IoT-specific DevOps: Learn about development environment setup related to building IoT solutions, including source code management and branching using Git.
  • Unit and Integration Testing: Learn some basics about testing approaches, using unit-level granularity (method / function testing) and system integration testing techniques.
  • Data Management: Learn why data-centric thinking is important, and how to create interoperable data representations that can be used across different platforms.
  • Communications: Learn about the MQTT and CoAP protocols – what they are, how they work, and how you can use them in your IoT ecosystem test bed.
  • Cloud Integration: Learn about some IoT-enabled cloud service providers and integration approaches that you can use to move your data to and from the cloud.
  • IoT Use Cases: Learn how to apply systems-thinking to design and build IoT ecosystem test beds that can be helpful in supporting various IoT use cases.
  • IoT Agile Governance: Learn about managing complexity in an IoT ecosystem, and how to apply core IoT solution pillars to better support IoT ecosystem solutioning.

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.

Teaching Considerations

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:

WEEKPARTTOPICTYPE
101Foundational Concepts and DevOps: IoT Systems ConceptsLecture/Lab
2IoT Architectures and Edge Computing BasicsLecture/Lab
3Quiz No. 1 (Part 01)Lecture/Quiz
402Data Simulation and
Data Emulation
Lecture/Lab
5Data Management and IntegrationLecture/Lab
6Quiz No. 2 (Part 02)Lecture/Quiz
703MQTT Client – Part 01 of 02Lecture/Lab
8MQTT Client – Part 02 of 02Lecture/Lab
9CoAP ServerLecture/Lab
10CoAP ClientLecture/Lab
11Edge IntegrationLecture/Lab
12Quiz No. 3 (Part 03)Lecture/Quiz
1304Cloud IntegrationLecture/Lab
14Quiz No. 4 (Part 04)Lecture/Quiz
15Final Project Completion and PresentationProject Presentations

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:

  1. 25%: Lab Module Assignments
  2. 20%: Semester Project
  3. 5%: Semester Project Presentation
  4. 50%: Quizzes (one per Part with 4 total)

The grading / evaluation rubrics I created for my class are comprised of various criteria that consider design, code documentation and formatting, functionality and accuracy, and of course testing. Each of the four quizzes draws questions from part-specific question banks that are aligned to my book, the lab module exercises, and in-class discussions.

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.

  1. Book errata and clarifications
  2. Course and book exercises (GitHub Kanban Board)
  3. Source code and document repositories (GitHub)
  4. Additional content (videos, etc.)
    • Links: Stay tuned for more content!

Where to Buy the Book


Subscriber Only Content – for Instructors

Stay tuned…


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.

Go back

Your message has been sent

Warning
Warning
Warning
Warning
Warning
Warning
Warning.