get-convex / get-convex/workpool

Fine-grained, keyed job serializability within a workpool with maxParallelism > 1

Open
#132 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31
Forks
7
Avg merge
1d 12h
Merged PRs (30d)
10

Description

It would be nice if workpool supported fine-grained (keyed) job serializability based on some job arguments. E.g., I want the workpool have maxParallelism > 1, but jobs that are identical by some (subset of) their arguments are always executed in serializable fashion, at most one at the time.

Internally, this could be implemented by hashing these selected arguments for the given job and assigning the internal thread ID for this job execution to `hashValue % poolSize`, a la https://guava.dev/releases/15.0/api/docs/com/google/common/util/concurrent/Striped.html.

Contributor guide

Open the contributing guide

Research direction

Start by reading the workpool scheduling implementation and its handling of maxParallelism and poolSize. The issue names no files or tests; establish the caller-facing way to select job arguments for a key, then verify that matching jobs run one at a time while different keys can still run in parallel.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.