Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/dev-center/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: Dev Center
title: Tutorials
order: 1
---


### Welcome to the Kurrent Dev Center!
### Kurrent Tutorials

Here you'll find tutorials, use cases, and best practices to help you get the most out of your Kurrent experience.
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,35 @@ prev: ./tutorial-intro.md

In this part, you will start a GitHub Codespaces session in your browser.

::: info
GitHub Codespaces provides an instant and preconfigured development environment all within your browser. This environment contains all the tools and code to complete this tutorial. To learn more about Github Codespaces, [click here](https://github.com/features/codespaces).
:::
::: info
GitHub Codespaces provides an instant and preconfigured development environment all within your browser. This
environment contains all the tools and code to complete this tutorial. To learn more about Github
Codespaces, [click here](https://github.com/features/codespaces).
:::

You will then initialize KurrentDB by appending sample events that mimic an e-commerce application. The events are appended using a data generator program.
You will then initialize KurrentDB by appending sample events that mimic an e-commerce application. The events are
appended using a data generator program.

## Step 1: Set up Your Codespaces

1. Click the button below to initiate Codespaces and ensure following values are selected:

[![](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=951198039&skip_quickstart=true)

[![](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=951198039&skip_quickstart=true)

| Configuration Option | Selection |
|--------------------------------|----------------------|
| Branch | `main` |
| Dev container configuration | `Mix-and-Match Database` |
| Region | Any value |
| Machine type | Any value |
| Configuration Option | Selection |
|-----------------------------|--------------------------|
| Branch | `main` |
| Dev container configuration | `Mix-and-Match Database` |
| Region | Any value |
| Machine type | Any value |

Log in to GitHub if required.

2. Wait for your Codespace to build. This can take up to a few minutes.
2. Wait for your Codespace to build. This can take up to a few minutes.

::: tip
For this quickstart, you can safely ignore and close any Codespaces notifications that appear on the bottom right of the page.
For this quickstart, you can safely ignore and close any Codespaces notifications that appear on the bottom right of the
page.
:::

## Step 2: Start and Initialize KurrentDB with Sample Events
Expand All @@ -57,45 +60,45 @@ For this quickstart, you can safely ignore and close any Codespaces notification

3. Copy the URL printed in the terminal from the last step.

4. Open a new browser tab.
4. Open a new browser tab.

5. In the address bar of the new tab, paste the URL and navigate to it.

6. This will display the KurrentDB Admin UI.

![KurrentDB Admin UI Dashboard](../images/admin-ui.png =300x)

## Step 3: Browse Sample Events in KurrentDB's Admin UI
## Step 3: Browse Sample Events in KurrentDB Admin UI

1. Click the `Stream Browser` link from the top navigation bar.

2. Under `Recently Changed Streams`, click the `$ce-cart` link.
2. Under `Recently Changed Streams`, click the `$ce-cart` link.

::: info Understanding Category System Projection
The `$ce-cart` stream contains events from all the carts in KurrentDB. This uses the category system projection stream feature. For more information, see [System Projections](https://docs.kurrent.io/server/v25.0/features/projections/system.html#by-category).
The `$ce-cart` stream contains events from all the carts in KurrentDB. This uses the category system projection
stream feature. For more information,
see [System Projections](https://docs.kurrent.io/server/v25.0/features/projections/system.html#by-category).
:::


3. You should see an ordered list of the appended events associated with two distinct, virtual shopping carts.

::: info Introducing shopping cart events
In KurrentDB, events for each shopping cart are appended to a stream like `cart-2fbe05d1dcf043d782ea24923298ae3a`, where `2fbeone05d1dcf043d782ea24923298ae3a` is the cart's unique ID.
In KurrentDB, events for each shopping cart are appended to a stream like `cart-2fbe05d1dcf043d782ea24923298ae3a`,
where `2fbeone05d1dcf043d782ea24923298ae3a` is the cart's unique ID.

The cart will contain events like these:

| Event | Description |
|---------------------------|-------------------------------------------------------------------------------------------------|
| `VisitorStartedShopping` | When a visitor starts shopping and a cart is created. |
| `CustomerStartedShopping` | When a known customer starts shopping and a cart is associated with their ID. |
| `CartShopperGotIdentified`| When a customer's identity is linked to a cart (e.g., a visitor logged in) |
| `ItemGotAdded` | When an item is added to the cart, including details like quantity, price, and tax. |
| `ItemGotRemoved` | When an item is removed from the cart, including the quantity removed. |
| `CartGotCheckedOut` | When a cart is checked out and converted into an order. |
| `CartGotAbandoned` | When a cart is abandoned after being idle for a specified duration. |
| Event | Description |
|----------------------------|-------------------------------------------------------------------------------------|
| `VisitorStartedShopping` | When a visitor starts shopping and a cart is created. |
| `CustomerStartedShopping` | When a known customer starts shopping and a cart is associated with their ID. |
| `CartShopperGotIdentified` | When a customer's identity is linked to a cart (e.g., a visitor logged in) |
| `ItemGotAdded` | When an item is added to the cart, including details like quantity, price, and tax. |
| `ItemGotRemoved` | When an item is removed from the cart, including the quantity removed. |
| `CartGotCheckedOut` | When a cart is checked out and converted into an order. |
| `CartGotAbandoned` | When a cart is abandoned after being idle for a specified duration. |
:::

::: info Quick Quiz

What were the quantities of each product in the shopping carts?

:::
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ Before starting, ensure you have the following:

This tutorial consists of the following steps:

### [Part 1: Setup and Initialize KurrentDB](/getting-started/use-cases/mix-and-match-database/tutorial-1.md)
1. **[Set up your Codespaces](/getting-started/use-cases/mix-and-match-database/tutorial-1.md#step-1-set-up-your-codespaces)**: Starts up an interactive coding environment in your browser where all tools and database are installed
2. **[Start and Initialize KurrentDB with Sample Events](/getting-started/use-cases/mix-and-match-database/tutorial-1.md#step-2-start-and-initialize-kurrentdb-with-sample-events)**: Start up KurrentDB and initialize it with sample events
3. **[Browse the Sample Events in KurrentDB's Admin UI](/getting-started/use-cases/mix-and-match-database/tutorial-1.md#step-3-browse-sample-events-in-kurrentdb-s-admin-ui)**: Access the Admin UI to browse the appended events
### [Part 2: Project KurrentDB Events to Postgres](/getting-started/use-cases/mix-and-match-database/tutorial-2.md)
4. **[Execute Projection Applications](/getting-started/use-cases/mix-and-match-database/tutorial-2.md#step-4-execute-projection-application)**: Starts up the projection sample applications that transform KurrentDB events into read models in Postgres and Redis
5. **[Review the Projected Read Models in Postgres](/getting-started/use-cases/mix-and-match-database/tutorial-2.md#step-5-review-the-projected-read-models-in-postgres)**: Run the PostgreSQL command line tool to review the newly inserted records
6. **[Examine the Postgres Projection Application Codebase](/getting-started/use-cases/mix-and-match-database/tutorial-2.md#step-6-examine-the-postgres-projection-application-codebase)**: Examine the PostgreSQL projection application codebase to see how events are transformed to read models in the tables
### [Part 3: Project KurrentDB Events to Redis](/getting-started/use-cases/mix-and-match-database/tutorial-3.md)
7. **[Review the Projected Read Models in Redis](/getting-started/use-cases/mix-and-match-database/tutorial-3.md#step-7-review-the-projected-read-models-in-redis)**: Run the Redis command line tool to review the newly added entries
8. **[Examine the Redis Projection Application Codebase](/getting-started/use-cases/mix-and-match-database/tutorial-3.md#step-8-examine-the-redis-projection-application-codebase)**: Examine the Redis projection application codebase to see how events are transformed into read models in Redis
### [Part 4: Project KurrentDB Events in Real-Time](/getting-started/use-cases/mix-and-match-database/tutorial-4.md)
9. **[Browse the Demo Web Page](/getting-started/use-cases/mix-and-match-database/tutorial-4.md#step-9-browse-the-demo-web-page)**: Navigate to the Demo Web Page to see a sample of how the read models in Postgres and Redis are used
10. **[Start the Live Data Generator](/getting-started/use-cases/mix-and-match-database/tutorial-4.md#step-10-start-the-live-data-generator)**: Start a live data generator program that continuously appends events into KurrentDB
11. **[Watch the Read Models Update in Real-Time](/getting-started/use-cases/mix-and-match-database/tutorial-4.md#step-11-watch-the-read-models-update-in-real-time)**: See how the read models are updated in real-time in the Demo Web Page
12. **[Understanding catch-up subscription and real-time processing](/getting-started/use-cases/mix-and-match-database/tutorial-4.md#step-12-understanding-catch-up-subscription-and-real-time-processing)**: Understand how the code projects events to the read models in real-time
### [Part 1: Setup and Initialize KurrentDB](tutorial-1.md)
1. **[Set up your Codespaces](tutorial-1.md#step-1-set-up-your-codespaces)**: Starts up an interactive coding environment in your browser where all tools and database are installed
2. **[Start and Initialize KurrentDB with Sample Events](tutorial-1.md#step-2-start-and-initialize-kurrentdb-with-sample-events)**: Start up KurrentDB and initialize it with sample events
3. **[Browse the Sample Events in KurrentDB Admin UI](tutorial-1.md#step-3-browse-sample-events-in-kurrentdb-admin-ui)**: Access the Admin UI to browse the appended events
### [Part 2: Project KurrentDB Events to Postgres](tutorial-2.md)
4. **[Execute Projection Applications](tutorial-2.md#step-4-execute-projection-application)**: Starts up the projection sample applications that transform KurrentDB events into read models in Postgres and Redis
5. **[Review the Projected Read Models in Postgres](tutorial-2.md#step-5-review-the-projected-read-models-in-postgres)**: Run the PostgreSQL command line tool to review the newly inserted records
6. **[Examine the Postgres Projection Application Codebase](tutorial-2.md#step-6-examine-the-postgres-projection-application-codebase)**: Examine the PostgreSQL projection application codebase to see how events are transformed to read models in the tables
### [Part 3: Project KurrentDB Events to Redis](tutorial-3.md)
7. **[Review the Projected Read Models in Redis](tutorial-3.md#step-7-review-the-projected-read-models-in-redis)**: Run the Redis command line tool to review the newly added entries
8. **[Examine the Redis Projection Application Codebase](tutorial-3.md#step-8-examine-the-redis-projection-application-codebase)**: Examine the Redis projection application codebase to see how events are transformed into read models in Redis
### [Part 4: Project KurrentDB Events in Real-Time](tutorial-4.md)
9. **[Browse the Demo Web Page](tutorial-4.md#step-9-browse-the-demo-web-page)**: Navigate to the Demo Web Page to see a sample of how the read models in Postgres and Redis are used
10. **[Start the Live Data Generator](tutorial-4.md#step-10-start-the-live-data-generator)**: Start a live data generator program that continuously appends events into KurrentDB
11. **[Watch the Read Models Update in Real-Time](tutorial-4.md#step-11-watch-the-read-models-update-in-real-time)**: See how the read models are updated in real-time in the Demo Web Page
12. **[Understanding catch-up subscription and real-time processing](tutorial-4.md#step-12-understanding-catch-up-subscription-and-real-time-processing)**: Understand how the code projects events to the read models in real-time
2 changes: 1 addition & 1 deletion docs/dev-center/use-cases/outbox/tutorial/tutorial-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ On the other hand, an event like `OrderPlaced` in this tutorial may not require

![KurrentDB Admin UI Dashboard](../images/admin-ui.png =300x)

## Step 3: Browse OrderPlaced Events in KurrentDB's Admin UI
## Step 3: Browse OrderPlaced Events in KurrentDB Admin UI

1. Click the `Stream Browser` link from the top navigation bar.

Expand Down
40 changes: 20 additions & 20 deletions docs/dev-center/use-cases/outbox/tutorial/tutorial-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ Before starting, ensure you have the following:

This tutorial consists of the following steps:

### [Part 1: Set up Codespaces](/getting-started/use-cases/outbox/tutorial-1.md)
1. **[Set up your Codespaces](/getting-started/use-cases/outbox/tutorial-1.md#step-1-set-up-your-codespaces)**: Start an interactive coding environment in your browser where all tools and databases are installed

### [Part 2: Trigger Writes to External Data Stores](/getting-started/use-cases/outbox/tutorial-2.md)
2. **[Start Databases and Append OrderPlaced Event to KurrentDB](/getting-started/use-cases/outbox/tutorial-2.md#step-2-start-databases-and-append-orderplaced-event-to-kurrentdb)**: Start KurrentDB and PostgreSQL, and append sample OrderPlaced events
3. **[Browse OrderPlaced Events in KurrentDB's Admin UI](/getting-started/use-cases/outbox/tutorial-2.md#step-3-browse-orderplaced-events-in-kurrentdb-s-admin-ui)**: Access the Admin UI to explore the triggering events

### [Part 3: Write to a External Data Store with Persistent Subscription](/getting-started/use-cases/outbox/tutorial-3.md)
4. **[Create a KurrentDB Persistent Subscription Consumer Group](/getting-started/use-cases/outbox/tutorial-3.md#step-4-create-a-kurrentdb-persistent-subscription-consumer-group)**: Set up a persistent subscription to process events
5. **[Review the Consumer Group from the KurrentDB Admin UI](/getting-started/use-cases/outbox/tutorial-3.md#step-5-review-the-consumer-group-from-the-kurrentdb-admin-ui)**: Examine the created consumer group
6. **[Start the Order Processor Application](/getting-started/use-cases/outbox/tutorial-3.md#step-6-start-the-order-processor-application)**: Run the application that processes OrderPlaced events
7. **[Examine the Order Processor Application Codebase](/getting-started/use-cases/outbox/tutorial-3.md#step-7-examine-the-order-processor-application-codebase)**: Understand how idempotent event processing works in KurrentDB
8. **[Process New Events in Real-Time](/getting-started/use-cases/outbox/tutorial-3.md#step-8-process-new-events-in-real-time)**: Observe real-time event processing with persistent subscriptions

### [Part 4: Error Handling for Writes to External Data Stores](/getting-started/use-cases/outbox/tutorial-4.md)
9. **[Handle Application Outage with Checkpoints](/getting-started/use-cases/outbox/tutorial-4.md#step-9-handle-application-outage-with-checkpoints)**: Learn how checkpoints ensure event processing after system failures
10. **[Handle Transient Errors by Retrying Events](/getting-started/use-cases/outbox/tutorial-4.md#step-10-handle-transient-errors-by-retrying-events)**: Implement retry logic for temporary failures
11. **[Examine How Transient Errors are Handled in the Codebase](/getting-started/use-cases/outbox/tutorial-4.md#step-11-examine-how-transient-errors-are-handled-in-the-codebase)**: Understand the error handling implementation
12. **[Handle Permanent Errors by Skipping Events](/getting-started/use-cases/outbox/tutorial-4.md#step-12-handle-permanent-errors-by-skipping-events)**: Learn to handle unrecoverable errors by skipping problematic events
13. **[Examine How Permanent Errors are Handled in the Codebase](/getting-started/use-cases/outbox/tutorial-4.md#step-13-examine-how-permanent-errors-are-handled-in-the-codebase)**: Review the permanent error handling implementation
### [Part 1: Set up Codespaces](tutorial-1.md)
1. **[Set up your Codespaces](tutorial-1.md#step-1-set-up-your-codespaces)**: Start an interactive coding environment in your browser where all tools and databases are installed

### [Part 2: Trigger Writes to External Data Stores](tutorial-2.md)
2. **[Start Databases and Append OrderPlaced Event to KurrentDB](tutorial-2.md#step-2-start-databases-and-append-orderplaced-event-to-kurrentdb)**: Start KurrentDB and PostgreSQL, and append sample OrderPlaced events
3. **[Browse OrderPlaced Events in KurrentDB Admin UI](tutorial-2.md#step-3-browse-orderplaced-events-in-kurrentdb-admin-ui)**: Access the Admin UI to explore the triggering events

### [Part 3: Write to a External Data Store with Persistent Subscription](tutorial-3.md)
4. **[Create a KurrentDB Persistent Subscription Consumer Group](tutorial-3.md#step-4-create-a-kurrentdb-persistent-subscription-consumer-group)**: Set up a persistent subscription to process events
5. **[Review the Consumer Group from the KurrentDB Admin UI](tutorial-3.md#step-5-review-the-consumer-group-from-the-kurrentdb-admin-ui)**: Examine the created consumer group
6. **[Start the Order Processor Application](tutorial-3.md#step-6-start-the-order-processor-application)**: Run the application that processes OrderPlaced events
7. **[Examine the Order Processor Application Codebase](tutorial-3.md#step-7-examine-the-order-processor-application-codebase)**: Understand how idempotent event processing works in KurrentDB
8. **[Process New Events in Real-Time](tutorial-3.md#step-8-process-new-events-in-real-time)**: Observe real-time event processing with persistent subscriptions

### [Part 4: Error Handling for Writes to External Data Stores](tutorial-4.md)
9. **[Handle Application Outage with Checkpoints](tutorial-4.md#step-9-handle-application-outage-with-checkpoints)**: Learn how checkpoints ensure event processing after system failures
10. **[Handle Transient Errors by Retrying Events](tutorial-4.md#step-10-handle-transient-errors-by-retrying-events)**: Implement retry logic for temporary failures
11. **[Examine How Transient Errors are Handled in the Codebase](tutorial-4.md#step-11-examine-how-transient-errors-are-handled-in-the-codebase)**: Understand the error handling implementation
12. **[Handle Permanent Errors by Skipping Events](tutorial-4.md#step-12-handle-permanent-errors-by-skipping-events)**: Learn to handle unrecoverable errors by skipping problematic events
13. **[Examine How Permanent Errors are Handled in the Codebase](tutorial-4.md#step-13-examine-how-permanent-errors-are-handled-in-the-codebase)**: Review the permanent error handling implementation
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ In this part, you will start a KurrentDB instance and initialize it with a few h

![KurrentDB Admin UI Dashboard](../images/admin-ui.png =300x)

## Step 3: Browse OrderPlaced Events in KurrentDB's Admin UI
## Step 3: Browse OrderPlaced Events in KurrentDB Admin UI

1. Click the `Stream Browser` link from the top navigation bar.

Expand Down
Loading