open-feature / open-feature/java-sdk-contrib
[flagd] ContextEnrichment for inprocess improvements by extracting logic onto the channelmonitor
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 49
- Forks
- 81
- Avg merge
- 20h 3m
- Merged PRs (30d)
- 6
Description
Currently our Context Enrichment is handled here:
We always try to fetch the metadata before we reestablish a connection, during our stream listening logic.
This might be a little bit tricky, as we are always relying on the same process, and if eg. the timeline exceeds etc. the whole process breaks.
The question is how important it is to fetch this metadata, as we could theoretically also do this unary call when the channel state changes to READY, instead of always during the loop.
This would decouple our sync from the metadata, and might increase our robustness.
WDYT?
cc: @guidobrei @toddbaert @beeme1mr @alexandraoberaigner @chrfwow
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/storage/connector/grpc/GrpcStreamConnector.java, especially the metadata handling around lines 107–124. Read the stream listening and channel state logic, then assess moving the unary metadata fetch to the channel's READY transition. Done means synchronization no longer depends on fetching metadata inside the stream loop and the reconnection behavior remains robust.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, java
- Domain
- backend, distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100