Expand description

A Tower middleware that provides a buffered mpsc for processing requests in batches.

Writing data in bulk is a common technique for improving the efficiency of certain tasks. batch-tower is a middleware that allows you to buffer requests for batch processing until the buffer reaches a maximum size OR a maximum duration elapses.

Clients enqueue requests by sending on the channel from any of the handles (Batch), and the single service running elsewhere (usually spawned) receives and collects the requests wrapped in Item(R). Once the Batch) buffer is full or the maximum duration elapses, the service is instructed to write the data with a Flush request. Upon completion of the flush operation, the client’s will receive a response with the outcome.

Modules

Error types for the Batch middleware.

Future types for the Batch middleware.

Structs

Allows batch processing of requests.

Adds a layer performing batch processing of requests.

Enums

Signaling mechanism for services that allow processing in batches.

Type Definitions

Export tower’s alias for a type-erased error type. Alias for a type-erased error type.