{"_id":"561c5eec4b0a9b0d00c0f4f1","project":"56000f0d8c0c9d0d00dcad21","__v":15,"category":{"_id":"561c81d0e822e12b00e1fe00","__v":5,"pages":["561c8359f067153500bf6e2c","561c8433b1e87c0d00eee837","561c8502a46cd40d00b11d9d","561c85ace822e12b00e1fe0a","5625969d23053b2300f59733"],"project":"56000f0d8c0c9d0d00dcad21","version":"56000f0e8c0c9d0d00dcad24","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-13T04:00:16.895Z","from_sync":false,"order":4,"slug":"spaceevent-sourcing","title":"space:event-sourcing"},"githubsync":"","user":"5600910981a9670d006d144f","version":{"_id":"56000f0e8c0c9d0d00dcad24","project":"56000f0d8c0c9d0d00dcad21","__v":13,"createdAt":"2015-09-21T14:07:10.176Z","releaseDate":"2015-09-21T14:07:10.176Z","categories":["56000f0e8c0c9d0d00dcad25","56008f2497f69f1700f21a36","560091601503430d007cc936","560e0d8054af2b0d005bbe92","560e3ce7ad6b200d00ff471c","560e3cf2c4e4ae0d00b42ed1","561c81d0e822e12b00e1fe00","561c81e9e822e12b00e1fe01","561c823d20b4a92b007d5147","56257f8951bf1c0d001f660a","562d5f165bd25e0d0054dbd4","562d68d5d38b650d0044472a","56421aebb0dc090d00f88438"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-13T01:31:24.233Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Commit\"\n}\n[/block]\nAggregates 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.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Commit Store\"\n}\n[/block]\nThe _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.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Commit Publisher\"\n}\n[/block]","excerpt":"","slug":"event-sourcing-1","type":"basic","title":"Technical Overview"}

Technical Overview


[block:api-header] { "type": "basic", "title": "Commit" } [/block] 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. [block:api-header] { "type": "basic", "title": "Commit Store" } [/block] 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. [block:api-header] { "type": "basic", "title": "Commit Publisher" } [/block]