Automatic batching
Calls queued in the same microtask are grouped.Promise.all is the normal way to create a batch:
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.
Small objects
UseputObject() when text or base64 data comfortably fits the runtime batch:
Large uploads with explicit parts
For data generated by the application, anincremental 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.
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.
Direct browser or Node upload
ChooseuploadMode: 'direct' when bytes should travel through the managed upload URL rather than through SDK JSON calls:
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:- request bounded pages rather than one unbounded result;
- use a stable unique sort key;
- advance pagination only when the previous page made progress;
- use a snapshot/version filter if the source can change during export;
- generate the file locally in Node.js, then upload it through a session.
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.
