DDE602_ Assessment 6 Brief_Report_Module 12 Page 1 of 7 Task Summary In this assignment, you will be implementing a peer-to-peer (P2P) application. The system will have a master and slaves and will be...

1 answer below »
DDE602_ Assessment 6 Brief_Report_Module 12 Page 1 of 7

Task Summary
In this assignment, you will be implementing a peer-to-peer (P2P) application. The system will have a
master and slaves and will be responsible for basic file sharing between peers.
The master in the system will implement a centralised index and be responsible for discovering new
slaves, monitoring them, keeping track of what files they have and finally, redirecting peers to them
to download the file.
ASSESSMENT 6 BRIEF
Subject Code and Title DDE602—Distributed Development
Assessment Implement a Large-Scale Distributed System
Individual/Group Group and Individual
Length Project and Source Code
Learning Outcomes The Subject Learning Outcomes demonstrated by the successful
completion of the task below include:
a) Prioritise and distinguish the core elements of distributed
system technologies and trends in the industry;

b) Work independently with a distributed system–based
problem and demonstrate knowledge of the core concepts
of distributed development;

c) Reflect on research findings and demonstrate ability in
developing large-scale distributed applications.

d) Critically evaluate distributed system development
considering realistic planning.

e) Research and analyse various types of distributed system
development projects considering scalability and fault
tolerance.

f) Create and analyse a design strategy informing the
development of distributed applications.
Submission Due by 11.55 pm AEST on the Sunday at the end of Module 12.
Weighting 30%
Total Marks 100 marks


DDE602_ Assessment 6 Brief_Report_Module 12 Page 2 of 7

In summary, you will
• Demonstrate an understanding of P2P computing concepts;
• Apply P2P concepts in code; and
• Produce scalable, fault tolerant and robust systems.
Context
Master
The master will listen on a well-known port for slaves to join the network. A slave will connect to the
master when it wishes to advertise files available for download. The master will make note of that
slave and periodically test its responsiveness. In the event that the slave cannot be reached, the
master will remove the slave from its memory and no longer advertise it or its services to other peers.
Once joined, a slave will advertise to the master what files it has available for download. In this
network, the names of the objects are mutually exclusive; that is, no other slave can advertise the
same file name.
Slaves
In this network, slaves can either advertise files that can be downloaded by peers or they can search
and download a specified file from a peer once it has been discovered by the master.
When a slave wishes to advertise files available for download, it contacts the master and advertises
the file is available for download. Similarly, a slave may revoke a file being downloaded at any time.
When this occurs, the master updates its central index of what is available on what peer.
When a slave wishes to download a file, it contacts the master and performs a search. If the file is
found in the centralised index, the master returns the address of the slave and the requesting slave
attempts to download the object from its peer.
Architecture and Behaviour
As the developer of this system you have complete design authority over how it will be implemented.
In developing the system, you should take reasonable steps to ensure its robustness and best
performance.
Task Instructions
To complete this assignment, follow these steps:
Step 1: Implement a P2P environment with one master instance and multiple slave instances, all
listening to different ports. This can be implemented in a single computer or over multiple
computers. Then, write programs for all the instances to connect with each other using
necessary protocols.


DDE602_ Assessment 6 Brief_Report_Module 12 Page 3 of 7

Step 2: Implement your P2P system, such that if the master fails, peers can continue to discover and
download files from one another.
Step 3: Implement the following:
o A protocol is implemented in the master to accept registrations from peers.
o The master implements an algorithm to monitor peers and manage the registrations
of failures to connect to peers.
o The master is able to accept registrations of a file from peers and enforce mutual
exclusion constraints.
o Peers implement a protocol to register availability and the files to the master.
o Slaves implement threads to act as both peers and slaves as outlined above. Both
peers and slaves have the ability to identify and download objects using sockets.
o The master and slaves should be able to do all of the above in a scalable fashion with
a growing number of activities between them.
Step 4: You can use the programming language of your choice. However, Python is recommended
for this type of project. The code must be well formatted and conform to Python naming
conventions. You also need to provide sufficient comments in the code.
Referencing
It is essential that you use appropriate APA style for citing and referencing research. You can access
more information on referencing here http://library.laureate.net.au/research_skills/referencing
Submission Instructions
Submit this task via the Assessment link in the main navigation menu in DDE602—Distributed
Development. The Learning Facilitator will provide feedback via the Grade Centre in the LMS portal.
Feedback can be viewed in My Grades.
Submission items for academic integrity purposes – please include the following items with your
assessment submission to authenticate your work:
• A copy of the source code that you have written – this can be submitted as a .txt file or a
.pdf.
• A 2-minute recording of your screen and your voice explaining how you have created the
source code. Use a screen recording tool (there are a number of tools which are free to use
and download) and submit the file of this recording with the assessment.
You may also wish to refer to the Academic Integrity Code Handbook located in the Assessment 6
section of this subject for further guidelines on understanding academic integrity for programming.
http://library.laureate.net.au/research_skills/referencing


DDE602_ Assessment 6 Brief_Report_Module 12 Page 4 of 7

Academic Integrity Declaration
I declare that except where I have referenced, the work I am submitting for this assessment task is
my own work. I have read and am aware of Torrens University Australia Academic Integrity Policy
and Procedure viewable online at http://www.torrens.edu.au/policies-and-forms
I am aware that I need to keep a copy of all submitted material and their drafts, and I will do so
accordingly.
http://www.torrens.edu.au/policies-and-forms


DDE602_ Assessment 6 Brief_Project_Module XXXXXXXXXXPage 5 of 7

Assessment Rubric
Assessment
Attributes
Fail
(Yet to achieve
minimum standard)
0–49%
Pass
(Functional)
50–64%
Credit
(Proficient)
65–74%
Distinction
(Advanced)
75–84%
High Distinction
(Exceptional)
85–100%
A protocol is
implemented in the
master to accept
registrations from peers

Percentage for this
criterion = 15%


Demonstrates a partially
developed understanding
of sockets programming,
client-server architectures
and P2P protocols.

Demonstrates a functional
knowledge of sockets
programming, client-server
architectures and P2P
protocols.


Demonstrates proficient
knowledge of sockets
programming, client-server
architectures and P2P
protocols.

Demonstrates advanced
knowledge of sockets
programming, client-server
architectures and P2P
protocols.


Demonstrates exceptional
knowledge of sockets
programming, client-server
architectures and P2P
protocols.


The master implements
an algorithm to monitor
peers and manage
registrations of failures
to connect to peers

Percentage for this
criterion = 20%


Demonstrates a partially
developed understanding
of monitoring protocols,
client/server
programming and its
implementation.

Demonstrates a functional
knowledge of monitoring
protocols, client/server
programming and its
implementation.

Demonstrates proficient
knowledge of monitoring
protocols, client/server
programming and its
implementation.

Demonstrates advanced
knowledge of monitoring
protocols, client/server
programming and its
implementation.

Demonstrates exceptional
knowledge of monitoring
protocols, client/server
programming and its
implementation.
The master is able to
accept registrations of
files from peers and
enforce mutual
exclusion constraints

Percentage for this
criterion = 15%


Demonstrates a partially
developed understanding
of client-server
communication protocols
and the integration of
constraints evidenced
through implementation.

Demonstrates a functional
knowledge of client-server
communication protocols and
the integration of constraints
evidenced through
implementation

Demonstrates proficient
knowledge of client-server
communication protocols
and the integration of
constraints evidenced
through implementation

Demonstrates advanced
knowledge of client-server
communication protocols
and the integration of
constraints evidenced
through implementation


Demonstrates exceptional
knowledge of client-server
communication protocols
and the integration of
constraints evidenced
through implementation


DDE602_ Assessment 6 Brief_Project_Module XXXXXXXXXXPage 6 of 7

Assessment
Attributes
Fail
(Yet to achieve
minimum standard)
0–49%
Pass
(Functional)
50–64%
Credit
(Proficient)
65–74%
Distinction
(Advanced)
75–84%
High Distinction
(Exceptional)
85–100%
Peers implement a
protocol to register
availability and the files
to the master

Percentage for this
criterion = 20%


Demonstrates a partially
developed information
exchange capability
between peers and
master.

Demonstrates a functional
information exchange
capability between peers and
master.


Demonstrates a proficient
information exchange
capability between peers
and master.

Demonstrates an advanced
information exchange
capability between peers
and master.

Demonstrates an
exceptional information
exchange capability
between peers and master.
Both client and slave
have the ability to
identify and download
objects using sockets

Percentage for this
criterion = 20%

Demonstrates a partially
developed understanding
of P2P protocols,
threading and sockets
through implementation
for identifying and
downloading objects.
Demonstrates functional
knowledge of P2P protocols,
threading and sockets
through implementation for
identifying and downloading
objects.
Demonstrates proficient
knowledge of P2P
protocols, threading and
sockets through
implementation for
identifying and
downloading objects.
Demonstrates advanced
knowledge of P2P
protocols, threading and
sockets through
implementation for
identifying and
downloading objects.
Demonstrates exceptional
knowledge of P2P
protocols, threading and
sockets through
implementation for
identifying and
downloading objects.
The program
implements the election
and distribution of data
effectively in the event
that the master is
terminated. Peers
continue to operate as
normal

Percentage for this
criterion = 10%

Demonstrates a partially
developed understanding
of fault tolerance and its
implementation.
Demonstrates functional
knowledge of fault tolerance
and its implementation.
Demonstrates proficient
knowledge of fault
tolerance and its
implementation.
Demonstrates advanced
knowledge of fault
tolerance and its
implementation.
Demonstrates exceptional
knowledge of fault
tolerance and its
implementation.


DDE602_ Assessment 6 Brief_Project_Module XXXXXXXXXXPage 7 of 7

The following Subject Learning Outcomes are addressed in this assessment
SLO a) Prioritise and distinguish the core elements of distributed system technologies and trends in the industry.
SLO b) Work independently with a distributed system–based problem and demonstrate knowledge of the core concepts of distributed development.
SLO c) Reflect on research findings and demonstrate ability in developing large-scale distributed applications.
SLO d) Critically evaluate distributed system development considering realistic planning.
SLO e) Research and analyse various types of distributed system development projects considering scalability and fault tolerance.
SLO f) Analyse a problem and create a design strategy informing the development of distributed applications.
Answered 2 days AfterMay 04, 2021DDE602Torrens University Australia

Solution

Sandeep Kumar Patra answered on May 06 2021
30 Votes

peer.py
##The master is able to accept registrations of a file from peers and enforce mutual exclusion constraints
import os
import socket
import unittest
from threading import...

Submit New Assignment

Copy and Paste Your Assignment Here