json_evaluator [1] is the core evaluator currently used by flagd. Internally, it relies on Flags pushed from ISync implementations.
The current implementation however lacks a good design with regards to Flag storage. For example, PR #370 focused on concurrent map access bug fix required mutexes in two locations. This shows that json_evaluator internals needs refactoring.
Consider the following proposal,

Here, the json_evaluator connects to FlagStore , which replaces the currently used Flags structure with defined contracts (exported methods). This makes FlagStore internals hidden from its consumer (json_evaluator), allowing clear interactions and modifications .
[1] - https://github.com/open-feature/flagd/blob/main/pkg/eval/json_evaluator.go
json_evaluator[1] is the core evaluator currently used by flagd. Internally, it relies onFlagspushed from ISync implementations.The current implementation however lacks a good design with regards to Flag storage. For example, PR #370 focused on concurrent map access bug fix required mutexes in two locations. This shows that
json_evaluatorinternals needs refactoring.Consider the following proposal,
Here, the
json_evaluatorconnects toFlagStore, which replaces the currently usedFlagsstructure with defined contracts (exported methods). This makes FlagStore internals hidden from its consumer (json_evaluator), allowing clear interactions and modifications .[1] - https://github.com/open-feature/flagd/blob/main/pkg/eval/json_evaluator.go