The task of this assignment is to write a client/server system that allows the c
ID: 3531260 • Letter: T
Question
The task of this assignment is to write a client/server system that allows the client to perform a key-value lookup.
In order to obtain full marks you must write both a client and a server program in C or C++ according to the following specifications. Use POSIX sockets for the network communications and the pthread API to paralleliz the server process.
You should design your own algorithms for the server's cache management. The algorithm must be clearly explained in the design document. It should be easy to change the size for the cache (recompilation is allowed).
The returns value of all function calls that might fail must be checked. Errors must be logged.
Explanation / Answer
#!/bin/bash echo -e "Create a new record " fSID (){ read -p "Please enter staff ID: " cSID } fSID gcSID=$(grep $cSID users.db | cut -d ":" -f1 | tr [":"] [" "]) wcSID=$(echo $cSID | wc -c) case "$cSID" in [!0-9]* ) echo -e "The staff ID should contain only digits " sleep 0.5 fSID;; esac while [ $wcSID -gt 4 ]; do read -p "Please enter a value: " cSID wcSID=$(echo $cSID | wc -c) echo $wcSID done read -p "u passed to stage 2! gratz" st2
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.