temporalio / temporalio/sdk-java

Support pluggable workflow caches

Open
#2,499 1 comment 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

There are cases where the current integrated LRU cache for workflow threads may not sufficiently capture the optimal strategy for all workloads.

For example, some high-volume workloads allow the cache to fill with workflows that are effectively abandoned because a remote worker completed them without any invalidation signal to clear the defunct task within the current worker. These abandoned workflows add extra eviction overhead for new, unrelated workflows, and the system may sometimes benefit from alternate eviction strategies that differ from the current synchronous LRU algorithm. Examples include augmenting the LRU with a TTL model, or adding an asynchronous/background eviction mechanism.

The proposal is to add a mechanism allowing a pluggable cache that defaults to the current LRU design, allowing SDK end-users to supply their own implementations when desired.

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 current integrated LRU cache for workflow threads and reviewing how workflows enter, remain in, and leave it. Define the pluggable cache boundary, the default LRU behavior, and the user-supplied implementation contract; done means alternate strategies can be supplied without changing existing default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
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.