The Oda Remote API

The Oda client drives a running DataMind Oda through its Remote layer: unary calls, long-lived streams and forwarded events travel between the interface you see and the runtime behind it. This page documents the message shapes and rules, so you can read a trace, debug a connection or build a client of your own.

For the different surface that lets a program of your own drive Oda from outside the app, start at the Oda SDK overview.

Calls and streams

On a stream, each side sends a small set of frames:

FromFrameWhat it does
ClientopenOpens a logical stream, naming the method it calls and its arguments.
ClientitemSends one uplink item; its value may be omitted.
ClientendHalf-closes the uplink: no further items follow.
ClientcancelThe consumer has left; the stream is torn down.
RuntimeitemDelivers one downlink value.
RuntimeerrorEnds the stream with a failure: a code, a message and details.
RuntimeendEnds the stream normally.

Forwarded events

Limits

Close codes

A connection ends with a close code and, usually, a reason:

CodeReasonWhat it means
1000disposedThe client was disposed; the connection is closed for good.
1001peer leftThe peer's session ended, and its streams close with it.
1003text messages requiredA binary message arrived; the connection carries text only.
1008invalid Remote stream requestA malformed message, an unknown message type, or a duplicate open.
1011Remote stream failure could not be deliveredA stream failed and its failure could not be written, so the connection closed.
4000reconnect requestedThe client is making a fresh connection attempt.
4002an invalid frameA frame did not parse; every active stream fails and the connection closes.

When a call or stream fails

Questions, answered

What happens to my frames when the connection drops?

Nothing is replayed. When the client reconnects, each stream reopens on the new connection and re-reads the state it needs; uplink items and notifications from the old connection are never sent again.

Why did the connection close with code 1008?

The reason invalid Remote stream request covers a malformed message, an unknown message type, or a second open for a stream id that is already open. Check the frames against the shapes on this page; a duplicate open is the one violation that closes the whole connection.

Why was my uplink item not lossless JSON?

The value used something the JSON subset does not admit, such as an undefined field, a big integer, NaN, an infinity, negative zero, a cycle, a class instance, or an accessor, hidden or symbol field. Send plain objects, dense arrays and ordinary JSON values instead.

Can two consumers watch the same stream?

No. A logical stream serves exactly one consumer, and opening a second one fails. When several parts of the interface need the same data, the client shares one stream between them instead of opening another.

How long may the connection stay silent?

It is pinged every two seconds by default, and that interval is also the deadline for the answer. A peer that misses two intervals in a row loses the connection; the interval is a deployment setting, so it can be raised where the default is too quick for the machines involved.

How much can a stream's uplink hold?

262,144 bytes of frames by default. Over that, the stream fails with gateway/uplink-overflow and later items are dropped. Uplink items are never replayed, so anything that did not get through is lost.

Are forwarded events replayed after a reconnect?

One-way events are not: a notification missed while disconnected is gone. A request that is still waiting for an answer is different; it is sent again to the replacement connection so it can still be answered.

Which events can the client subscribe to?

A fixed list, twenty-five entries in the current set: session changes (added, removed, status, activity, branches and errors), preset selection, goal activation changes, model adapter updates, permission catalogue changes, scheduled-task changes, settings updates, and the client's own components (commands, credentials and plugins). An approval request and a user question are on the list as requests. A name outside the list is never forwarded.

What error does an aborted call settle as?

A cancelled failure, not a failure from the method: the message reads Remote invocation "<endpoint>" was aborted, and nothing further is kept for the answer.

How is the Remote API different from the Oda SDK?

They are different surfaces. The Remote layer connects the Oda client's own interface to the runtime it drives, as this page describes. The SDK is for a program of your own: a client process talks to a runtime over standard input and output, with the messages in the SDK wire protocol. Start from the Oda SDK overview, or read Automation clients for the serving profiles.