COMP2017 9017 -无代写-Assignment 2
时间:2025-05-08
COMP2017 9017 Assignment 2
Due: 23:59 20 May 2025
This assignment is worth 10% of your final assessment
This assessment is CONFIDENTIAL. © University of Sydney
Contents
1 Assignment 2 - [ZOIT Docs] - 10% 3
2 Introduction 5
3 Task 5
4 Set-up 6
5 Structure 8
6 Client-Server Synchronisation 10
7 Functionality 10
7.1 Part 1: Single Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7.1.1 Ordered List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
7.2 Part 2: Multiple Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.3 COMP9017 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.4 Rejections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8 Tear Down 17
9 Marking 17
9.1 Markdown Unit Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
9.2 Staff Client-Server Interoperability Tests . . . . . . . . . . . . . . . . . . . . . 18
10 Short Answer Questions 18
1
COMP2017 9017
11 Restrictions 18
Systems Programming Page 2 of 19
COMP2017 9017
1 Assignment 2 - [ZOIT Docs] - 10%
We strongly recommend reading this entire document at least twice. You are encouraged
to ask questions on Ed after you have first searched, and checked for updates of this document.
If the question has not been asked before, make sure your question post is of type "Question"
and is under "Assignment" category→ "P2" . Please follow the staff directions for using the
question template.
Note, your Git commit messages matter. Make sure you enter informative information into
your commit messages as per the accompanying Edstem slide. Also, use .gitignore to
avoid committing garbage files. There is a guide to both on the accompanying Ed slide titled
Git Usage Guideline, with a required formatting guide you must follow.
It is important that you continually back up your assignment files onto your own machine, flash
drives, external hard drives and cloud storage providers (as private). You are encouraged to
submit your assignment regularly while you are in the process of completing it.
Full reproduction steps (seed, description of what you tried) MUST be given if you are enquir-
ing about a test failure or if you believe there is a bug in the marking script.
Academic Integrity and Compliance Statement
This assignment will be submitted in Ed Lessons, under Assignments - P2.
In addition to the Academic Integrity and Compliance statements below, an Academic Decla-
ration appears in your assignment in Ed. All statements apply.
Academic Integrity
While the University is aware that the vast majority of students and staff act ethically and
honestly, it is opposed to and will not tolerate academic integrity breaches and will treat all
allegations seriously.
Further information on academic integrity, and the resources available to all students can be
found on the academic integrity pages on the current students website:
https://sydney.edu.au/students/academic-integrity.html
You may only use generative artificial intelligence (AI) and automated writing tools in assess-
ment tasks if you are permitted to by your unit coordinator. If you do use these tools, you
must acknowledge this in your work, either in a footnote or an acknowledgement section. For
information on acknowledging AI please refer to the guidance in the AI in Education Canvas
site.
We use Turnitin, which includes AI detection, to detect potential instances of plagiarism or
other forms of academic integrity breach. If such matches indicate evidence of plagiarism or
other forms of academic integrity breaches, your teacher is required to report your work for
further investigation.
Further information on research integrity and ethics for postgraduate research students and stu-
Systems Programming Page 3 of 19
COMP2017 9017
dents undertaking research-focused coursework such as Honours and capstone research projects
can also be found on the current students website:
https://sydney.edu.au/students/research-integrity-ethics.html
Compliance Statement
In submitting this work, I acknowledge I have understood the following:
1. I have read and understood the University of Sydney’s Academic Integrity Policy.
2. The work is substantially my own and, where any parts of this work are not my own, I
have indicated this by acknowledging the source of those parts of the work and clearly
indicated any quoted text by quotation marks or indentation according to accepted style
standards.
3. I have acknowledged any assistance provided in preparing the work including the use of
copy-editing, proof-reading, and automated writing and drawing tools (including artifi-
cial intelligence (AI), reference generators, translation software, grammar checkers, but
not spell checkers).
4. The work has not previously been submitted in part or in full for assessment in another
unit unless I have been given permission by my unit of study coordinator to do so.
5. The work will be submitted to similarity detection software (Turnitin) and a copy of the
work will be retained in Turnitin’s paper repository for future similarity checking.
6. Engaging in plagiarism or academic dishonesty in coursework will, if detected, lead to
the University commencing proceedings under the Academic Integrity Policy and the
Academic Integrity Procedures.
7. Engaging in plagiarism or academic dishonesty in research-focused work will lead to
the University commencing proceedings under the Research Code of Conduct and the
Academic Integrity Procedures.
8. Engaging another person to complete part or all of the submitted work will, if detected,
lead to the University commencing proceedings against me for potential student miscon-
duct under the University of Sydney (Student Discipline) Rule.
9. That the School of Computer Science, in assessing this assignment, may reproduce it
entirely, may provide a copy to another member of faculty, and/or communicate a copy of
this assignment to a plagiarism checking service or in-house computer program, and that
a copy of the assignment may be maintained by the service or the School of Computer
Science for the purpose of future plagiarism checking.
You are advised to keep copies of your assignment submission, drafts and any other research
materials as evidence of your research and writing process. If you have used AI in the comple-
tion of your assignment, you should keep copies of the AI outputs.
Systems Programming Page 4 of 19
COMP2017 9017
2 Introduction
We are developing a new service aimed at revolutionising document editing, with the ambitious
goal of outperforming competitors such as Word, Notion and Google Docs. To achieve this,
we must implement a server-client architecture where a central server hosts the document and
coordinates all client interactions. Multiple authorised clients will be able to send commands
to the server to edit the document concurrently.
The document format will be a modified version of Markdown. Content will be stored as plain
text using only ASCII characters, simplifying compatibility and transmission.
The server will always maintain the most up-to-date and accurate version of the document. Note
that if your data structure is a simple character array, inserting characters into the middle of the
document would require shifting all subsequent characters, resulting in inefficiency. Therefore,
you are advised to use a more suitable data structure, such as a linked list, to allow for efficient
editing operations.
The structures and basic operations can be found in the code scaffold You must adhere to the
function signatures for the marking script to correctly assess your code.
3 Task
Implement a simulated collaborative document editing system in C, consisting of two pro-
grams:
1. server — the authoritative document host
• Listens for client connections over named pipes.
• Maintains the document in an efficient in-memory structure.
• Applies editing commands (INSERT, DEL, BOLD...) atomically and in the order
received.
• Broadcasts updates to all connected clients.
• Handles client registration, graceful disconnects, and error reporting.
2. client — a console-based editor
• Connects to the server’s named pipe endpoint.
• Sends user commands to read or modify the document.
• Receives update notifications and applies them to its local view.
Deliverables & Constraints
• Source files: server.c, client.c, plus any helpers.
• Must compile on Edstem Linux environment using with no warnings (-Wall -Wextra).
Systems Programming Page 5 of 19
COMP2017 9017
4 Set-up
Client–Server Connection Protocol
1. Start the server by running it with the following command.
essay、essay代写