Menu

#393 More frequent roborumble server checks

1.9.3.1
closed
None
2
2018-07-08
2017-10-21
Julian Kent
No

Currently the roborumble client only checks the server for new bots being added once every 2 hours. This means that if new bots are added, the client will continue to run old bots for up to 2 hours, which means multple versions in rumble, confused server requesting priority battles between 2 different versions of the same bot, etc.

This could be reduced to 10 minutes with no risk of harm for the robowiki due to increased load. It would greatly improve the responsiveness of the rumble.

Below is a patch that would decrease the time to 10 minutes:

diff --git a/robocode.roborumble/src/main/java/roborumble/RoboRumbleAtHome.java b/robocode.roborumble/src/main/java/roborumble/RoboRumbleAtHome.java
index ef9a30f..1586df0 100644
--- a/robocode.roborumble/src/main/java/roborumble/RoboRumbleAtHome.java
+++ b/robocode.roborumble/src/main/java/roborumble/RoboRumbleAtHome.java
@@ -64,7 +64,7 @@ public class RoboRumbleAtHome {

                        System.out.println("Iteration number " + iterations);

-                       // Download data from Internet if downloads is YES and it has not been download for two hours
+                       // Download data from Internet if downloads is YES and it has not been download for 10 minutes
                        if (downloads.equals("YES")) {
                                BotsDownload download = new BotsDownload(parameters);

@@ -73,7 +73,7 @@ public class RoboRumbleAtHome {
                                        System.out.println("Downloading rating files ...");
                                        ratingsdownloaded = download.downloadRatings();
                                }
-                               if ((System.currentTimeMillis() - lastdownload) > 2 * 3600 * 1000) {
+                               if ((System.currentTimeMillis() - lastdownload) > 10 * 60 * 1000) {
                                        System.out.println("Downloading participants list ...");
                                        participantsdownloaded = download.downloadParticipantsList();
                                        System.out.println("Downloading missing bots ...");

Discussion

  • Flemming N. Larsen

    Thank you Julian. I have merged your fix into the next version of Robocode. :-)

     
  • Flemming N. Larsen

    • status: open --> pending
     
  • Flemming N. Larsen

    • summary: More frequent roorumble server checks --> More frequent roborumble server checks
     
  • Flemming N. Larsen

    • status: pending --> closed
    • Group: Next Release --> 1.9.3.1
     

Log in to post a comment.