Consider the following scenario from LMAX Architecture description from Martin Fowler:
I'll use a simple non-LMAX example to illustrate. Imagine you are making an order for jelly beans by credit card. <...>
In the LMAX architecture, you would split this operation into two. The first operation would capture the order information and finish by outputting an event (credit card validation requested) to the credit card company. The Business Logic Processor would then carry on processing events for other customers until it received a credit-card-validated event in its input event stream. On processing that event it would carry out the confirmation tasks for that order.
So the order is held in-memory until the result of payment processing is received.
Now let us assume instead of credit card processing step, we have step that takes much more time, for example: we need to perform an inventory check, where somebody has to physically verify we have the particular flavor of jelly bean that has been ordered. This might take an hour.
If this is the case, will not lead to a growth of the data held in-memory because potentially a lot of orders will be awaiting the inventory status updated event?
Possibly in such a scenario, we need to remove the order from memory and include it as part of the output event, an external system (inventory) is responsible for generating another input event which includes the order detail.
The problem I see with this approach, we cannot include inventory as part of the business logic processor.
Thoughts about how do we address this?