temporalio / temporalio/sdk-java

Deduplicate getResultAsync calls inside WorkflowClient or WorkflowStub

Open
#1,413 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
433
Forks
249
Avg merge
5d 6h
Merged PRs (30d)
26

Description

Is your feature request related to a problem? Please describe.
If users call getResultAsync on the same stub several times or if they call getResultAsync on different stubs for the same workflow execution, SDK will open a new long poll for each such request.

Describe the solution you'd like
SDK should deduplicate such calls and open only one long poll under the hood as an optimization, so users don't have to think about it in their code.

Additional context
This task should likely be paired with https://github.com/temporalio/sdk-java/issues/1212, as both require changes in the internal structure of the same area of SDK code.

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

Start by locating the getResultAsync implementations in WorkflowClient and WorkflowStub and review the related issue 1212, since this task is expected to share internal structure with it. Done means repeated calls for the same workflow execution, including calls through different stubs, share one long poll rather than opening one per request.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.