For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Local Evaluation does not sync with user information stored on the Hackle server.

  • To use User Property-based targeting, the required properties must be stored on the device or in the browser.

  • We recommend setting User Properties when the user logs in.

  • User Properties set in the app are stored on the device. They are retained until the app is deleted.

Feature
Local Evaluation
Remote Evaluation

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.

  1. 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.

  2. On a distribution/decision call, the SDK evaluates directly using the stored configuration. No network call occurs in this process.

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 fetch function is called

Last updated