UNPKG

starvation-free-priority-queue

Version:

An in-memory priority queue that prevents starvation by balancing priority and arrival time. Items are greedily prioritized within each batch of the longest-waiting items, ensuring fairness alongside prioritization and bounded delays for low-priority task

66 lines (65 loc) 1.91 kB
{ "name": "starvation-free-priority-queue", "version": "1.0.0", "description": "An in-memory priority queue that prevents starvation by balancing priority and arrival time. Items are greedily prioritized within each batch of the longest-waiting items, ensuring fairness alongside prioritization and bounded delays for low-priority tasks. This makes it ideal for scenarios such as task scheduling in CI/CD pipelines, resource allocation in distributed systems, and managing customer support ticket queues to ensure timely resolution for all priorities, among other use cases.", "repository": { "type": "git", "url": "git+https://github.com/ori88c/starvation-free-priority-queue.git" }, "contributors": [ "Ori Cohen (https://github.com/ori88c/)" ], "homepage": "https://github.com/ori88c/starvation-free-priority-queue#readme", "author": "Ori Cohen", "license": "Apache-2.0", "scripts": { "build": "tsc", "prepare": "npm run build", "test": "jest" }, "keywords": [ "starvation", "starvation-free", "priority-queue", "starvation-free-priority-queue", "prioritized-task", "priority", "bounded-delay", "weighted-tasks", "scheduling", "aging-tasks", "prioritization", "balance", "greedy-per-batch", "frontier", "tasks-queue", "task-scheduling", "task-schedule", "pre-allocated", "nodejs", "typescript", "ts", "ES2020" ], "engines": { "node": ">=14.5.0" }, "dependencies": { "data-oriented-slim-queue": "^1.1.0" }, "devDependencies": { "@types/jest": "^29.5.12", "jest": "^29.7.0", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "typescript": "^5.7.2" }, "types": "./dist/starvation-free-priority-queue.d.ts", "main": "./dist/starvation-free-priority-queue.js", "files": [ "src/", "dist/", "README.md", "LICENSE" ] }