Batch Processing Component
Requests are delayed until environmental conditions make their processing feasible.
How can asynchronous processing requests be delayed to be handled when conditions for their processing are optimal? |
Context
Distributed Applications assing processing functionality to different components to them independently. If such Processing Components are accessed asynchronously, certain conditions may make it unfeasible to process the requests immediately: seldom accesses to processing functionality, powerful Processing Component instances accessed continuously, and environmental conditions, such as resource costs.
Solution
Asynchronous processing requests are accepted at all times, but stored them until conditions are optimal for their processing. Based on the number of stored requests, environmental conditions, and custom rules, components are instantiated to handle the requests. Requests are only processed under non-optimal conditions if they cannot be delayed any longer.
Related Patterns
Message-oriented Middleware, Elastic Queue, Multi-Component Image, Idempotent Processor, Transaction-based Processor, Timeout-based Message Processor