Proposal: Support TTL for purging grain state for inactive grains
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 14h 42m
- Merged PRs (30d)
- 354
Description
From discord:
I'm curious if there are any proposals on how to clear up old grain state out there? I saw that DAPR's actors has the idea of a TTL for state, which presumably is a minimum-age-since-last-activation type purging mechanism. Given the different types of state providers out there, it would probably have to be running at a higher point in the stack to work generically. Reminders seems like the obvious solution, but probably not a very scalable one if we've got one for every grain that has ever sprung to life.
We'd probably need some async background process that periodically scans a persisted index that is updated indirectly by something watching the grain directory. It could be an opt-in component for clusters that work a lot with ephemeral grain instances.
Some backing stores have native support for TTL (see: Cosmos Db.)
Contributor guide
Research direction
Start by reading the proposal and the linked Discord discussion context; no repository files, tests, or entry points are named. Define how opt-in TTL-based purging would work across Orleans grain state providers, including indexing, background scanning, and provider-specific capabilities, before implementation can be scoped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100