# X3m System v0.9.1 - Table of Contents

> Building blocks for distributed and/or CQRS/ES systems

## Pages

- [X3m.System](readme.md)
- [0.9.1](changelog.md)

- Guides
  - [Getting started](getting-started.md)
  - [Messaging](messaging.md)
  - [Aggregates &amp; event sourcing](aggregates-and-event-sourcing.md)
  - [Distribution](distribution.md)
  - [Scheduling](scheduling.md)

## Modules

- Messaging
  - [X3m.System.Dispatcher](X3m.System.Dispatcher.md): Sends a `X3m.System.Message` to whichever node offers its service and waits for the
response.
  - [X3m.System.Message](X3m.System.Message.md): System Message.
  - [X3m.System.Response](X3m.System.Response.md): The set of responses a service call can return.
  - [X3m.System.Router](X3m.System.Router.md): Registers system wide services.

- Aggregates &amp; Event Sourcing
  - [X3m.System.Aggregate](X3m.System.Aggregate.md): Behaviour and macros for defining an aggregate: the unit that decides how a command
is handled and how events change its state.
  - [X3m.System.Aggregate.Repo](X3m.System.Aggregate.Repo.md): Behaviour for the event store that backs aggregates.
  - [X3m.System.Aggregate.State](X3m.System.Aggregate.State.md): The wrapper state of an aggregate: your aggregate's own state (`client_state`) plus
its event-stream `version` and the set of already-processed message ids.
  - [X3m.System.Aggregate.TestSupport](X3m.System.Aggregate.TestSupport.md): Helpers for testing aggregates as pure functions, in a given/when/then style.
  - [X3m.System.MessageHandler](X3m.System.MessageHandler.md): Connects a router service to an aggregate, taking care of loading the aggregate,
running the command, persisting the produced events and replying to the caller.

- Scheduling
  - [X3m.System.Scheduler](X3m.System.Scheduler.md): This behaviour should be used to schedule `X3m.System.Message` delivery
at some point in time in the future. Implementation module should persist alarms so when process
is respawned they can be reloaded into memory.

- Setup
  - [X3m.System.LocalAggregates](X3m.System.LocalAggregates.md): Declares which aggregate modules run on the local node.
  - [X3m.System.LocalAggregatesSupervision](X3m.System.LocalAggregatesSupervision.md): Supervises the aggregate processes that run on the local node.

