RequiresTheWestyxNexus.OpenFeaturev0.10.0 or later alongsideWestyxNexus.
WestyxNexus.OpenFeature package provides NexusProvider, an OpenFeature-compliant FeatureProvider that wraps an existing NexusClient. Config resolutions are served from the client’s local in-memory cache; a boolean evaluation is resolved per user through the AB Testing add-on when the EvaluationContext carries a targeting key.
Installation
WestyxNexus and WestyxNexus.OpenFeature must be installed. They are separate NuGet packages from the same GitLab registry.
Quick start
Value mapping
Flags vs configs: Boolean resolution reads the feature flag cache, or evaluates per user when the context carries a targeting key. All other types use
GetConfig (the config cache).
Error handling
The provider never throws; it always returns a
ResolutionDetails<T> with the appropriate error type set.
Per-user targeting
When theEvaluationContext carries a targeting key, a boolean evaluation is resolved for that user
through the AB Testing add-on: the flag’s rollout percentage and cohort rules are applied to that
identity. Without a targeting key the synced snapshot is read, as it always has been.
age.ToString(CultureInfo.InvariantCulture) rather than age - and you know exactly what the
cohort rule is matched against.
Only boolean evaluation is targeted. String, double, integer and structure values come from configs,
and a config has no per-user dimension in Nexus.
Requests and caching
A targeted evaluation is a network call where the snapshot path is a dictionary lookup. Two things keep that affordable, and neither needs configuring: one request serves every flag the snapshot knows for that user, so reading five flags while handling a request costs one round trip; and results are memoised per user and flag for 30 seconds, with concurrent evaluations for the same user coalescing into a single request.TargetingTtl
would turn every evaluation into a network call.
Reason codes
A failed targeted request never surfaces as an error. The OpenFeature SDK answers an error resolution
by returning the caller’s default, so a flag that is genuinely on would evaluate off because of one
failed request; the snapshot value with a
STALE reason is the honest answer and the better one. A
project without the AB Testing add-on gets Static from the snapshot, and the provider stops asking
for five minutes before trying again.
SPLIT is never reported: the endpoint returns booleans only, so a rollout bucket and a cohort match
are indistinguishable here, and TargetingMatch covers both.
Variant carries the string form of the resolved value for boolean, string, double and integer
resolutions - "true" / "false" for a boolean, lowercase, which is the same spelling every SDK in
the Westyx Nexus suite uses. A structure resolution has no variant: a composite value has no short
semantic identifier.
ASP.NET Core DI example
IFeatureClient into your services:
Live updates
Whennexus.ConnectStream() is active, the client’s cache is updated within milliseconds of a remote flag change via SSE. OpenFeature evaluations pick up the new value on the next call because the provider reads directly from the live cache.