GES scavenging and the hidden cost of link events
Somewhere around a year ago, we started using GES in production as the primary data store of our new loyalty system. The system stores two types of data. External services push batches of dumb downed events to the loyalty system. For example: a user logged on, played a game or participated in a competition. These events are transient by nature. Once the loyalty system has processed them, they only need to be kept around for a few days. When these ingress events are processed, they go through a mini pipeline in which each event is assigned a specific weight, for then to be aggregated and translated to a command. This command awards a user with virtual currency to spend in the loyalty shop and a number of points contributing to a higher rank - unlocking more priviliges. The state machine that stores a user’s balance and points is backed by a stream which is stored indefinitely. Unless the user asks to be forgotten that is. As a rough estimate, for every 1000 ingress transient events, only 1 needs to be stored indefinitely as part of a state machine. ...