Technical Overview

Commit

Aggregates generate events as the result of being issued a command from either user interaction in the application, or a Process Manager in the domain. These events are held in memory and then are persisted to the database once the command has been fully handled. Since MongoDB doesn't support transactions to allow for each event to be stored as individual documents, Space introduces the concept of a commit to persist all the events in a single atomic operation, eliminating the need for a transaction to maintain the system's integrity. This approach also allows the command to be included in the commit, adding context to the system change.

Commit Store

The commit store holds the system's state, with the primary function to store and distribute events, and to load the current state of any aggregate on demand.

Commit Publisher