@@ -171,12 +171,15 @@ The :class:`~examples.coursebooking.application.EnrolmentWithAggregates` class s
171171:class: `~examples.coursebooking.domainmodel.Course ` and :class: `~examples.coursebooking.domainmodel.Student `
172172aggregate classes.
173173
174+ Please note, the "consistency boundary" for joining a course involves atomically recording new events from more
175+ than one aggregate, the student and the course. The preservation of recorded consistency is tested in the extra
176+ test case below.
177+
174178This meets the "course subscriptions" challenge with event-sourced aggregates, without tricks and without
175179accidental complexity. It shows that it is perfectly possible, entirely legitimate, and quite straightforward
176180to extend the transactional consistency boundary when using event-sourced aggregates to include more than one
177181aggregate. Indeed, this is a useful technique.
178182
179-
180183.. literalinclude :: ../../../examples/coursebooking/application.py
181184 :pyobject: EnrolmentWithAggregates
182185
@@ -185,23 +188,19 @@ At the time of writing, this possibility is not mentioned in the list of
185188consistency boundaries website, which lists only three options: eventual consistency, larger aggregate, reservation
186189pattern.
187190
188- Please note, the "consistency boundary" for joining a course involves atomically recording new events from more
189- than one aggregate, the student and the course. The preservation of recorded consistency is tested in the extra
190- test case below.
191-
192191
193192Speedrun
194193--------
195194
196- To assess the comparative performance of " event-sourced aggregate" vs "dynamic consistency boundaries"
197- a "speedrun" script has been written. It iterates over a sequence of operations, registering a number
198- of students, then registering a number of courses, and then subscribing all the students on all the
199- courses. It was configured to register 10 students and 10 courses, and therefore make 100 subscriptions,
200- in each iteration.
195+ To assess the comparative performance of the support for event-sourced aggregates provided by this library
196+ and the support for dynamic consistency boundaries that we will develop in the next examples, a "speedrun"
197+ script has been written. It iterates over a sequence of operations, first registering a number of students
198+ and a number of courses, and then subscribing all the students on all the courses. It was configured to register
199+ 10 students and 10 courses, and therefore to make 100 subscriptions in each iteration.
201200
202201The performance report for the event-sourced aggregates solution is included below. Using PostgreSQL
203- as an event store, we can see that it accomplished 93,720 operations in 30s. Which gives us an average
204- of 0.320 milliseconds per operation, and a target for implementing DCB.
202+ as an event store, we can see that with event-sourced we accomplished 93,720 operations in 30s. That
203+ gives us an average of 0.320 milliseconds per operation, which will be our target for implementing DCB.
205204
206205.. code-block ::
207206
0 commit comments