# System State Store

#### Event Store

<figure><img src="https://3512123521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTdWWm782uxBjp7snBdDU%2Fuploads%2F89U1TpoD7O5m7vI5PgjF%2Fimage.png?alt=media&#x26;token=8385e022-963d-4a97-b289-8f6cd5b634e5" alt=""><figcaption><p>Event Store Section in System State Store</p></figcaption></figure>

The Event Store is an append-only log that records every change made to the system state. Each entry in the Event Store represents an event, capturing the details of the change that occurred.

**Event Details:**

* **Event Id:** A unique identifier for the event.
* **Name:** The type of event that occurred.
* **Aggregate Id:** The identifier of the aggregate associated with the event.
* **Context:** Additional context information related to the event.
* **Timestamp:** The time when the event occurred.

<figure><img src="https://3512123521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTdWWm782uxBjp7snBdDU%2Fuploads%2FfCtxu8uu6UVjttKrnlWL%2Fimage.png?alt=media&#x26;token=23ee67d1-04e1-44bf-897f-6574f08ff971" alt=""><figcaption><p>Event Detail</p></figcaption></figure>

By examining the Event Store, you can:

* **Trace System Evolution:** Follow the sequence of events to understand how the system has changed over time.
* **Debug Issues:** Analyze event history to pinpoint the root cause of problems.
* **Audit System Activity:** Review past events for compliance or regulatory purposes.

#### Snapshot Store

<figure><img src="https://3512123521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTdWWm782uxBjp7snBdDU%2Fuploads%2FpzFju2hF0erfoLpqsWEL%2Fimage.png?alt=media&#x26;token=3bcda4e0-e6b0-4749-a5b3-97e000e4e317" alt=""><figcaption></figcaption></figure>

The Snapshot Store contains periodic snapshots of the system's state. Snapshots are created to optimize performance by reducing the number of events that need to be processed to rebuild the current state.

<figure><img src="https://3512123521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTdWWm782uxBjp7snBdDU%2Fuploads%2F1U7fWaksk8QCnQqPY5lN%2Fimage.png?alt=media&#x26;token=4f636e6b-e202-4ded-8893-5531da37f2cb" alt=""><figcaption></figcaption></figure>

While the Event Store provides a complete and immutable record of system changes, the Snapshot Store offers a more efficient way to access the current state of specific aggregates.

**Note:** The Snapshot Store is typically used internally by the system and may not be directly accessible to users.

By understanding the relationship between the Event Store and the Snapshot Store, you can effectively navigate and analyze your system's state. The System State Store is a valuable tool for developers, system administrators, and auditors to gain insights into system behavior and performance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.eventoframework.com/evento-gui/system-state-store.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
