Local Evaluation
Local Evaluation is a mode in which the SDK performs evaluation directly on the user's device.
Because there is no server communication for evaluation, distribution is handled without re-syncing with the server even when user information changes. It is the default evaluation mode for all Hackle SDKs and can be used without any additional configuration.
Feature Support
Local Evaluation evaluates based on user information stored on the device.
A/B Test distribution
✅
✅
Feature Flag decision
✅
✅
Remote Config lookup
✅
✅
Evaluation based on user information stored on the device
✅
❌
Evaluation based on user information stored on the server
❌
✅
Re-evaluation without server communication when user information changes
✅
❌
How It Works
During initialization, the SDK fetches the workspace configuration, such as A/B Tests and Feature Flags, and stores it internally. When distribution is needed, the SDK evaluates directly using the stored configuration.
On SDK initialization, the SDK fetches the workspace configuration, such as A/B Tests and Feature Flags, from the Hackle server and stores it internally.
On a distribution/decision call, the SDK evaluates directly using the stored configuration. No network call occurs in this process.
Except when fetching the workspace configuration, Local Evaluation handles distribution without server communication or network delay for evaluation.
When User Information Changes
When the User Identifier changes (setUser, setUserId, setDeviceId, resetUser) or User Properties are updated, the SDK stores the user information in its internal storage.
When functions such as A/B Test are called, distribution is processed in real time using that user information.
Reflecting Dashboard Changes
Local Evaluation evaluates based on the configuration stored inside the SDK. Evaluation is based on when the configuration was fetched, not on the Dashboard settings at the moment the distribution/decision was called.
The configuration stored in the SDK is updated at the following points:
On SDK initialization
When the SDK's
fetchfunction is called
Even if you adjust an A/B Test's traffic allocation or turn a Feature Flag on or off in the Dashboard, evaluation uses the existing configuration until the SDK fetches the configuration again.
To apply the changed settings, reinitialize the SDK or call the fetch function.
Last updated