OAI / OAI/tools.openapis.org

Implement a time-based sharding approach to data collection

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

data enhancement
Dominant language
JavaScript
Stars
177
Forks
87
Avg merge
1m
Merged PRs (30d)
1

Description

User Story

As a tooling developer I want data to be collected consistently and without failing due to rate limits applied at any source code repository platform.

Detailed Requirement

GitHub (obviously) applies rate limits on API calls, which we rely on heavily to collect data. As we expand the number of topics we are collecting we need to be cognisant of the limits and amend our approach to spread the collection period over multiple hours.

There's a few approaches:

  1. A simple manual slicing of the workload based on the alphabet (low sophistication, much manual tweaking).
  2. Splitting the build into multiple steps to seed files for later processing (medium sophistication, limited manual tweaking).
  3. Splitting the build as per option 2 and using a dependency mechanism to allow a build to trigger others (high sophistication, largely automated)

Option 3 seems feasible. The most sensible option seems to be:

  • Run a "collection" mechanism to get the superset of repositories we will query for their metadata.
  • Based on the collected data shard the data set into multiple groups, each bound to a given schedule.
  • Write workflow files based on the known rate limits at a given repository platform, target data set and schedule.
  • Allow the builds to run of their own volition.

This approach should scale as we collect more data. The main thing to be aware of is the overall build time limits, although that should be "OK" as we have a fair amount of head room for the time being.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not mention specific files, tests, or entry points. Start by locating the existing data-collection mechanism and build workflows, then define how the repository set is collected, sharded, scheduled, and chained; done means collection runs across the available time windows without exceeding source-platform rate limits.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, javascript
Domain
ci-cd, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.