This is a talk about using MQTT not in IoT, but in a traditional web application.
There are many web sites for an indidivual to learn Python and other
software technologies, but the Forest Wiki is the only free tool for
teaching Python and Web Development in the browser. Teaching
requires an understanding of the student teacher relationship. The
teacher can supervise the student's work and decide when to publish
the solutions, or can even enforce a deadline. The teacher can
supervise the classes' progress, and decide when to move onto the next
assignment.
Teaching in the browser eliminates the need to install software on
every student's computer. This is particularly helpful when teaching
Python. It allows the teacher to monitor the student's work in real
time, even when they are in different rooms, buildings, or countries.
And it reducess social inequality, all that students need is a
browser, it could even be on an older computer or a tablet.
Teaching online is much harder than teaching in person. Even with Zoom
much of the necessary feedback is lost. Often students switch off
their cameras. Online, they are slower to switch on their microphones
and respond. In person I had a sense of when to move onto the next
assignment. It was easy to see how people reacted to my suggestion of
moving onto the next assignment. All of that is lost online.
MQTT provides a gorgeous solution to this problem. MQTT is a pub/sub message server where the informatoin is organized as a tree of topics. Publishers post to a node on the tree, and subscribers subscribe to messages on parts of the tree. MQTT supports retained messages where the last posting on a topic is cached on the server. MQTT supports security on messages. MQTT supports a last will and testament, where clients who disconnect from the server, can have their last retined message deleted.
In this application, two seconds after a student stops typing, their code is published to the server, where it is stored as a retained message, and published to the teacher. When the teacher logs in, all of the retained code is downloaded, and displayed. As students complete assignments, save them and move to the page for the next ssignment, the logged in teacher is notified.
The teacher sees a single page with all of the logged in students listed. He can see which
assignment they are working on. He can hover over a student, and see
the current version of their code. He is notified when they complete
an assignment, save the page, and open the next assignment page. And
even if the teacher closes their browser, when they open it again, the
current state of the class is downloaded automatically using retained messages.
With MQTT it is easy for the teacher to monitor the student's work.
In the past, without MQTT, I could only check the student's work after
it was submitted it, or I had to ask them to save it. With MQTT, I can keep a
particularly close eye on those students who I know are weaker.
It is not just about monitoring specific students. With MQTT is is easy for the teacher to monitor the entire class's progress. He can see who is working on the last assignment, and who
has moved onto the next assignment. He can figure out the right time
for the class to move onto the next assignment.