Final design
Which tests verify concurrency protection and post completion in the overall architecture?
The final step uses the complete topology from step 6. Inside the boundary: interface → community API → posts, relationships, moderation history and feed references. Feed fanout reads durable work from this datastore. Media file storage is external. Processing exchanges the domain messages described in the main flow; results reach the interface through the API. The evidence plan for post B-31 covers concurrency, retries, boundaries and terminal completion. The table contains expected results of tests yet to be executed.
Starting point Keep moderation reasons and appeal paths traceable.
Assumptions for the example case
A fictional example design for a local community with text posts, a chronological home feed and traceable moderation. A feed projection with lag below 30 seconds is within the assumed target; from 30 seconds, the backlog is displayed and reported. All figures and test targets are illustrative assumptions.
Overall architecture with checks and review loops
Runtime topology · External entities, processes and datastores
- 1 · Creators and members → Community API
- 2 · Community API → Post and relationship datastore
- 3 · Post and relationship datastore → Feed fanout
- 4 · Feed fanout → Feed read model
- 5 · Feed read model → Visibility gate
Community and visibility
Reads exclude blocked or deleted posts using their authoritative visibility state.
Test plan for the complete design
| Component | Test and expected result | Return to an earlier step |
|---|---|---|
| Community API | Publication and deletion both expect version 3. Deletion first prevents publication. Publication first is followed by deletion after a fresh read; the terminal state gelöscht remains effective against old feed jobs. | Steps 3 and 5 |
| Command journal | Identical retries take effect once; changed content produces a conflict. | Steps 4 and 7 |
| Domain boundary check | Test 29, 30 and 31 seconds. Expected result: a feed projection with lag below 30 seconds is within the assumed target; from 30 seconds, the backlog is displayed and reported. | Step 2 |
| Posts, relationships, moderation history and feed references | After gelöscht, old feed references remain invisible. An identical old replay returns its original result but does not reactivate content. | Steps 5 and 9 |
| Feed fanout | Feed fanout reads an old publication job after a post has been blocked. It may still create references, but the community API checks authoritative post state before delivery and hides the content. Any cached visibility decision requires versioned invalidation. | Steps 6 and 7 |
Community API
- Test and expected result
- Publication and deletion both expect version 3. Deletion first prevents publication. Publication first is followed by deletion after a fresh read; the terminal state gelöscht remains effective against old feed jobs.
- Return to an earlier step
- Steps 3 and 5
Command journal
- Test and expected result
- Identical retries take effect once; changed content produces a conflict.
- Return to an earlier step
- Steps 4 and 7
Domain boundary check
- Test and expected result
- Test 29, 30 and 31 seconds. Expected result: a feed projection with lag below 30 seconds is within the assumed target; from 30 seconds, the backlog is displayed and reported.
- Return to an earlier step
- Step 2
Posts, relationships, moderation history and feed references
- Test and expected result
- After gelöscht, old feed references remain invisible. An identical old replay returns its original result but does not reactivate content.
- Return to an earlier step
- Steps 5 and 9
Feed fanout
- Test and expected result
- Feed fanout reads an old publication job after a post has been blocked. It may still create references, but the community API checks authoritative post state before delivery and hides the content. Any cached visibility decision requires versioned invalidation.
- Return to an earlier step
- Steps 6 and 7
First end-to-end test and outstanding evidence
- End-to-end path
- Test blocking a post during feed fanout end to end. Feed fanout reads an old publication job after a post has been blocked. It may still create references, but the community API checks authoritative post state before delivery and hides the content. Any cached visibility decision requires versioned invalidation.
- Clarify before extending the scope
- Agree the real media-storage contract, retention periods, recovery targets and assigned roles. Every limit here is a design assumption. The evidence table describes tests to execute; technical integration, browser checks and comprehension checks with readers follow separately.
Test blocking a post during feed fanout end to end
Test blocking a post during feed fanout end to end.
A creator with many followers publishes a post. Moderators block it while feed copies are being created. Completion requires technical and business evidence.
Publication and deletion both expect version 3. Deletion first prevents publication. Publication first is followed by deletion after a fresh read; the terminal state gelöscht remains effective against old feed jobs. The exercise specifies the input and expected result.
- Alternative considered
- An initial end-to-end path limited to lists and forms postpones the critical state checks.
- Trade-off
- The first end-to-end path needs controlled concurrency and failure points.
- Reassess
- Passing the counterexample tests and checks with readers provides grounds for extending the case.
Try it yourself
Choose two architectural decisions: concurrency protection and evidence-backed completion. For each, name the test, expected result and step to revisit.
A hint for your attempt
Link the markers of the overall architecture with the associated design steps.
Compare with a possible solution
- Concurrency control
- Publication and deletion both expect version 3. Deletion first prevents publication. Publication first is followed by deletion after a fresh read; the terminal state gelöscht remains effective against old feed jobs. Expected invariant: A blocked or deleted post is excluded at read time using its authoritative visibility state, even when an old feed reference exists. A deviation leads back to step 5 and the command contract in step 4.
- Test completion and retries
- Start with a published post whose reference remains in the feed. Delete the post, then identically replay the old feed message and old publication command. Read the post and media through the old reference. Expected result: replay reactivates nothing, neither read returns content, and the authoritative state remains gelöscht. The original command result may be read as evidence. Revisit step 9 for responsibility and step 7 for the failure sequence if results differ.
Apply to your project
Which two counterexample tests will you run first in your own end-to-end implementation?
Start your own design
Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.
Download design template (.md)Compare the ten tasks with the example case
Purpose and boundary
Which evidence for a post would originate outside the application in your own project?
In the example: Feeds store references to authoritative posts. A local community with text posts, a chronological home feed and traceable moderation.
Requirements
Which rule of your project remains binding even with slow processing?
In the example: Enforce blocks on every delivery. A feed projection with lag below 30 seconds is within the assumed target; from 30 seconds, the backlog is displayed and reported.
Scale estimates
Which single entity concentrates load more than the daily average when distributing community posts?
In the example: A large creator determines peak fanout load. An average of 1 event/s says little about one post for 100000 followers.
Interfaces
Which input fields make two change intentions different in your project?
In the example: Publication binds the revision and audience. The creator, post revision and audience must remain identical on replay.
Data and states
Which states must remain protected in your model against late replay?
In the example: Moderation decisions have their own history. After gelöscht, old feed references remain invisible. An identical old replay returns its original result but does not reactivate content.
Overall architecture
Which planned service boundary would distribute a currently local guarantee across the network?
In the example: Feed fanout runs outside the post commit. Posts, relationships, moderation history and feed references must express the same valid state.
Critical flow
What feedback could be missing even though the underlying action has already taken place?
In the example: Delayed feed work respects current visibility. A blocked or deleted post is excluded at read time using its authoritative visibility state, even when an old feed reference exists.
Bottlenecks and trade-offs
Which similar display could have two different causes in your project?
In the example: Fan out to large follower groups in batches. Large follower groups cause high feed lag; numerous status checks cause long read latency. The two metrics drive separate optimisations.
Operations and security
Which open state in your project needs a domain specialist as well as technical operations?
In the example: Keep moderation reasons and appeal paths traceable. After gelöscht, old feed references remain invisible. An identical old replay returns its original result but does not reactivate content.
Final design
Which two counterexample tests will you run first in your own end-to-end implementation?
In the example: Test blocking a post during feed fanout end to end. Publication and deletion both expect version 3. Deletion first prevents publication. Publication first is followed by deletion after a fresh read; the terminal state gelöscht remains effective against old feed jobs.