Interactive Classroom Technical Guide

Overview

Interactive Classroom is based on WebRTC technology and implements a RTC peer 2 peer connection between the teacher and each student

This is a simple star topology with the teacher device in the centre.

There is no direct connection between students.

 

Protocols

WebRTC (Standard Mode)

WebRTC by default uses UDP.

This will usually work seamlessly when both the teacher and the students are on the same local network sector.

Depending on your setup, you may experience issues where teachers and students connect using different vLANs or WiFi access points.

Firewall Blocking Interactive Classroom

Some school firewalls will automatically block peer to peer type applications by blocking UDP protocol broadcasts, or have a NAT setup that prevents communications being forwarded between peers.

To eliminate these issues, you will need to white-list our TURN (Traversal Using Relay NAT) server - turn.studyladder.com.au, and open port 3478 for this server.

Our TURN server uses TCP or UDP depending on which is available to both peers on the data channel. A separate data channel is opened for each student, so they can be in different network sectors, or even external to the school.

TCP transport requests are sent via port 443 and UDP transport requests are sent via port 3478. In most cases, just white-listing the turn server should be sufficient as your firewall should already be allowing port 443 for white-listed servers. Opening port 3478 just gives an additional communications option to the peers using a negotiated UDP connection.

This will generate some additional network trafic, but not as much as HTML mode. It also does not suffer from the same lag issues as HTML mode.

 

HTTPS (HTML Mode)

This mode uses https requests to the StudyLadder server to access a message queue for the running Interactive Classroom.

It has the advantage of being able to traverse most firewalls, NATs etc as it uses normal xhr requests to communicate with our website, just like any other page. If a user can access the StudyLadder website from their device, then they can use HTML mode for Interactive Classroom connections.

The main disadvantage of HTML mode is that it relies on polling the server to check for new messages. Polling takes place every 4 to 6 seconds (randomly) for the students and the teacher. This means that in some circumstances, a message could be delayed up to 10 seconds while at other times it may be almost instant.

Uploading of information to the message queue is immediate, so responses to activities / games will be processed in the order they were sent. It may just take longer to be reflected in the teacher's browser.

All instant activities, assessments and games will work the same, you will just experience some degree of lag in the process.

Remote control will not work in HTML mode.

 

Fail-over

The teacher's browser is able to detect when a WebRTC connection attempt for a student permanently fails. At this point, the system will offer to the teacher to switch to HTML mode.

This will internally reset all students and re-start the session in HTML mode.

Any students already connected will need to re-connect (they will receive a message that the teacher has closed the classroom).

 

Troubleshooting no connection

Standard mode is the prefered connection option as it is much faster, generates less traffic and has more features.

Try these steps one at a time - if a step fails or is not possible (physically or due to security policiy), try the next step.

  1. Have students and teacher use the same network sector (vLAN) and / or WiFi access point if possible.
  2. Allow UDP protocol internally between network sectors.
  3. Whitelist our TURN server - turn.studyladder.com.au - and allow traffic on port 3478 to this server. (Just white-listing the server is sufficient to allow TCP connections as it listens on port 443 for TCP. Port 3478 just adds another option for opening a negotiated UDP connection.)
  4. Use HTML mode :(