COMP3310/6331 – Tute/Lab #8
Outline of Tute/Lab:
1. Not sure if everything got covered by all groups last week, so a bit of repeat capacity.
2. Note:
a. The third assignment has been posted to wattle, due Friday 5 June, with a focus on analysing MQTT performance.
b. The Mid-Semester exam has been marked and released. Now is a good time to review it, with the answersheet posted to wattle.
3. Getting into IoT with MQTT:
Following up on last week, you should get familiar with the MQTT tools and the messages. Check the Tute 7 notes for a bit more background. In particular the following tools are useful to check that things are working as you expect, when comparing to your code:
• MQTTSpy: https://www.eclipse.org/paho/components/mqtt-spy/ though a few people have noted issues getting it to run with various Java versions installed.
• MQTT Explorer: A perhaps more modern and more reliable client at http://mqtt-explorer.com/ that has had some positive feedback.
• mosquitto_pub, mosquitto_sub: command line clients that are really useful for general analysis, except that they don’t handle large volumes of messages as well as a GUI can. https://mosquitto.org/download/
Make sure you can do all the exercises listed in Tute 7, if you haven’t already.
That includes
• publishing and especially subscribing to topics, o atdifferentQoSlevels,
• reviewing the $SYS topic hierarchy for interesting data,
• doing some wireshark analysis of messages going back forth. Wireshark understands MQTT
packets so makes it fairly clear what is happening.
With the launch of the assignment 3 broker on the same comp3310.ddns.net server, you can now use that to test your clients and see what that broker offers. The fast publisher won’t launch for a few days, there’ll be an announcement on wattle when it does.
Recall that MQTT has a mix of security options. On the assignment server there are two features enabled. First, the ClientID must be 3310-yourUniD and secondly, there is a simple shared username/password combination of students/33106331. The ClientID avoids client collisions overwriting each other (it doesn’t use IP addresses to identify subscribers, as they can change all the time), and should be used on the public and assignment servers. When a ClientID is not specified your tool of choice will generate one automatically – not always what you want. The username is only needed on the assignment server. You’ll need to configure the GUI tools with both the ClientID and the ‘security’ information (username/password), while the mosquitto_* command line tools have arguments for all three fields.
1
Questions from lectures
1. On congestion, where does that actually happen on a network path?
o Intherouterbuffers,whentoomuchtrafficcomesinforaparticularoutbound connection/path.
2. What’s the difference between ‘throughput’ and ‘goodput’?
o Throughputisthebasicallythevolumeofdatathatgetsthrough,regardlessofwhat they carry. Goodput is the volume of new data that gets through, i.e. what your application actually experiences as the ‘effective transmission rate’
3. Why do we get a collapse in goodput as we approach congestion?
o Wespendwaymoretimeonretransmissionandrequestsforthem,andlessonnew traffic.
4. Why does TCP traffic (often) have a sawtooth pattern?
o It’sgentlyprobingthenetwork,tryingtorampupwithoutcausingcongestion–until it does and rapidly backs off.
5. How can we detect congestion? (3 ways, at least)
o Packetlossincreasing,Packetdelaysincreasing,andECNifyou’relucky.
6. How does Selective Acknowledgement (SACK) greatly help TCP performance?
o Makesitmuchclearertothesenderwhathasbeenactuallyreceived,evenifitisnot quite in the correct order yet. Allows the sender to work out which gaps to fill, rather than backing right up to the single Sequence number pointer.
7. What’s the difference between ‘fairness’ and ‘efficiency’ in networking terms?
o Fairnessiswhatacollectionofapplicationsperceive,aretheygettingthroughat some rate, or is one or more being ‘starved’ of network access. Efficiency is what you see across the width of a network, are you maximising the performance of as many applications as possible.
8. TCP has (at least) 3 types of “windows” for managing the transmission of segments (over packets). Explain their key roles: SendWindow, ReceiveWindow, and CongestionWindow
o SendWindowisaboutkeepingthenetworkefficientlyfull.
o ReceiveWindowisaboutbalancingtheperformanceofthesenderwiththereceiver o CongestionWindowmeasuresthe(nearlyinstantaneous)capacityofthenetwork
path between the sender and the receiver, to ensure fairness across flows.
2