SDK versus REST and Async Client
atomic-noteD2 · 33.1%Section: D2 Applications & IntegrationUpdated 2026-11-15
Official SDKs wrap REST transport, serialization and some retry/error behavior. Raw HTTP gives explicit protocol control but increases integration work.
Blueprint area: D2 - Applications and Integration MOC (official domain weight 33.1%).
Engineering principles
- Prefer a supported SDK when its features, instrumentation and platform constraints match the service; verify SDK compatibility with needed API features.
- Choose synchronous waiting for straightforward low-concurrency workflows, async clients for many concurrent I/O-bound requests, and streaming for progressive user output.
- Concurrency is not the same as batch processing: async requests still use real-time request semantics and limits.
- Wrap client use in an application adapter so the domain remains independent of vendor request DTOs and status details.
Failure modes
- An unbounded task pool can overwhelm rate limits despite async I/O.
- Version upgrades can change defaults; pin and test SDK and model behavior.
Check your understanding
- ☐ Which request-specific and global timeouts are enforced?
- ☐ Can an adapter be swapped for a deterministic test fake?
Related knowledge
Batch Processing and High-Volume Work · Retries Timeouts and Idempotency · Exam Blueprint and Coverage
Evidence and verification
- Provenance: author-written engineering synthesis aligned to exam guide objectives; this is not a transcript or hidden Skilljar lesson.
- Primary references:
- Check currency: model options, pricing, API flags, release-specific behavior and runtime permissions can change after the source was read. See Source Register.