Skip to main content

Event Store Management

In Thalo, the management of events is a process handled efficiently and seamlessly by the runtime, using Sled as the embedded event store. This section provides an overview of this automated event management system.

Automated Event Persistence

Thalo's runtime automates the persistence of events generated by aggregates. This involves storing each event in the Sled database as it occurs, ensuring data integrity and reliability.

Efficient Event Retrieval

The runtime also manages the retrieval of events. When an aggregate state needs to be rebuilt, Thalo efficiently fetches the relevant events from the store, reconstructing the aggregate's state without developer intervention.

Thalo uses LRU cache to store the state of recently accessed aggregates without having to rebuild them each time. This can be configured with the --cache-size flag in the thalo runtime.