How hussein-awala/async-batcher works
AsyncBatcher is an async Python library that collects concurrent requests into bounded batches and routes each result back to its caller. The main flow is request submission, queue admission and batch dispatch, backend processing, then per-request outcomes; bounded maps, grouped batching and coalescing extend how work is submitted. Adapters cover databases, streams, messaging, vector storage and prediction models. The graph reflects README capabilities and shown source/index relationships; unsampled subsystem links are omitted or marked unverified rather than inferred from names.
Main entry points: batcher.py Batch dispatcher · aws AWS stream adapters · grouped.py Grouped batching · coalescing.py In-flight coalescing
Components 17
Batching core
- Batch dispatcher
async_batcher/batcher.py - Batch options
async_batcher/_options.py - Core errors
async_batcher/exceptions.py - Callable wrapper
async_batcher/callable.py
Submission patterns
- Bounded maps
async_batcher/map.py - Grouped batching
async_batcher/grouped.py - In-flight coalescing
async_batcher/coalescing.py
Backend adapters
- DynamoDB adapter
async_batcher/aws/dynamodb - AWS stream adapters
async_batcher/aws - Kafka producer
async_batcher/kafka/producer.py - SQLAlchemy adapter
async_batcher/sqlalchemy/write.py - ScyllaDB adapter
async_batcher/scylladb/update.py - MongoDB adapter
async_batcher/mongodb/write.py - Pinecone vectors
async_batcher/pinecone/vectors.py - Prediction models
async_batcher/ml
Operations
- Batch telemetry
async_batcher/observability.py
Other components
- Async callers
Connections 20
- Async callers → Batch dispatcher: submits requests
README.md - Batch dispatcher → Callable wrapper: creates wrapper
async_batcher/batcher.py - Batch dispatcher → Bounded maps: uses mapping
async_batcher/batcher.py - Batch dispatcher → Batch options: uses options
async_batcher/batcher.py - Batch dispatcher → Batch telemetry: emits events
async_batcher/batcher.py - Batch dispatcher → Core errors: raises errors
async_batcher/batcher.py - Async callers → Bounded maps: streams inputs
README.md - Async callers → Grouped batching: groups requests
README.md - Async callers → In-flight coalescing: shares requests
README.md - Grouped batching → Batch dispatcher: owns batchers
async_batcher/grouped.py - In-flight coalescing → Batch dispatcher: submits work
async_batcher/coalescing.py - AWS stream adapters → Batch dispatcher: extends batching
async_batcher/aws/kinesis/write.py - AWS stream adapters → AWS stream adapters: splits and retries
async_batcher/aws/kinesis/write.py - DynamoDB adapter → Batch dispatcher: extends batching
async_batcher/aws/dynamodb/get.py - Kafka producer → Batch dispatcher: extends batching
async_batcher/kafka/producer.py - SQLAlchemy adapter → Batch dispatcher: extends batching
async_batcher/sqlalchemy/write.py - ScyllaDB adapter → Batch dispatcher: extends batching
async_batcher/scylladb/update.py - MongoDB adapter → Batch dispatcher: extends batching
async_batcher/mongodb/write.py - Pinecone vectors → Batch dispatcher: extends batching
async_batcher/pinecone/vectors.py - Prediction models → Batch dispatcher: extends batching
async_batcher/ml/sklearn/model.py