Expand description
Comprehensive batch processing engine for OxiMedia
This crate provides a production-ready batch processing system with:
- Job queuing and scheduling
- Worker pool management
- Template-based configuration
- Watch folder automation
- Distributed processing support
- REST API and CLI interfaces
Re-exports§
pub use error::BatchError;pub use error::Result;pub use job::BatchJob;pub use job::BatchOperation;pub use job::InputSpec;pub use job::OutputSpec;pub use types::JobId;pub use types::JobState;pub use types::Priority;pub use types::RetryPolicy;
Modules§
- audit_
log - Immutable append-only audit trail for all job lifecycle events. Audit log: track who submitted, modified, and cancelled each job.
- batch_
analytics - Per-job and fleet-wide batch analytics: throughput, latency, error rates. Batch analytics — run-time trend analysis, failure rates, throughput metrics, and SLA monitoring for batch processing workloads.
- batch_
report - Batch job reporting and summary aggregation.
- batch_
runner - Batch job runner: configuration, item tracking, and run-level statistics.
- batch_
schedule - Batch scheduling — schedule types, individual schedules, and a scheduler registry.
- chaining
- Job chaining: define DAG-like sequential/parallel chains between jobs. Job chaining — dependency-aware sequential job dispatch.
- checkpoint
- Durable checkpoint persistence for mid-job progress and crash recovery. Periodic state checkpointing for crash recovery.
- checkpointing
- Job checkpointing: save and restore execution state for resume-on-failure.
- cluster_
discovery - Cluster-member discovery and heartbeat tracking for distributed workers. Cluster discovery for auto-detecting batch workers on the network.
- conditional_
dag - Conditional DAG with result-based branch routing.
- cost_
estimator - CPU/GPU/IO cost estimation for job admission control and resource planning. Cost estimator: predict job duration and resource usage from historical data.
- dead_
letter_ queue - Dead-letter queue for failed jobs with replay and quarantine support. Dead letter queue for permanently failed jobs.
- dep_
graph - Simple dependency graph for batch jobs using numeric IDs.
- dependency
- Job dependency graph with topological sort and cycle detection.
- error
- Error types for batch processing
- error_
recovery - Error recovery strategies: retry with backoff, circuit breaker, fallback. Batch error recovery policy.
- fair_
scheduler - Fair scheduler: prevent starvation of low-priority jobs.
- graceful_
shutdown - Graceful shutdown coordinator: drain window, force-cancel, status reporting.
Graceful shutdown for
BatchEngine. - job
- Job definition and configuration
- job_
archive - Archive completed batch jobs for historical querying and analytics.
- job_
deps - Job dependency tracker: declarative
before/afterconstraint resolution. Job dependency chaining with topological sort and cycle detection. - job_
migration - Job migration: upgrade job schemas when template format changes.
- job_
splitting - Job splitting: automatically partition large transcode jobs across workers.
- metrics
- Prometheus metrics integration
- monitoring
- Monitoring and progress tracking
- notification_
hub - Notification hub: fan-out job events to webhooks, email, and Slack. Batch notification hub — webhook callbacks, email notification specs, and notification deduplication.
- notifications
- Notification system for job events
- operations
- Batch operation implementations
- output_
collector - Output collection — gather, classify, and summarise task output entries.
- pipeline_
validator - Validate batch pipeline configurations before execution.
- presets
- Job presets and templates
- priority_
queue - Priority-aware job queue backed by a binary max-heap.
- processor
- Generic
BatchJob<T>,BatchQueue,JobExecutor,TranscodeJobSpec,BatchProcessor, andJobStats. - progress_
agg - Progress aggregator: roll up subtask progress into parent-job percentage. Batch-level progress aggregation.
- progress_
tracker - Progress tracking for batch jobs.
- queue
- Job queue implementation
- quota
- Quota definition types: resource ceilings and usage counters. Resource quota management for batch processing.
- quota_
enforcer - Quota enforcer: per-user/team hard limits on concurrent and total jobs. Quota enforcement — per-user/tenant job limits, storage quotas, CPU hour budgets, and violation handling.
- rate_
limiter - Rate limiting primitives for batch processing pipelines.
- resource_
estimator - Resource estimation for batch processing jobs.
- resource_
reservation - Resource reservation: pre-allocate GPU/CPU cores for high-priority jobs.
- retry_
policy - Retry policies and tracking for batch job execution.
- task_
group - Task group management — group policies, task collections, and aggregate results.
- template
- Template system for dynamic file naming and configuration
- throttle
- Rate throttling for batch job execution.
- timeout_
enforcer - Per-job timeout tracking and enforcement.
- types
- Core types for batch processing
- utils
- Utility functions and helpers for batch processing
- work_
stealing - Work-stealing scheduler for load balancing across workers.
Structs§
- Shutdown
Config - Configuration for graceful shutdown of [
BatchEngine]. - Shutdown
Flag - Shared shutdown flag — stored as an
AtomicU8to allow lock-free reads. - Shutdown
Report - Summary returned by [
BatchEngine::request_shutdown].
Enums§
- Shutdown
State - Shutdown progression state.