Skip to content

Commit 1b4727c

Browse files
stktungcoloradomorrisseyrk9506
authored
Added time traveling use case tutorial (#886)
Co-authored-by: Mark Morrissey <90937442+coloradomorrissey@users.noreply.github.com> Co-authored-by: Ronan Kumar <43848198+rk9506@users.noreply.github.com>
1 parent f84e5c8 commit 1b4727c

23 files changed

+1176
-16
lines changed

docs/.vuepress/configs/sidebar.ts

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,20 @@ export const sidebarEn: EsSidebarOptions = {
3535
expanded: false,
3636
group: "Mix-and-Match Database",
3737
children: [
38-
"/getting-started/use-cases/mix-and-match-database/introduction.md",
38+
{
39+
text: "Overview",
40+
link: "/getting-started/use-cases/mix-and-match-database/introduction.md"
41+
},
3942
{
4043
text: "Tutorial",
4144
collapsible: true,
4245
expanded: false,
4346
group: "Mix-and-Match Database Tutorial",
44-
children: [
45-
"/getting-started/use-cases/mix-and-match-database/tutorial-intro.md",
47+
children: [
48+
{
49+
text: "Introduction",
50+
link: "/getting-started/use-cases/mix-and-match-database/tutorial-intro.md"
51+
},
4652
"/getting-started/use-cases/mix-and-match-database/tutorial-1.md",
4753
"/getting-started/use-cases/mix-and-match-database/tutorial-2.md",
4854
"/getting-started/use-cases/mix-and-match-database/tutorial-3.md",
@@ -57,14 +63,20 @@ export const sidebarEn: EsSidebarOptions = {
5763
expanded: false,
5864
group: "Outbox Out-of-the-Box",
5965
children: [
60-
"/getting-started/use-cases/outbox/introduction.md",
66+
{
67+
text: "Overview",
68+
link: "/getting-started/use-cases/outbox/introduction.md"
69+
},
6170
{
6271
text: "Tutorial",
6372
collapsible: true,
6473
expanded: false,
6574
group: "Outbox Tutorial",
6675
children: [
67-
"/getting-started/use-cases/outbox/tutorial-intro.md",
76+
{
77+
text: "Introduction",
78+
link: "/getting-started/use-cases/outbox/tutorial-intro.md"
79+
},
6880
"/getting-started/use-cases/outbox/tutorial-1.md",
6981
"/getting-started/use-cases/outbox/tutorial-2.md",
7082
"/getting-started/use-cases/outbox/tutorial-3.md",
@@ -73,6 +85,36 @@ export const sidebarEn: EsSidebarOptions = {
7385
]
7486
}
7587
]
88+
},
89+
{
90+
text: "Time Travel",
91+
collapsible: true,
92+
expanded: false,
93+
group: "Time Travel",
94+
children: [
95+
{
96+
text: "Overview",
97+
link: "/getting-started/use-cases/time-travel/introduction.md"
98+
},
99+
{
100+
text: "Tutorial",
101+
collapsible: true,
102+
expanded: false,
103+
group: "Time Travel Tutorial",
104+
children: [
105+
{
106+
text: "Introduction",
107+
link: "/getting-started/use-cases/time-travel/tutorial-intro.md"
108+
},
109+
"/getting-started/use-cases/time-travel/tutorial-1.md",
110+
"/getting-started/use-cases/time-travel/tutorial-2.md",
111+
"/getting-started/use-cases/time-travel/tutorial-3.md",
112+
"/getting-started/use-cases/time-travel/tutorial-4.md",
113+
"/getting-started/use-cases/time-travel/tutorial-5.md",
114+
"/getting-started/use-cases/time-travel/tutorial-summary.md"
115+
]
116+
}
117+
]
76118
}
77119
]
78120
},

docs/getting-started/use-cases/mix-and-match-database/introduction.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
2-
title: Introduction
2+
title: Mix-and-Match Databases - Achieving Polyglot Persistence with KurrentDB
33
next: ./tutorial-intro.md
44
---
55

66
![](./images/use-the-right-database-for-the-job.png#light)
77

88
![](./images/use-the-right-database-for-the-job-dark.png#dark)
99

10-
## Mix-and-Match Database
11-
1210
Modern applications often deal with diverse data access patterns that a single database can’t efficiently handle. That’s where you can leverage a database mix-and-match approach where different types of databases for different parts of your system can be used based on their strengths.
1311

1412
For example:

docs/getting-started/use-cases/mix-and-match-database/tutorial-1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Part 1 - Setup and Initialize KurrentDB
3+
prev: ./tutorial-intro.md
34
---
45

56
# Part 1: Setup and Initialize KurrentDB

docs/getting-started/use-cases/mix-and-match-database/tutorial-intro.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: Introduction
2+
title: Mix-and-Match Database Tutorial Introduction
3+
prev: ./introduction.md
34
---
45

56
# Introduction
151 KB
Loading

docs/getting-started/use-cases/outbox/introduction.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: Introduction
2+
title: Solving Dual Writes with KurrentDB's Outbox, Out-of-the-Box
33
next: ./tutorial-intro.md
44
---
55

6-
## Outbox Out-of-the-Box
6+
![Solving Dual Writes with KurrentDB](./images/outbox-hero.png)
77

8-
### Dual Write Problem
8+
## Dual Write Problem
99
Without distributed transactions, operations that write to multiple resources are not atomic, potentially leading to inconsistencies in the system. This issue is commonly known as the dual write problem.
1010

1111
Although named "Dual Write," this pattern can involve writing to more than two resources. A common use case is updating a relational database and simultaneously sending a notification message via a message queue to another system.
@@ -22,7 +22,7 @@ Failure to write to one resource introduces inconsistency with the other. For in
2222

2323
Conversely, a failed database update paired with a successful message dispatch leads to downstream systems acting on non-existent data.
2424

25-
### Transactional Outbox Pattern
25+
## Transactional Outbox Pattern
2626
The transactional outbox pattern ensures consistency by writing business data and outgoing messages atomically within the same database transaction. A separate process later dispatches these messages to downstream systems, mitigating the dual write problem.
2727

2828
The outbox pattern promotes reducing the number of resources we write to, preferably to just one, and technically, to one transaction. This
@@ -53,7 +53,7 @@ Instead of directly managing an outbox table, another implementation of the outb
5353

5454
This approach avoids polling overhead and propagates updates with significantly lower latency. However, it relies on additional CDC tooling, increasing complexity if such tools aren't already part of the existing infrastructure. It also risks exposing the internal data model of the source tables, potentially creating undesirable coupling with other systems.
5555

56-
### Outbox Out-of-the-Box with KurrentDB
56+
## Outbox Out-of-the-Box with KurrentDB
5757

5858
![Outbox with KurrentDB](./images/outbox-with-kurrentdb.png#light)
5959

@@ -68,7 +68,7 @@ In effect, the stream is the outbox, out of the box.
6868

6969
The native subscription capabilities, such as persistent and catch-up subscriptions and connectors, act as cheap mechanisms for writing the glue code that sends messages to the other system.
7070

71-
### How to Approach the Dual Write Problem with KurrentDB
71+
## How to Approach the Dual Write Problem with KurrentDB
7272
1. Record each business change as an event and append it to a stream in KurrentDB, using the stream as the definitive source of truth.
7373
2. Do not update other systems or read models directly as part of the same append operation.
7474
3. Set up subscriptions to listen for new events in the stream.

docs/getting-started/use-cases/outbox/tutorial-1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Part 1 - Set up Codespaces
3+
prev: ./tutorial-intro.md
34
---
45

56
# Part 1: Set up Codespaces

docs/getting-started/use-cases/outbox/tutorial-intro.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: Introduction
2+
title: Outbox Tutorial Introduction
3+
prev: ./introduction.md
34
---
45

56
# Introduction
106 KB
Loading
29.7 KB
Loading

0 commit comments

Comments
 (0)