Skip to content

[chore] Refactor JsonEvaluator and isolate Flags to a store #371

Closed

Description

@Kavindu-Dodan

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,

image

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

Activity

  1. self-assigned this
    on Feb 6, 2023
  2. added a commit that references this issue on Feb 9, 2023
    fef9b87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions