Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve round-robin algorithm implementation #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Aug 11, 2023

Description

This PR aims to improve the round-robin algorithm implementation in the repository. The existing codebase had two versions of the algorithm, which were consolidated into a single version for better code readability and maintainability. The improvements include removing redundant code, adding error handling and resource management, and allowing the user to input server sockets as command-line arguments.

Summary of Changes

  • Renamed the "RR-another version" file to "RoundRobin.java" to follow Java naming conventions.
  • Removed hardcoded server sockets and replaced them with command-line arguments for flexibility.
  • Extracted the server selection logic into a separate method called "selectServer" for code maintainability.
  • Deleted the "roundrobin.java" file as its functionality is now covered by the "RoundRobin.java" file.

Fixes #1.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/improve-round-robin

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sweep: modify the code into better version
0 participants