# Lattice

## Feature Overview

The XOOM Lattice component provides tooling for reactive Domain-Driven Design projects that are highly concurrent. The tools of the component include compute grid, actor caching, spaces, cross-node cluster messaging, publish-subscribe, CQRS, and Event Sourcing support.

| Feature                                                                          | Description                                                                                                                                                                                                                                                                                                                             |
| -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CQRS](/xoom-lattice/cqrs.md)                                                    | Understanding the Command-Query Responsibility Segregation pattern.                                                                                                                                                                                                                                                                     |
| [Object, Stateful, and Sourced Entities with CQRS](/xoom-lattice/entity-cqrs.md) | <p>Supports three styles of persistence, including Object, Stateful, and Sourced.</p><p></p><p>Command-Query Responsibility Segregation uses two models per Bounded Context (application or service), the Command Model and the Query Model, otherwise known as the Read Model and the Write Model, respectively.</p>                   |
| [Grid](/xoom-lattice/grid.md)                                                    | Provides an API for distributed computations and data processing across multiple nodes in a cluster. Supports distributed parallel processing by sending computational execution requests to actors on any node in a cluster with the potential to receive results in return.                                                           |
| [Exchange](/xoom-lattice/exchange.md)                                            | Provides an abstraction over Publish-Subscribe messaging exchanges or topics. This is a means to publish messages to exchanges/topics inside or outside your current application/service, and to subscribe to such messages. Provides translators from internal to external message types, and from external to internal message types. |
| [Processes](/xoom-lattice/processes.md)                                          | Long-running processes that manage complex, coarse-grained, business transactions, must be managed through every step until completion. These tools assist in managing such processes whether by means of object persistence, stateful command models, or sourced with commands.                                                        |
| [Projections](https://docs.vlingo.io/vlingo-lattice/projections)                 | How to project state, Domain Events, and other Source types into a CQRS Query Model.                                                                                                                                                                                                                                                    |
| [Routers](/xoom-lattice/routers.md)                                              | Use message-driven command routing to handlers that are responsible for modifying the domain model, which may be segregated as a Command Model.                                                                                                                                                                                         |

## Types

The following types are defined in the XOOM Lattice component and commonly used with domain-driven designed services.

| Type                    | Descriptio                                                                                                                                                                               |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DomainEvent`           | A abstract type used to model a record of fact about an important business occurrence in the domain model                                                                                |
| `IdentifiedDomainEvent` | A abstract type used to model a record of fact about an important business occurrence in the domain model and that has an identity associated with it, which can be used for correlation |
| `EventSourced`          | An abstract type used to create an Event Sourced entity that is backed by a persistent Journal                                                                                           |
| `Command`               | An abstract type used to model a record of an imperative directive to carry out a business operation                                                                                     |
| `CommandSourced`        | An abstract type used to create an Command Sourced entity                                                                                                                                |
| `ObjectEntity`          | An abstract type used to model an entity that is backed by object-relational persistence                                                                                                 |
| `StatefulEntity`        | An abstract type used to model an entity that is backed by Key-Value persistence                                                                                                         |
| `Process`               | An interface implemented by a component that orchestrates the steps necessary to complete a composite task                                                                               |
| `Projection`            | An interface implemented by a component that serves to project Command Model state onto the Query Model                                                                                  |
| `Projectable`           | An interface used to abstract the Command Model data projected onto the Query Model                                                                                                      |
| `Exchange`              | An abstraction over Publish-Subscribe messaging exchanges and topics                                                                                                                     |
| `CommandRouter`         | A means of asynchronous message-driven command routing to handlers that are responsible for modifying the domain model                                                                   |

These types are discussed in detail throughout the subsections of this chapter.


---

# 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-lattice.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.
