LaserData Cloud
Laser SDK

Laser Stack

Run Iggy and laser-plane locally, then connect the SDK and test managed operations

Laser Stack starts the Iggy fork and laser-plane for local SDK development. It waits for both services and prints a connection string. Use it for projections, queries, change feeds, key-value storage, forks, graph, managed permissions, and runs.

Standalone Iggy supports streaming and agent services built on the log. Managed APIs also need laser-plane.

Requirements

Prepare these before starting:

  • Docker Engine 25 or a current Docker Desktop.
  • Docker Compose v2.20 or later.
  • A 64-bit amd64 or arm64 system. Published images also support Apple Silicon.

Start the stack

git clone https://github.com/laserdata/laser-stack
cd laser-stack
./scripts/up

The first run creates .env with mode 600, which limits access to its owner. It pulls published images when available and starts both services. After Iggy is healthy and the plane is ready, it prints:

export LASER_CONNECTION_STRING='iggy:laser@127.0.0.1:8090'

Use the printed value. Credentials default to iggy:laser. For a new data volume, ./scripts/up --random-password generates a password.

Test the managed request path:

./scripts/smoke

The smoke test installs the published TypeScript SDK selected by LASER_SDK_VERSION in a Node.js container. It tests Iggy TCP health and authenticated AGDX readiness, then writes and reads managed key-value data through Iggy and laser-plane.

If the registry is unavailable, later runs use cached images. Without a published or cached image, the script builds from signed binaries. Default listeners bind to 127.0.0.1 and are unreachable from other machines.

What runs

ServiceRoleLocal endpoint
LaserData Apache Iggy forkDurable log, authentication, and managed-command forwardingTCP 127.0.0.1:8090, HTTP 127.0.0.1:3000
laser-plane sidecarProjection, query, state, graph, change-feed, authorization, and run read modelsInternal Unix socket shared with Iggy

Iggy stores the durable log. laser-plane consumes control and data records, maintains queryable views, and handles managed operations. Applications use one SDK connection for both.

Separate Docker volumes hold Iggy and plane data. ./scripts/down preserves them. Do not run ./scripts/reset unless you intend to delete them.

Stack configuration

.env.example records component versions. LASER_IGGY_VERSION and LASER_PLANE_VERSION select binaries for ./scripts/up --build. LASER_SDK_VERSION selects the smoke-test package.

Iggy transport

All three SDKs use Iggy's native connection. Streaming, managed reads, and replicated authorization writes share it. The server selects each operation's execution path. AGDX defines the messages carried over that connection.

Connect every client

Export the value from ./scripts/up, then connect in your language:

import { Laser } from "@laserdata/laser-sdk"

await using laser = await Laser.connectEnv()
use laser_sdk::prelude::*;

let laser = Laser::connect_env().await?;
import os
import laser_sdk as ls

laser = await ls.Laser.connect(
    os.environ["LASER_CONNECTION_STRING"],
    stream=os.environ.get("LASER_STREAM"),
)

Rust and TypeScript provide connect_env and connectEnv. Python uses Laser.connect with environment values supplied directly.

Run the SDK examples

The laser-sdk examples cover the same operations in each language. query uses both Iggy and laser-plane.

The Rust workspace manifest declares its minimum Rust version. Python requires 3.10 or later and uses uv in the example setup. TypeScript requires Node.js 22.14 or later.

git clone https://github.com/laserdata/laser-sdk

From the directory containing the SDK checkout, run the command for your client:

cd laser-sdk/examples/typescript
npm run setup
npm run example:query
cd laser-sdk/examples/rust
cargo run --example query

Published package:

cd laser-sdk/examples/python
uv venv
uv pip install laser-sdk
uv run python query.py

Local checkout:

cd laser-sdk/examples/python
uv sync --project ../../foreign/python --locked --extra testing
uv run --project ../../foreign/python python query.py

After cloning TypeScript examples, run npm run setup once. Each npm run example:<name> rebuilds before execution. Both Python paths use uv and do not require pip in /usr/bin/python3.

Focused examples include log, watch, kv, graph, recall, context, and agent. Larger examples include native-streaming, event-analytics, order-book, firehose, concierge, memory, interop, orchestra, and governance.

Rust and TypeScript use hyphenated names. Python filenames use underscores, such as event_analytics.py. All examples read the same environment variables.

Stack commands

CommandAction
./scripts/upStart detached and wait for health
./scripts/up --foregroundRun attached until Ctrl-C
./scripts/up --buildBuild images from signed, pinned binaries
./scripts/up --random-passwordGenerate random credentials for a new data volume
./scripts/smokeCheck health, readiness, AGDX capabilities, and a managed SDK KV round trip
./scripts/logs [service]Follow all logs or one service
./scripts/downStop services and keep data
./scripts/resetStop services and delete this stack's data
./scripts/reset --yesReset without a prompt

See the Laser Stack README for version overrides, image signatures, local TLS, and troubleshooting.

Smoke configuration

The smoke test reads LASER_SDK_VERSION from .env. LASER_SMOKE_TIMEOUT defaults to 300 seconds. LASER_SMOKE_NODE_IMAGE selects the pinned Node.js image.

To test another npm specification or local .tgz, set LASER_SMOKE_SDK_SPEC in the process environment:

LASER_SMOKE_SDK_SPEC=/path/to/laser-sdk.tgz ./scripts/smoke

This leaves .env unchanged.

Choose a target

TargetStreaming and log-backed agentsManaged data surfaces
Laser StackYesYes, locally through laser-plane
LaserData CloudYesYes, managed
Standalone Apache IggyYesNo, unless a compatible managed backend is attached

Change LASER_CONNECTION_STRING for the target. The API stays the same. Read laser.capabilities() before using optional managed features.

On this page