Choosing an SDK
ABetterChoice exposes the same experiments and feature flags through three integration shapes. This page helps you pick one before you write any code. If you change your mind later, you can switch shape without re-creating the project — same project ID, same API key, same experiments.
At a glance
| Shape | Where it runs | Latency | When to use |
|---|---|---|---|
| Server SDK | Inside your backend service | Sub-millisecond, local | Trusted runtime, high-QPS, you want zero per-call network round-trips. |
| Client SDK | Inside your mobile app or web page | One network call at startup, then local | Untrusted runtime, you want assignments tied to the end user's device. |
| HTTP API | Anywhere that can sign and send a request | One network call per request | No SDK exists for the runtime, or you only need batch / ad-hoc calls. |
Server SDKs and the HTTP API are the only generally available shapes today: the Go server SDK and the HTTP API. The C++ server SDK and every client SDK (Android, iOS, JavaScript) are listed under Settings → SDK&Key as Coming soon.
Server SDK
Pick a server SDK when:
- your service runs on infrastructure you control, and the API token never leaves the server;
- you want zero network round-trips on the assignment hot path — the SDK keeps configurations in memory and re-polls every few seconds in the background;
- you can deploy and own a long-lived process to host the SDK.
The SDK polls the platform every 3 seconds for configuration updates and evaluates assignments locally. The full lifecycle is covered in Server SDKs Overview.
Today: Go is generally available. C++ is listed as Coming soon under Settings → SDK&Key; reach out to support if you need early access.
Client SDK
Pick a client SDK when:
- the assignment runs inside the user's device or browser;
- you want one HTTP call at app launch and zero on the hot path;
- you are willing to ship the API token (or a public-scoped variant) into a binary that the user can read.
Client SDKs evaluate against precomputed results fetched from the platform's evaluation servers. The full lifecycle is covered in Client SDKs Overview.
Today: all three client SDKs (Android, iOS, JavaScript) are listed as Coming soon under Settings → SDK&Key. Reach out to support if you need early access; the per-language pages cover the integration shape so you can plan ahead.
HTTP API
Pick the HTTP API when:
- there is no SDK for your runtime (Rust, .NET, PHP, BI tools, ad-hoc shell scripts);
- you only need to fetch assignments occasionally (batch jobs, CI pipelines);
- you want to keep dependencies to a minimum.
Each request signs (token, ak, et) with MD5 and carries three headers (X-Ak, X-Et, X-Es). Latency is one network round-trip per call; there is no client-side cache. Read HTTP API authentication and HTTP API endpoints.
Decision flow
When in doubt, start with the HTTP API to verify project, key, and audience targeting end-to-end, then move the integration into a server SDK once your runtime is fixed.