Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Source material:

...

  • Store rounds List as JSON in a single database column.

    • This would require searching for the correct round based on start/end dates in memory

    • Evaluations object can be cleanly retrieved using query on single table

  • Separate Table For Rounds (primary key is evaluationId , ID) index on roundStart and roundEnd

    • Allows us to pull out one specific limit

    • Separate queries

      • query to retrieve list of all rounds for that evaluation,

        • On REST API GET, we care about all rounds

      • query to retrieve list single evaluation id,

        • On challenge submissions during the submission limit enforcement, we only care about the specific round whose start/end interval encapsulate the current time

      • query to pull from the Evaluations table

    • Limits are enforced in Java code so we can store the them as JSON

    • Question: should ID be created by the id-generator? or just index in rounds list?

      • generated unique ID makes it easy to perform updates on evaluations

        • with current API setup a list of round are submitted, making this pointless

      • index in round list as ID

        • this allows easier tagging of submission

        • updating rounds involves row deletion and addition if added

          • hash metdata to avoid pointless delete/add?

      • If we use roundStart, roundEnd to identify the round config.

        • any change to start,roundend would mean an insertion/deletion

evaluationId(BIGINT)(Foreign Key to Evaluations Table)

ID(BIGINT)

roundStart(TIMESTAMP)

roundEnd(TIMESTAMP)

Limits(JSON)

123

1

2020-01-01 04:40:10

2020-01-01 04:40:10

Code Block
 {
         "id":"2",
         "roundStart":1231412213213123123,
         "roundEnd":"2020-08-11T16:45:10−08:00",
         "submissionLimit":{
            "totalSubmissionLimit":40,
            "dailySubmissionLimit":8,
            "weeklySubmissionLimit":12,
            "monthlySubmissionLimit":{
               "dayOfMonth":31,
               "limit":20
            }
         }
      }

123

2

2020-01-01 04:40:10

2020-01-01 04:40:10

456

1

2020-01-01 04:40:10

2020-01-01 04:40:10

789

1

2020-01-01 04:40:10

2020-01-01 04:40:10

Evaluation_maintenance table

Records maintenance windows for each evaluation.

evaluationId(BIGINT)(Foreign Key to Evaluations Table)

startDate(TIMESTAMP)

endDate(TIMESTAMP)

123

2020-01-01 04:40:10

2020-01-01 04:40:10

456

2020-01-01 04:40:10

2020-01-01 04:40:10

Submission JDOSUBMISSION table

Add EVALUATION_ROUND, which is the round number during which it was submitted. This will be replicated into Submission Views.

...