Skip to content

Build a TCP server that can accept and hold a maximum of N clients where N is configurable.(Pesapal interview solution)

License

Notifications You must be signed in to change notification settings

paulmunyao/-A-distributed-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📗 Table of Contents

📖 A DISTRIBUTED SYSTEM

Build a TCP server that can accept and hold a maximum of N clients (where N is configurable).These clients are assigned ranks based on first-come-first-serve, i.e whoever connects first receives the next available high rank. Ranks are from 0–N, 0 being the highest rank.

Clients can send to the server commands that the server distributes among the clients. Only a client with a lower rank can execute a command of a higher rank client. Higher rank clients cannot execute commands by lower rank clients, so these commands are rejected. The command execution can be as simple as the client printing to console that command has been executed.

If a client disconnects the server should re-adjust the ranks and promote any client that needs to be promoted not to leave any gaps in the ranks.

[A DISTRIBUTED SYSTEM] is a type of system that lets computers independent of each other work together.

🛠 Built With

Tech Stack

-Python -Docker -Shell

Client

Key Features

Describe between 1-3 key features of the application.

  • [Server to hold a maximum number of clients]
  • [SErver distributing commands to clients]
  • [The server can reassign a number to a client in the server queue]

(back to top)

💻 Getting Started

To get started with the project, make sure you have installed the following in your computer operating system

Prerequisites

In order to run this project you need:

 Install python in your machine if you don't have

Setup

Clone this repository to your desired folder:

 git clone https://github.com/paulmunyao/-A-distributed-system.git

To run the project, execute the following command:

 python3 socketserver.py
 python3 clientserver.py

(back to top)

👥 Authors

Mention all of the collaborators of this project.

👤 Author1

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

🙏 Acknowledgments

I would like to thank

(back to top)

📝 License

This project is MIT licensed.

(back to top)

About

Build a TCP server that can accept and hold a maximum of N clients where N is configurable.(Pesapal interview solution)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages