https://github.com/jackson-nestelroad/server-client-peer-network
Simple implementation of a network with servers, clients, and peers.
https://github.com/jackson-nestelroad/server-client-peer-network
Last synced: 7 months ago
JSON representation
Simple implementation of a network with servers, clients, and peers.
- Host: GitHub
- URL: https://github.com/jackson-nestelroad/server-client-peer-network
- Owner: jackson-nestelroad
- Created: 2022-07-21T22:25:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-14T05:44:10.000Z (about 3 years ago)
- Last Synced: 2025-01-29T09:20:05.722Z (8 months ago)
- Language: C++
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Server-Client-Peer Network
This repository stores the code for my implementation of a project for my **Advanced Operating Systems** course at The Univeristy of Texas at Dallas. It is implemented to run exclusively on Linux machines with **C++11**.## Requirements
### Server
* Serve any number of clients
* Respond to `Enquiry` messages with a list of managed files.
* Respond to `Read(file)` messages with the last line of a given file.
* Respond to `Append(file, line)` messages with `Ok` after appending the given line to the end of the given file.### Client
* Connect to all other clients over a peer-to-peer network.
* Send `Enquiry` to one server for file names, which is then cached.
* Randomly generate `Read(file)` and `Write(line, (id, timestamp))` requests.
* For any request, gain mutual exclusion for the file across all clients.
* Send `Read` requests to a single server.
* Send `Write` requests to all servers.
* Implement the Ricart-Agrawala distributed mutual exclusion algorithm with the optimization proposed by Roucairol and Carvalho.## Features
Some notable features of this implementation include:
* `program::options` - configurable command-line options parsing
* `program::properties` -- dynamic parsing of `.properties` files
* `util::buffer` - circular buffer type
* `util::optional` - C++11 implementation of an optional type
* `util::path` - C++11 implementation of a filesystem path
* `util::result` - C++11 implementation of a Rust-like result type
* `util::state_machine` - state machine with singleton states