Challenges: Inconsistencies & CAP Theorem

In this lesson, we'll discuss some challenges that may arise when using asynchronous microservices.

Old events #

If the communication infrastructure for event sourcing has to store old events, it has to handle considerable amounts of data. Consequently, if old events are missing, the state of a microservice can no longer be reconstructed from the events.

As an optimization, it would be possible to delete events that are no longer relevant. If a customer has moved to a different address several times, the last address is probably the only relevant one. The others can then be deleted.

In addition, it must also be possible to continue processing old events. If the schema of the events changes in the meantime, old events have to be migrated. Otherwise, every microservice has to be able to handle events in all old data formats.

This is particularly difficult if new data has to be contained in events that have not yet been saved in old events.

Get hands-on with 1200+ tech skills courses.