-
Notifications
You must be signed in to change notification settings - Fork 98
Build a deterministic SDK request deduplication layer for concurrent identical reads #454
Copy link
Copy link
Closed
Labels
GrantFox OSSGrantFox Open Source Sponsorship program tagGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesIssue may qualify for a reward upon successful completion per campaign rulesThird CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsbackendBackend services, application logic, persistence integration, and server-side functionalityBackend services, application logic, persistence integration, and server-side functionalityconsistencyPattern and convention standardization across the codebase for uniformityPattern and convention standardization across the codebase for uniformityexpertExpert difficulty tasks requiring deep expertise and architectural decision-makingExpert difficulty tasks requiring deep expertise and architectural decision-makingperformancePerformance optimization or latency/throughput improvement workPerformance optimization or latency/throughput improvement work
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSGrantFox Open Source Sponsorship program tagGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesIssue may qualify for a reward upon successful completion per campaign rulesThird CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsbackendBackend services, application logic, persistence integration, and server-side functionalityBackend services, application logic, persistence integration, and server-side functionalityconsistencyPattern and convention standardization across the codebase for uniformityPattern and convention standardization across the codebase for uniformityexpertExpert difficulty tasks requiring deep expertise and architectural decision-makingExpert difficulty tasks requiring deep expertise and architectural decision-makingperformancePerformance optimization or latency/throughput improvement workPerformance optimization or latency/throughput improvement work
Difficulty: Expert
Type: Feature
Recommended labels (if available in this repo): performance, backend, consistency, expert
Background
Applications using GuildPass SDK may trigger identical read requests concurrently, for example when multiple components request the same membership or access data during the same render cycle.
Launching duplicate network requests wastes resources and can produce inconsistent timing behaviour.
This issue introduces a generic in-flight request deduplication primitive without coupling it to any GuildPass endpoint.
Problem
There is currently no SDK mechanism for sharing one in-flight Promise between callers requesting the same logical operation.
A naive cache is not sufficient because completed response caching and in-flight deduplication have different semantics.
Expected Outcome
Implement a reusable request deduplicator that ensures concurrent callers using the same deduplication key share one underlying asynchronous execution.
Suggested Implementation
The module should:
Acceptance Criteria
pnpm typecheckpasses.pnpm buildpasses.pnpm testpasses.Likely Affected Files/Directories
Independence Requirement
This issue must remain a generic concurrency primitive and must not depend on the HTTP transport, cache, or endpoint implementations.