Asynchronous input processing with synchronous result

Previous Next

In asynchronous input processing, the input is stored in a queue table when it arrives and a separate queuing service will pick it up for processing. As part of this processing, a response is sent immediately if necessary.

 

When to consider

This pattern is a good choice when:

Events have a high frequency and cannot be processed one-by-one, or:

The processing of an event requires a lot of resources, or:

The processing of an event takes much time.

Advantages

Scalable in time. If the number of events grows in time, events may be processed in parallel for a better overall performance.

Tolerant to failure in that this pattern allows fault isolation: if the processing service fails, the receiving service is still available.

Disadvantages

More difficult to write and understand than synchronous input processing.

Often more complex to deploy.

Testing is more complex and may require more time and resources.

Monitoring of the system in the production environment is required.

Cannot guarantee the delivery of output events (this can be achieved by using an asynchronous result).

 

See also

Synchronous input processing with synchronous result

Synchronous input processing with asynchronous result

Asynchronous input processing with asynchronous result

 

 

SD_clip0021