LaserData Cloud
Laser SDK

Managed Data

Understand managed backend readiness, indexes, destinations, typed results, and recovery

Streaming and managed data share one authenticated Iggy connection. Iggy forwards managed reads to laser-plane, while projection and binding changes enter the control log. The backend announcement states which operations the deployment can serve.

Laser Stack runs both services locally.

Backend Readiness

A backend descriptor names a resource, generation, capabilities, and readiness state. A running process can still be replaying or restoring data. Managed operations remain unavailable until that backend reports ready.

After startup or recovery, use capability refresh or a bounded readiness wait. Inspect the required feature separately. Query support does not imply fenced leases, destinations, or every consistency level.

Operational backends can use embedded storage, VeloDB, or PostgreSQL. The deployment descriptor reports actual support. Destination types in the protocol do not guarantee an implementation in every backend.

Operational Indexes

A projection defines extracted fields. Its binding selects a source and index. An optional backend pins a resource ID and generation. Without it, the binding uses replica-local operational storage.

{
  "source": { "stream": "shop", "topic": "orders" },
  "allowed_projections": ["orders_v1.v1"],
  "default_projection": "orders_v1.v1",
  "index": "orders_v1",
  "notify": true
}

Python and the protocol use this serialized form. TypeScript uses camelCase fields. Rust uses ProjectionBinding::builder().source(...).index(...). See Views for registration examples.

Destinations and Query Routes

A destination declares its identity, generation, projection, source scope, and physical table independently. Its checkpoints record ownership, prepared and completed attempts, repairs, and retention gaps.

Queries select an operational index, destination, or query route explicitly. Each route identifies the destination generation that it serves. Generations and source incarnations distinguish recreated tables or topics from older resources with the same names.

laser.destinations() provides advertised destination and checkpoint operations. Mutations include the expected global state revision and operation-specific revisions. After a conflict, read current state before another change. Lease acquisition and checkpoint ownership have different rules from ordinary key-value writes.

Source retention can remove records before a destination consumes them. A recorded retention gap blocks progress until repair or an explicit decision. It must not count as successful ingestion.

Typed Query Results

Results contain fields, rows, page, and context. Row values follow field order. Logical types distinguish integers, decimals, timestamps, binary values, and nulls.

LanguageAccess a field
Rustresult.value(row, "total") or result.value_text(row, "total")
TypeScriptqueryResultValue(result, row, "total")
Pythonresult.value_text(row, "total")

Use typed accessors for application logic and text accessors for display. The client rejects rows whose shape or types disagree with the declared schema.

Retry and Recovery

Managed mutations carry identity and replay information for recovery. A lost reply does not prove failure. Retry behavior is operation-specific, and lease acquisition is not replayed automatically.

Revocable leases identify a holder and fencing token. Before planning a protected write, wait for a read that includes the lease's commit position. Renewal keeps the token, while release revokes it immediately. See State.

On this page