An exactly-once service will guarantee a client's request is processed at most once and at least once, provided the client does not fail. Task is to implement an exactly-once service in a client-server system. There is a single server in this system that supports multiple clients. This server must support non-volatile data and must recover from a crash. Connection-less protocols do not guarantee message delivery. The protocol implementation is based on a "best try".

Need to design and implement your communication using datagrams. The server's exactly-once service must implement a data structure that will hold a five-letter string. Initially the string is blank. When a client sends a successful request to the server, the server will modify its five-letter string in the following manner:

  • Shift the first four characters of the server string to the right by one character.
  • Store the character transmitted by the client in first slot of the server's string.

For example, the current value of the server string is "lmnop". If the client passed in an x, the server would create a new string with the value xlmno and return this string to the client. You must design and implement a test plan for the exactly-once service. This includes error/fault injection. The system must be able to handle a server crash and begin running from the point in which it ended. Thus, you must have a mechanism for starting a clean system as well as a system that has just recovered from a crash. The client and server will display their activities to the screen and contain a logging mechanism.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.