NdiClient. Every network method
returns a Promise, so the same client works for sequential calls, concurrent
batches, and server applications.
Basic usage
await for one operation and Promise utilities for concurrency.
Process documents concurrently
Share one client across tasks. Each operation creates its own job, and eachjobs.wait polls independently.
Limit concurrency
For large batches, use a small worker pool so your application does not submit every file at once.Handle partial batch failures
Promise.all rejects when one task rejects. Use Promise.allSettled when each
document should succeed or fail independently.
Client lifecycle
close() is currently a no-op because fetch has no client resource to
close. One NdiClient can be shared for the lifetime of an application.
When to use concurrency
Run concurrently
Independent documents, server request handlers, and batches where waiting
on one job should not block submission of another.
Run sequentially
One-off scripts or dependent operations where the next request needs the
previous result.