Skip to main content
The SDK batches remote calls for throughput, but batching is not a transaction. Use Storage upload sessions when bytes are too large for the JSON runtime batch.

Automatic batching

Calls queued in the same microtask are grouped. Promise.all is the normal way to create a batch:
Sequential awaits naturally dispatch separate batches:
Configure batching before the first remote dispatch:
The SDK defaults to 32 calls, 256 KiB per request, four in-flight batches, and 1,024 queued calls. Client configuration can only lower platform ceilings. The current server envelope allows up to 64 calls, a 1 MiB request, and a 4 MiB response.
Runtime batches are never retried automatically because they can contain mutations. A transport interruption after dispatch produces an indeterminate result; inspect durable state before retrying.

Small objects

Use putObject() when text or base64 data comfortably fits the runtime batch:
Binary data must be base64-encoded when sent through this JSON path.

Large uploads with explicit parts

For data generated by the application, an incremental session gives each appended part the next number. Upload calls carry small text or base64 chunks through the SDK, while the durable entry appears only at finalization.
For chunked, pass an explicit positive partNumber; re-uploading that number repairs a part. For incremental, omit the number during normal appends but you may still provide one to repair a known part. getUploadSession() exposes the manifest, uploaded bytes, part count, and next number. An active session has a lease: call extendUploadSession() while a long-running producer is still making progress.
Finalization is the durable boundary. A part acknowledged by uploadPart() is not yet a readable Storage entry and must not trigger downstream processing.

Direct browser or Node upload

Choose uploadMode: 'direct' when bytes should travel through the managed upload URL rather than through SDK JSON calls:
The platform’s managed completion flow finalizes a successful direct upload. Do not call finalization merely because fetch() returned success, and do not infer durable completion from the byte-transfer response alone. Poll the session or react to the resulting Storage event. When an instance returns another upload strategy, follow that strategy and its public completion contract. Upload URLs and headers are temporary credentials. Do not log, persist, or pass them to another principal. If byte transfer fails before completion, abort the active session as a best-effort cleanup.

Read large text in batches

Text statistics record detected encoding, separator, total line count, batch size, batch count, and the byte-offset map used for bounded reads.
batchNumber is one-based. A batch is a bounded line window backed by cached statistics; it is unrelated to SDK request batching. If statistics are missing, getFileData() can build them before reading. Use reloadStats: true only when the cached mapping must be recomputed. For binary data, getFileData() returns base64. Direct reads are limited to 10 MiB; use buffer: true with an explicit byte start and end for a bounded range.

Large data exports

When exporting database rows:
  1. request bounded pages rather than one unbounded result;
  2. use a stable unique sort key;
  3. advance pagination only when the previous page made progress;
  4. use a snapshot/version filter if the source can change during export;
  5. generate the file locally in Node.js, then upload it through a session.
For an HTTP source that already exposes a stream, a RevoEngine Component can instead use api.httpCall({ ... }, { responseType: 'stream', target: { ... } }) so the response is finalized directly into Storage. Callback-based transaction compatibility APIs are intentionally not part of the public SDK. If several remote operations require atomicity, implement that boundary in one RevoEngine component or library where the database transaction context exists. See Storage operations, HTTP and Storage, and the generated Storage method reference.
Last modified on September 5, 2026