> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/en/development-guide/sdk/client-vs-server.md). Agents can also search and read this documentation through its [MCP server](https://docs.hackle.io/~gitbook/mcp).

# Client SDK vs Server SDK

This document explains client-side and server-side SDKs and helps you decide which SDK type to use. It is important to understand whether it is more appropriate to implement the features the SDK provides on the client or the server.

<table><thead><tr><th width="158.19921875">Type</th><th>Description</th></tr></thead><tbody><tr><td>Client-side</td><td><p>SDK features run on the user's device, such as a browser or mobile app.</p><p>Includes <code>JavaScript</code>, <code>Android</code>, <code>iOS</code>, <code>React</code>, <code>React Native</code>, <code>Flutter</code>, and <code>Unity</code> SDKs.</p></td></tr><tr><td>Server-side</td><td><p>SDK features run on the server providing the service.</p><p>Includes <code>Java/Kotlin</code>, <code>Python</code>, <code>Node.js</code>, <code>PHP</code>, and <code>Ruby</code> SDKs.</p></td></tr></tbody></table>

## Client-side SDK

![](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-930341c1ad0289439cc33902938daf5db0d1dbe6%2Fbd04114-_2021-02-06__4.32.27_5f1f07f1b444beca.png?alt=media)

SDK features run on the user's device, such as a web browser or mobile app, and the device communicates directly with the Hackle server.

The Client-side SDK is recommended in the following cases:

* When distributing users into variations to test visual element changes, such as button color or layout modifications
* When you need to track user events that occur on the client without server communication, such as clicks or scrolls
* When business logic is concentrated on the client side

## Server-side SDK

![2264](https://143363954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyAVlNQhS253reum0Ce94%2Fuploads%2Fgit-blob-b8123678ef7c993915fcd81f5d21ba1648f8c183%2F0d6574d-_2021-02-06__4.34.02_28e02ddd3a732a8d.png?alt=media)

SDK features run on the server and communicate server-to-server.

The Server-side SDK is recommended in the following cases:

* When distributing users into variations to test backend system changes, such as improving search algorithms or modifying recommendation logic
* When you need to track user events that are finalized on the server, such as user registration or purchase completion


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hackle.io/en/development-guide/sdk/client-vs-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
