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

View documentation

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

View documentation

Python

Package: nolag (documented version 2.6.0). An asyncio client for Python 3.10+.

pip install nolag

View documentation

Go

Module: github.com/NoLagApp/go-sdk (documented version v0.5.0). Go 1.21+.

go get github.com/NoLagApp/go-sdk

View documentation

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 NativePythonGo
Tokenstring, or an async token providerstringstring
Client-token refreshautomatic, in place over the live socketnonenone
Reconnect schedule5 s, growing by 1.5x to 30 s, then gives up after 10 attemptsevery 5 s, 10 attempts (both configurable)every 5 s, 10 attempts (both configurable)
Subscriptions after a reconnectnot restored by the SDK: subscribe in the connect handlernot restored by the SDK: subscribe in the connect handlerre-subscribed by the SDK, without per-subscription options
Room presence after a reconnectnot re-sent: set it again in the connect handlerre-sent by the SDKnot re-sent: set it again in the connected handler
Subscribe and publish acknowledgementoptional callbackoptional callbacknone; broker errors arrive on OnError
Hydration eventfrom 1.14.0yesyes

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
SDKPackageWhat it does
Chat@nolag/chatMulti-room chat with presence and typing indicators
Collab@nolag/collabCollaborative editing: operations, cursors and awareness
Dash@nolag/dashLive dashboards: metrics, widgets and data streams
Feed@nolag/feedActivity feeds: posts, likes and comments
IoT@nolag/iotDevice telemetry and command dispatch
Notify@nolag/notifyNotifications with channels, read state and badge counts
Queue@nolag/queueJob queues with lifecycle and progress tracking
Signal@nolag/signalWebRTC signalling: peer discovery, offer, answer and ICE exchange
Stream@nolag/streamLive-stream engagement: comments, reactions and polls
Sync@nolag/syncDocument sync with versions and conflict resolution
Track@nolag/trackGPS 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.