This repository was archived by the owner on Nov 8, 2024. It is now read-only.
Implement poller and in-memory cache #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
labels: mergeable
Fixes: #issue
https://github.com/Eppo-exp/eppo/issues/2907
Motivation and Context
The SDK client needs retrieve assignment configurations (RAC) from Eppo's backend. It uses these assignment configurations to determine which variant a subject belongs to. The SDK polls the RAC endpoint at regular intervals to retrieve the configurations - see this design doc for more details.
Description
Implemented a poller and in-memory cache. It is almost the same implementation as was done for the Node SDK. The main difference is that, with multi-threaded language like Python, we need to synchronize access to the shared client instance and the configuration store.
How has this been tested?
eppo_client_test.py
that initializes the client and gets assignments.get_instance
andinit
methods. Verified that the Eppo backend API is called regularly on the poll interval and assigns variants to running Eppo experiments. Ran the server for about 1 hour.