In the context of web apps, I'm trying to get my head around how an event sourcing architecture communicates to services. First, I thought of services constantly polling the event store, but then, that might cause performance issues. Now I'm thinking of using notifications (e.g.,
AWS SNS) instead. Is this a viable/acceptable process? Simplified E.g.,
$orderId = $salesService->placeOrder($orderData)
7-8 should be atomic.
In the event that
7-8 fails, a "PROCESS_FAILED" event will be saved in the event store. Then a background process will periodically retry failed tasks to an certain extent.
Is this a viable/acceptable process or is there a better way?