{"id":17877846,"url":"https://github.com/ropes/launch-widgets","last_synced_at":"2025-04-03T00:44:31.638Z","repository":{"id":140791030,"uuid":"352489774","full_name":"Ropes/launch-widgets","owner":"Ropes","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-29T03:15:59.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T15:16:54.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ropes.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-29T02:14:01.000Z","updated_at":"2021-03-29T03:16:01.000Z","dependencies_parsed_at":"2024-05-19T14:00:31.970Z","dependency_job_id":null,"html_url":"https://github.com/Ropes/launch-widgets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ropes%2Flaunch-widgets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ropes%2Flaunch-widgets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ropes%2Flaunch-widgets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ropes%2Flaunch-widgets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ropes","download_url":"https://codeload.github.com/Ropes/launch-widgets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916744,"owners_count":20854511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T11:59:11.221Z","updated_at":"2025-04-03T00:44:31.619Z","avatar_url":"https://github.com/Ropes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Launch-Widgets\n--------------\n\n### Part 1 \n\nWritten to `P1: Statement of Work.md`. \n\n### Part 2\n\nWritten in Go, pull down dependencies with `make mod` can be invoked by `make run`, tests by `make test`, and source code can be found in pkg/schedule, a main.go entrypoint with example runtime code can be found in `cmd/`\n\n## Running the code\n\nMake targets are provided to source dependencies, execute tests, and run an example program. \n\n* `make mod` will ensure the few dependencies are available to compile.\n* `make test` runs unit tests.\n* `make run` executes the small program in `cmd/main.go`. It is configured with a few hardcoded parameters to show the Pod ComputeResource constraints interacting balancing with the Pod Priority scores on a over-utilized cluster of Nodes. Pods will periodically be scheduled and then unscheduled as their priority is lowered by running on Nodes, thus enabling previously unscheduled Pods to replace them.\n\n\n### Node\n\nNodes encapsulate \n\n* Resources \n    * Capacity Limit(Maximum)\n\n* Start(Pod) error{}\n* Stop(Pod) error{}\n    * evict(application)\n* InvoicePod(Pod) { \"commit charges, reduce priority of Pod due to time running\" }\n\nCount assigned Apps \"hosted\" by node\n\nAdd/Remove App from Node\n    * Consume/Release capacity\n\n### Pod/App\n\nContainer data object, unit of work to be assigned \n\n* ID: UUID for tracking\n* Resources Requested\n    * mCPU\n    * Memory bytes\n* Priority: Scalar value indicating Priority among other Pods, 0 being hightest priority.\n* Labels() map[string]string{ \"name\": PodN }\n\n## Scheduler\n\n* Ideally use [Dynamic Double-Auction Algorithm](https://www.cs.cmu.edu/~sandholm/cs15-892F15/Chain-DynamicDouble07.pdf)\n    * Scheduler in pkg/schedule uses container priority, and Node capacity compared to Pod requirements, to determine whether a pod can be scheduled.\n\n### Pod Priority \nUse `priority` value for simplicity, with 0 being highest priority to be scheduled. All Apps start with a pValue, and over time the nodes increment their pValues, thus decreasing their scheduling priority. \n\nScheduler scans all the Pods pValues, and compares which have the lowest and need to be scheduled. This creates an ordered list of Pods to be scheduled, separate from assignment.\n\n### Pod Assignment\n\nAssignment utilizes the Pod ordering previously determined, and iterates the set of Nodes; assigning Pods to be run. Highest priority get assigned first, round robin'ing through the list of Nodes. Low priority Pods, or Pods with compute requirements beyond Node size, will fail to be assigned if there is insufficient capacity.\n\n* Schedule([]Nodes, []Pods)\n    * Iterate over Pods/Apps \n        * Iterate over Nodes to assign\n            * If Node has capacity, start Pod\n            * Else check next nodes until all Nodes have been checked as candidates for this Pod.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropes%2Flaunch-widgets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fropes%2Flaunch-widgets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropes%2Flaunch-widgets/lists"}