# Symbio (Reactive Storage)

## What Is Symbio?

The idea behind the name "symbio" is that there is a symbiotic relationship between domain models and persistence, and persistence and domain models. They depend on each other, but in a way that neither "life form" may be entirely conscious of the other. This is certainly true of the domain model more so than the data model.

The XOOM Symbio parent tool is a set of protocols and default in-memory implementations. The protocols are usable by concrete implementations. The in-memory implementations are useful for testing.

There are three primary kinds of storage mechanism protocols available: `ObjectStore`, `StateStore` (i.e. Key-Value and NoSQL), and `Journal`. Among these there are a number of concrete implementations. For example, there are Postgres implementations of all three: `ObjectStore`, `StateStore`, and `Journal`.

{% hint style="info" %}
An important point to consider is, if you use the XOOM Lattice entity types, there is no need to learn the operations of the storage types. You get all storage persistence for free when you use one of `ObjectEntity`, `StatefulEntity`, and `EventSourced`.
{% endhint %}

Each storage type is discussed in the following subsections. Additionally there is a separate useful discussion about Adapters, which are used to translate between application or service state and persistent state.

| Type                                                | Description                                                                                                                                                                                                                                               |
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ObjectStore](/xoom-symbio/object-storage.md)       | <p></p><p>An object storage in which <code>StateObject</code> instances are self defined, including their identity. This is often thought of as object-relational mapping, which certainly can be and is supported, but is not limited to such.</p>       |
| [StateStore](/xoom-symbio/state-storage.md)         | The basic state storage protocol in which `StateObject` instances are persisted as key-value tuples, with CLOB/BLOB values. This is used as a NoSQL database, but may use an RDBMS as the storage engine.                                                 |
| [Journal](/xoom-symbio/sourcing-journal-storage.md) | Used within a Bounded Context (microservice) to store `DomainEvent` and `Command` instances. Each use of the `Journal` appends some number of `Entry` instances, which are serialized `DomainEvent` and `Command` instances, and perhaps State snapshots. |
| [Adapters](/xoom-symbio/adapters.md)                | Used to roundtrip translate between service/application state and storage state.                                                                                                                                                                          |


---

# 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.vlingo.io/xoom-symbio.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.
