|
6 | 6 | * [State-Oriented Persistence](#436b314e78fec59a76bad8b93b52ee75)
|
7 | 7 | * [Event Sourcing](#c4b3d1c8edab1825366ac1d541d8226f)
|
8 | 8 | * [CQRS](#b2cf9293622451d86574d2973398ca70)
|
9 |
| - * [Advantages of Event Sourcing and CQRS](#d8818c2c5ba0364540a49273f684b85c) |
| 9 | + * [Advantages of CQRS](#cc00871be6276415cfb13eb24e97fe48) |
| 10 | + * [Advantages of Event Sourcing](#845b7e034fb763fcdf57e9467c0a8707) |
10 | 11 | * [Requirements for Event Store](#70b356f41293ace9df0d04cd8175ac35)
|
11 | 12 | * [Solution Architecture](#9f6302143996033ebb94d536b860acc3)
|
12 | 13 | * [Permanent Storage](#205928bf89c3012be2e11d1e5e7ad01f)
|
|
17 | 18 | * [Drawbacks](#0cfc0523189294ac086e11c8e286ba2d)
|
18 | 19 | * [How to Run the Sample?](#53af957fc9dc9f7083531a00fe3f364e)
|
19 | 20 |
|
| 21 | +## <a name="0b79795d3efc95b9976c7c5b933afce2"></a>Introduction |
| 22 | + |
| 23 | +PostgreSQL is the world's most advanced open source database. Also, PostgreSQL is suitable for Event |
| 24 | +Sourcing. |
| 25 | + |
| 26 | +This repository provides a sample of event sourced system that uses PostgreSQL as event store. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +See also |
| 31 | + |
| 32 | +* [Event Sourcing with Kafka and ksqlDB](https://github.com/evgeniy-khist/ksqldb-event-souring) |
| 33 | +* [Event Sourcing with EventStoreDB](https://github.com/evgeniy-khist/eventstoredb-event-sourcing) |
| 34 | + |
20 | 35 | ## <a name="8753dff3c2879207fa06ef1844b1ea4d"></a>Example Domain
|
21 | 36 |
|
22 |
| -The example domain is ride hailing. |
| 37 | +This sample uses heavily simplified ride hailing domain model inspired |
| 38 | +by [tech/uklon](https://careers.uklon.ua/) experience. |
23 | 39 |
|
24 | 40 | * A rider can place an order for a ride along a route specifying a price.
|
25 | 41 | * A driver can accept and complete an order.
|
@@ -124,14 +140,14 @@ Separate table `ORDER_AGGREGATE` keeps track of the latest versions of the aggre
|
124 | 140 | required for optimistic concurrency control.
|
125 | 141 |
|
126 | 142 | PostgreSQL doesn't allow subscribing on changes, so the solution is Transactional outbox pattern. A
|
127 |
| -service that uses a database inserts events into an *outbox* table as part of the local transaction. |
128 |
| -A separate Message Relay process publishes the events inserted into database to a message broker. |
| 143 | +service that uses a database inserts events into an outbox table as part of the local transaction. A |
| 144 | +separate Message Relay process publishes the events inserted into database to a message broker. |
129 | 145 |
|
130 | 146 | 
|
131 | 147 |
|
132 |
| -With event sourcing database model classical Transaction outbox pattern can be simplified. An * |
133 |
| -outbox* table is used to keep track of handled events. Outbox handler (aka *Message Relay* |
134 |
| -and *Polling Publisher*) processes new events by polling the database's *outbox* table. |
| 148 | +With event sourcing database model classical Transaction outbox pattern can be simplified even more. |
| 149 | +An outbox table is used to keep track of handled events. Outbox handler (aka Message Relay and |
| 150 | +Polling Publisher) processes new events by polling the database's outbox table. |
135 | 151 |
|
136 | 152 | 
|
137 | 153 |
|
@@ -381,3 +397,6 @@ The `test.sh` script has the following instructions:
|
381 | 397 | ```
|
382 | 398 |
|
383 | 399 |
|
| 400 | +
|
| 401 | +
|
| 402 | +
|
0 commit comments