SDKs
Client libraries for talking to a kraken broker. They all speak the same MessagePack-over-WebSocket wire protocol, so a JavaScript browser client, a Python service and a Go worker can share the same topics.
Always pass the broker URL. Every SDK has a built-in default URL, and it points at the retired NoLag Cloud broker, which no longer answers. Pass the address of your own kraken in every client you create, for example ws://localhost:8080/ws for the quickstart.
Core SDKs
JavaScript / TypeScript
Package: @nolag/js-sdk. One package for browsers and Node.js 18+, with TypeScript definitions included. These docs cover 1.13.0 and 1.14.0; install the latest.
npm install @nolag/js-sdk
React Native
Package: @nolag/react-native. Bindings for the JavaScript SDK on React Native: AppState lifecycle, NetInfo reachability, token caching and text-codec polyfills.
npm install @nolag/react-native @nolag/js-sdk
Python
Package: nolag (documented version 2.6.0). An asyncio client for Python 3.10+.
pip install nolag
Go
Module: github.com/NoLagApp/go-sdk (documented version v0.5.0). Go 1.21+.
go get github.com/NoLagApp/go-sdk
How the core SDKs differ
The four SDKs share one protocol, but they do not behave identically around reconnects and presence. The details are on each page; this is the short version.
| JavaScript / React Native | Python | Go | |
|---|---|---|---|
| Token | string, or an async token provider | string | string |
| Client-token refresh | automatic, in place over the live socket | none | none |
| Reconnect schedule | 5 s, growing by 1.5x to 30 s, then gives up after 10 attempts | every 5 s, 10 attempts (both configurable) | every 5 s, 10 attempts (both configurable) |
| Subscriptions after a reconnect | not restored by the SDK: subscribe in the connect handler | not restored by the SDK: subscribe in the connect handler | re-subscribed by the SDK, without per-subscription options |
| Room presence after a reconnect | not re-sent: set it again in the connect handler | re-sent by the SDK | not re-sent: set it again in the connected handler |
| Subscribe and publish acknowledgement | optional callback | optional callback | none; broker errors arrive on OnError |
| Hydration event | from 1.14.0 | yes | yes |
kraken v0.9.0 also opens an MQTT listener on port 1883, but it accepts no connections in this release, so devices need one of the SDKs above (or the wire protocol) for now. See Production checklist.
Blueprint SDKs
Domain-specific wrappers built on @nolag/js-sdk. Each one attaches to a core client you create and own, and adds a purpose-built API on top of a fixed set of topics:
npm install @nolag/chat @nolag/js-sdk
| SDK | Package | What it does |
|---|---|---|
| Chat | @nolag/chat | Multi-room chat with presence and typing indicators |
| Collab | @nolag/collab | Collaborative editing: operations, cursors and awareness |
| Dash | @nolag/dash | Live dashboards: metrics, widgets and data streams |
| Feed | @nolag/feed | Activity feeds: posts, likes and comments |
| IoT | @nolag/iot | Device telemetry and command dispatch |
| Notify | @nolag/notify | Notifications with channels, read state and badge counts |
| Queue | @nolag/queue | Job queues with lifecycle and progress tracking |
| Signal | @nolag/signal | WebRTC signalling: peer discovery, offer, answer and ICE exchange |
| Stream | @nolag/stream | Live-stream engagement: comments, reactions and polls |
| Sync | @nolag/sync | Document sync with versions and conflict resolution |
| Track | @nolag/track | GPS tracking of vehicles and assets, with geofencing |
Every Blueprint SDK peer-depends on @nolag/js-sdk 1.12.0 or later. Each page lists the topics, rooms and lobbies the wrapper expects you to grant. Start at the Blueprint SDKs overview.
Licences
The client SDKs and the Blueprint SDKs are MIT licensed. The kraken broker and the optional @nolag/core authorization library are Apache-2.0.