Requirements
Current behaviour
The relayproxy seems to not include the eventStreams field into the OFREPBulkEvaluationSuccess response model when using OFREP endpoint ofrep/v1/evaluate/flags.
Expected behaviour
The relayproxy should implement OpenFeature ADR0008 to let OFREP providers use the eventStreams field and eventually read for flag changes, without the needs of polling.
Proposals and Considerations
The relayproxy already expose am SSE endpoint /stream/v1/sse/flag/change that can be included in BulkEvaluationSuccess responses, for example:
{ "flags": [...], "eventStreams": [{ "type": "sse", "url": "${RESOLVED_SSE_HOST}/stream/v1/sse/flag/change", "inactivityDelaySec": ${RESOLVED_INACTIVITY_DELAY} } ] }
RESOLVED_SSE_HOST may be:
- resolved automatically from the incoming request, by using an internal context property in the payload like
gofeatureflag.sseEndpoint or some request header like x-gofeatureflag-sse-endpoint
- resolved from a mapping configuration in the config file. For example a new
sse.endpoint or eventStream.endpoint property.
The same may be applied to RESOLVED_INACTIVITY_DELAY.
NOTE: The feature may be initially considered opt-in through a flag in the config file like sse.ofrepEnabled or something else that fits better. This will let unchanged config files to make relayproxy to behave as-is.
Eventual work to be done
- Update the codebase of relayproxy
- Update documentation (configuration, usage, use cases, etc.)
Requirements
Current behaviour
The relayproxy seems to not include the
eventStreamsfield into the OFREPBulkEvaluationSuccess response model when using OFREP endpointofrep/v1/evaluate/flags.Expected behaviour
The relayproxy should implement OpenFeature ADR0008 to let OFREP providers use the
eventStreamsfield and eventually read for flag changes, without the needs of polling.Proposals and Considerations
The relayproxy already expose am SSE endpoint
/stream/v1/sse/flag/changethat can be included in BulkEvaluationSuccess responses, for example:{ "flags": [...], "eventStreams": [{ "type": "sse", "url": "${RESOLVED_SSE_HOST}/stream/v1/sse/flag/change", "inactivityDelaySec": ${RESOLVED_INACTIVITY_DELAY} } ] }RESOLVED_SSE_HOSTmay be:gofeatureflag.sseEndpointor some request header likex-gofeatureflag-sse-endpointsse.endpointoreventStream.endpointproperty.The same may be applied to
RESOLVED_INACTIVITY_DELAY.NOTE: The feature may be initially considered opt-in through a flag in the config file like
sse.ofrepEnabledor something else that fits better. This will let unchanged config files to make relayproxy to behave as-is.Eventual work to be done