This case study documents the manner by which the design of FADA- a toolkit for teaching and learning of distributed algorithms was designed in accordance with the Observation design pattern
Case Study: FADA (Framework for Animations of Distributed Algorithms)
FADA [1] arose out of need to combat the
inadequacies posed by existing teaching methodologies in capturing the dynamic
and concurrent behaviour of a distributed algorithm. Its initial aim was to
provide a toolkit which instructors could use to not only build and visualise their
own representations of an algorithm’s behaviour, but also, to enable them to
experiment with its state and behaviour in real time. Such a design arose as a
consequence of observing the teaching behaviours of two or more computer
science lecturers and the difficulties they encountered in teaching the
material.
Based on these observations, the initial design was story boarded and
mocked up. This consisted of a framework or library of methods which a user
could quickly customise and invoke to reflect the behaviour of the message
passing distributed algorithm that he was implementing. This was automatically
designed to be outputted as a simulation. However, on presentation to and
experimentation by one of the lecturers observed, the toolkit design was
amended to offset the code dependency in creating the algorithm definition
through the use of a wizard and the provision of a development environment as
typified by modern programming environments. The wizard was designed to provide
a set of menu items that a user could quickly select and customise to create the
messages that a node is to receive, the content of those messages and the type
of variables or state information that a node is to store. The development environment was designed to
include an editor that captures on compilation logical and syntactical errors
in a user’s algorithm definition code.
Figure 1:A graphical depiction of
the manner by which a user deploys the wizard to create a message called
‘Answer’ and to associate with that message a parameter called ‘reply’.
Figure 2: A depiction of the code
automatically generated by the wizard in Figure 1. This code is outputted to
the code frame within FADA.
Figure 3:A graphical depiction of
the manner by which FADA automatically alerts users to syntax errors in their
algorithm implementation code. In the above example, the user has forgotten to
close the statement in line 14 with a semi colon.
As a consequence of its design, FADA
enables users to build dual representations of an algorithm’s behaviour and to
map logical errors in the visualisation of an algorithm’s behaviour to that of
its implementation or vice versa. It also enables learners to create their own
understanding of an algorithm’s behaviour and to experiment with that
understanding in real time, learning as they go, in a process known as
constructionism. Hence, FADA can be attributed to two modes of use. It can be
used by instructors as an interactive presentation tool and it can be used by
learners to enable them to create their own simulations of an algorithm’s
behaviour.
Figure 4: Screenshot of the dual representations of
an algorithm's behaviour afforded by FADA. To the right hand side is
the development environment (Code Frame) where one creates
his own algorithm definition. To the left hand side is the simulation
automatically rendered by FADA of the algorithm definition. This is held inside
what is known as the animation frame.
[1]
Fionnuala O'Donnell, "Simulation Framework for the Teaching and
Learning of Distributed Algorithms", Department of Computer Science,
Trinity College Dublin, PhD, 2006, p.1-260.