Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side SDK local evaluation #2326

Closed
1 task done
alexcardell opened this issue Nov 1, 2023 · 3 comments
Closed
1 task done

Client-side SDK local evaluation #2326

alexcardell opened this issue Nov 1, 2023 · 3 comments
Labels
wip Work In Progress xl As big as it gets

Comments

@alexcardell
Copy link

alexcardell commented Nov 1, 2023

Problem

Evaluation of flags and context is done server-side, via network request. This is not always appropriate for hot path code, adds latency, etc.

Running evaluations locally would be more performant, more easily testable.

Ideal Solution

  • Allow clients to run all evaluation locally, this should be opt in to start
  • Allow clients to operate on a locally cached flag context, and use that for evaluations -- this is to make side effects explicit
  • Allow clients to receive flag context updates via streaming -- Offer Server Sent Events (SSE) as an alternative to polling for client SDKs #2122
  • Preferably this would be an SDK specific solution rather than embedding binaries to do the evaluation part

Search

  • I searched for other open and closed issues before opening this

Additional Context

The benefit of server side evaluation is always using the latest flag state. In case Flipt can't be reached, but a flag has been disabled, local evaluations are an interesting case, especially with caching

@markphelps
Copy link
Collaborator

@alexcardell yup we have something in the works. Im not sure it will solve all the 'ideal solution' bullet points out the gate, but will definitely make evaluations much much faster by occurring client side.

Will give you a ping once we have something that is releasable to try.

May I ask which language(s) would you want the clients for?

@markphelps markphelps added the wip Work In Progress label Nov 7, 2023
@markphelps markphelps added the xl As big as it gets label Dec 12, 2023
@markphelps
Copy link
Collaborator

FYI @alexcardell we just released a first pass at client side evaluation: https://www.flipt.io/blog/new-client-side-evaluation

Next week I'm going to focus on packaging up the languages we support and pushing to the various registries, then will add additional languages.

Any language that you would like to see prioritized?

@markphelps
Copy link
Collaborator

Closing as we now have official Client Side Eval SDKs. If there are any languages you would like us to support that we dont already, please open an issue in the client SDK monorepo: https://github.com/flipt-io/flipt-client-sdks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work In Progress xl As big as it gets
Projects
Status: Done
Development

No branches or pull requests

2 participants