Skip to content

Conversation

@sweep-ai-deprecated
Copy link

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-deprecated sweep-ai-deprecated 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

1 participant