Department of Computer Science
COMP212 - 2021 - CA Assignment 2
Communication in Distributed Systems
Assignment Number 2 (of 2)
Assignment Circulated 16th March 2021
Deadline 21st April 2021, 17:00 UK Time (UTC)
Submission Mode Electronic via CANVAS
Learning outcomes assessed (1) An appreciation of the main principles underlying
distributed systems: processes, communication, nam-
ing, synchronisation, consistency, fault tolerance, and
security. (3) Knowledge and understanding of the es-
sential facts, concepts, principles and theories relating
to Computer Science in general, and Distributed Com-
puting in particular. (4) A sound knowledge of the crite-
ria and mechanisms whereby traditional and distributed
systems can be critically evaluated and analysed to de-
termine the extent to which they meet the criteria de-
fined for their current and future development.
Purpose of assessment This assignment assesses the understanding of dis-
tributed communications via Java sockets and Java
Marking criteria Marks for each question are indicated under the corre-
Submission necessary in order No
to satisfy Module requirements?
Late Submission Penalty Standard UoL Policy.
This assignment asks you to extend the leader-election simulator that you have been devel-
oping in Assignment 1 or to develop a new implementation from scratch along the following
lines: Make your simulator available over the network through either Java socket program-
ming or Java RMI.
2 Description of coursework
In Assignment 1 you implemented in Java a simulator of two distributed algorithms for
leader election in a ring network. In this assignment your task is to achieve remote access
to your simulator, by which, one or more clients will be able to request and run experiments
on these algorithms.
So, you are here asked to enrich your simulator with a networking component. In partic-
• Your simulator should be available on a server through the network, for clients to
connect and request “simulation time”.
• Therefore, the core functionality of the simulator may remain the same, the difference
is that now the user can request the simulation from a remote machine that can provide
the main simulation functionality and/or the results of a requested simulation.
To achieve this functionality you are free to use either Java socket programming or Java
RMI. It is not a requirement that many clients can run simulations in parallel, but if you
wish you could try to also achieve this functionality. For this assignment it is sufficient that
at any given time a single client establishes a “connection” to the server and executes its
experiments. Moreover, you are allowed to have both the client and the server running on
the same machine (connection to “localhost”), so that you don’t have to use two distinct
machines communicating over the network in order to test your software. At the assignment’s
entry on CANVAS you can find some very basic example programs that you could use as
a template to get you started. Moreover, you are strongly encouraged to consult Oracle’s
tutorials on Java sockets and Java RMI and especially their “getting started” examples
(Sockets Knock Knock example and RMI compute engine, respectively).
• Achieving the basic network communication (that is, successfully establishing client-
server connections and interchanging information between the two) is worth 30% of
the assignment mark.
• To obtain further 20% a client should be able to trigger the execution of a simulation
of any of the two leader-election algorithms (i.e., LCR or HS).
• Another 20% shall be awarded if the client can also successfully obtain all experimental
data/results of the simulation.
• It is a requirement that you also submit a report describing your developments and
including some testing of your software (see the submission instructions in Section 3).
(30% of mark)
3 Deadline and Submission Instructions
• The deadline for submitting this assignment is Wednesday, 21st April 2021, 17:00
UK time (UTC).
(a) The Java source code for all your programs.
(b) A README file (plain text) describing how to compile/run your code to produce
the various results required by the assignment, and
(c) A concise self-contained report (at most 5 pages including everything) describing
your implementation choices, software-testing, and conclusions in PDF format.
Compress all of the above files into a single ZIP file (the electronic submission system
won’t accept any other file formats) and specify the filename as Surname-Name-
ID.zip. It is extremely important that you include in the archive all the files described
above and not just the source code!
• Submission is via the “Assignments” tab of COMP212-202021 course on CANVAS.
Good luck to all!