Search⌘ K
AI Features

Event Integration with Notification Events and State Transfer

Explore how notification events and event-carried state transfer can be used to integrate asynchronous communication in Golang. Understand the trade-offs between notifications that require callbacks and state transfer that enables temporal decoupling. Learn strategies to optimize data transfer, avoid data loss, and handle retries for scalable, resilient event-driven systems.

Integration with notification events

A notification event is going to be the smallest event we can send. We might send a notification because the volume of the event is very high or we might send one because the size of the data related to the change is too large.

Some examples of when to use a notification are presented here:

  • New media has been uploaded or has become available. Serializing the file content into an event is not likely to be practical or performant.

  • With events related to time-series data or other tracking events that have a very high volume or rate.

  • Following edits to a large create, read, update, delete (CRUD) resource. Instead of sending the entire updated resource, we might send a list of updated fields only.

When we use notifications, we expect the interested consumers to eventually make a call back to us to retrieve more information, as depicted in the following diagram:

Notifications and the resulting callbacks
Notifications and the resulting callbacks
...