Skip to content

Commit 7a37d67

Browse files
committed
Update to match style guide
1 parent 8951c16 commit 7a37d67

File tree

4 files changed

+88
-96
lines changed

4 files changed

+88
-96
lines changed

tutorials/kafka-live-viewer-profiles/conclusion.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,39 @@ position: 4
33
title: Conclusion
44
---
55

6-
# Conclusion
6+
In this tutorial, you've explored the **live viewer profiles** solution accelerator for video streaming, gaining practical insights into building, deploying, and extending real-time, event-driven architectures using Snowplow and Kafka.
77

8-
In this tutorial, we have explored the **live viewer profiles** solution accelerator for video streaming, gaining practical insights into building, deploying, and extending real-time, event-driven architectures using Snowplow and Kafka.
8+
## Understanding the process
99

10-
## Key Takeaways
11-
12-
### Understanding the Process
13-
We successfully have built a real time system for processing event data including:
14-
- **Web Tracking Application** for collecting media events.
10+
You have successfully built a real time system for processing event data including:
11+
- **Web tracking application** for collecting media events
1512
![Application Output](images/video.png)
16-
- **Snowplow Collector and Snowbridge** for event processing and forwarding.
17-
- **Live Viewer Backend** for managing real-time data with Kafka and DynamoDB.
18-
- **Live Viewer Frontend** for visualizing real-time user activity on the web tracking application.
13+
- **Snowplow Collector and Snowbridge** for event processing and forwarding
14+
- **Live Viewer back-end** for managing real-time data with Kafka and DynamoDB
15+
- **Live Viewer front-end** for visualizing real-time user activity on the web tracking application
1916
![Live viewer frontend](images/live-viewer.png)
2017

2118
This architecture highlights how real-time insights can be achieved using event-driven systems in a streaming context.
2219

23-
### What We Achieved
24-
We explored how to:
25-
1. Use LocalStack to emulate AWS services for local development and testing.
26-
2. Launch and interact with the system components, such as the Kafka UI and LocalStack UI.
27-
3. View and verify the real-time event data from the browser using Snowplow's media tracking capabilities.
28-
4. Deploy the solution in an AWS environment using Terraform.
20+
## What you achieved
21+
22+
You explored how to:
23+
1. Use LocalStack to emulate AWS services for local development and testing
24+
2. Launch and interact with the system components, such as the Kafka UI and LocalStack UI
25+
3. View and verify the real-time event data from the browser using Snowplow's media tracking capabilities
26+
4. Deploy the solution in an AWS environment using Terraform
27+
28+
## Practical applications
2929

30-
### Practical Applications
3130
This tutorial can be extended to utilize Snowplow event data for other real-time use cases, such as:
32-
- Web Engagement analytics.
33-
- Personalized recommendations.
34-
- Ad performance tracking.
31+
- Web Engagement analytics
32+
- Personalized recommendations
33+
- Ad performance tracking
34+
35+
## Next steps
3536

36-
## Next Steps
37-
- **Extend tracking:** Extend the solution to track more granular user interactions or track on a new platform such as mobile.
38-
- **Extend dashboard:** Extend the Live Viewer to include information on the media being watched and the user.
39-
- **Replace the state store:** Replace Amazon DynamoDB with an alternative to be cloud agnostic, e.g. Google Bigtable or MongoDB.
37+
- **Extend tracking:** extend the solution to track more granular user interactions or track on a new platform such as mobile
38+
- **Extend dashboard:** extend the Live Viewer to include information on the media being watched and the user
39+
- **Replace the state store:** replace Amazon DynamoDB with an alternative to be cloud agnostic, e.g. Google Bigtable or MongoDB
4040

41-
By completing this tutorial, you are equipped to harness the power of event-driven systems and Snowplows analytics framework to build dynamic, real-time solutions tailored to your streaming and analytics needs.
41+
By completing this tutorial, you're equipped to harness the power of event-driven systems and Snowplow's analytics framework to build dynamic, real-time solutions tailored to your streaming and analytics needs.

tutorials/kafka-live-viewer-profiles/deploy-aws-terraform.md

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,13 @@ position: 3
33
title: Deploy on AWS with Terraform
44
---
55

6-
# Deploy on AWS with Terraform
6+
The following steps will deploy the solution accelerator to AWS using Terraform. This is an alternative to the Localstack method. There is no need to manually install [Terraform](https://www.terraform.io/). It is executed via [Docker](https://www.docker.com/) using the `terraform.sh` script.
77

8-
## Introduction
8+
## Step 0: Prerequisites
99

10-
The following [Steps](#steps) will deploy the solution accelerator to AWS using Terraform. There is no need to manually install [Terraform](https://www.terraform.io/). It is executed via [Docker](https://www.docker.com/) using the `terraform.sh` script.
11-
12-
## Steps to Deploy the Application
13-
14-
### Step 0: Prerequisites
15-
16-
1. Open a terminal.
17-
2. Install **Docker** and **Docker Compose**.
18-
3. [Clone the project](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles) and navigate to its directory.
10+
1. Open a terminal
11+
2. Install **Docker** and **Docker Compose**
12+
3. [Clone the project](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles) and navigate to its directory
1913
```bash
2014
git clone https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles.git
2115
```
@@ -27,20 +21,19 @@ AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxx
2721
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxx
2822
```
2923

30-
31-
### Step 1: Initialize the Project
24+
## Step 1: Initialize the project
3225

3326
```bash
3427
$ ./terraform/terraform.sh init
3528
```
3629

37-
### Step 2: Create the Infrastructure
30+
## Step 2: Create the infrastructure
3831

3932
```bash
4033
$ ./terraform/terraform.sh apply
4134
```
4235

43-
### Step 3: Access the EC2 Instance that Runs the Apps in AWS
36+
## Step 3: Access the EC2 instance that runs the apps in AWS
4437

4538
```bash
4639
$ ./terraform/apps/ssh.sh
@@ -56,24 +49,25 @@ $ ./down.sh # <- stop the Docker containers
5649
$ ./up.sh # <- start the Docker containers
5750
```
5851

59-
### Step 4: Open Access to the Applications
52+
## Step 4: Open access to the applications
6053

61-
Review the [LocalStack guide](/tutorials/kafka-live-viewer-profiles/quickstart-localstack) for the default configuration for each component. Open public access to the two frontend applications and the Snowplow Collector using a HTTP load balancer so that anyone can watch the video, submit events to the pipeline, and see information on concurrent users.
54+
Review the [LocalStack guide](/tutorials/kafka-live-viewer-profiles/quickstart-localstack) for the default configuration for each component. Open public access to the two front-end applications and the Snowplow Collector using a HTTP load balancer so that anyone can watch the video, submit events to the pipeline, and see information on concurrent users.
6255

6356
The applications listen for HTTP traffic on the following ports
64-
- Web tracker front end - 3000
65-
- Live viewer front end - 8280
66-
- Snowplow collector - 9090
57+
- Web tracker front-end - 3000
58+
- Live viewer front-end - 8280
59+
- Snowplow Collector - 9090
60+
61+
## Next steps
6762

68-
## Next Steps
6963
- You can implement Snowplow media tracking on any [HTML5](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/media/html5/) or [YouTube](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/media/youtube/) media of your choice
70-
- Look into the output from Kafka and extend the Live Viewer to include information on the media being watched and the user.
71-
- Replace Amazon DynamoDB with an alternative to be cloud agnostic, e.g. Google Bigtable or MongoDB.
64+
- Look into the output from Kafka and extend the Live Viewer to include information on the media being watched and the user
65+
- Replace Amazon DynamoDB with an alternative to be cloud agnostic, e.g. Google Bigtable or MongoDB
7266
---
7367

74-
## Other Commands
68+
## Other commands
7569

76-
### Check Versions
70+
### Check versions
7771

7872
```bash
7973
$ ./terraform/terraform.sh --version
@@ -87,13 +81,13 @@ on linux_amd64
8781
+ provider registry.terraform.io/hashicorp/tls v4.0.6
8882
```
8983

90-
### Check the Terraform Plan
84+
### Check the Terraform plan
9185

9286
```bash
9387
$ ./terraform/terraform.sh plan
9488
```
9589

96-
### Generate a PNG Image for the Terraform Modules in This Project
90+
### Generate a PNG image for the Terraform modules in this project
9791

9892
```bash
9993
$ ./terraform/terraform.sh png
@@ -103,7 +97,7 @@ Current PNG image of the available modules:
10397

10498
![Terraform Modules](images/terraform.png)
10599

106-
### Destroy the Infrastructure
100+
### Destroy the infrastructure
107101

108102
```bash
109103
$ ./terraform/terraform.sh destroy

tutorials/kafka-live-viewer-profiles/introduction.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,53 @@ position: 1
33
title: Introduction
44
---
55

6-
## About This Accelerator
7-
Welcome to the **live viewer profiles** solution accelerator for video streaming!
6+
Welcome to the **live viewer profiles** solution accelerator for video streaming.
87

98
This accelerator demonstrates how to build a real-time use case leveraging **Snowplow event data** to create live viewer profiles for a video streaming site. By combining Snowplow's streaming pipeline with **Apache Kafka**, a **Java application** and **AWS DynamoDB**, the solution processes live streaming events to visualize user interactions with video content and advertisements.
109

11-
On the left side of the image below we have someone watching a video. Their events are sent through a Snowplow pipeline to Kafka where they are consumed and processed by an application. The result of this processing is displayed in the right window. This shows the number of active users and their current state.
10+
On the left side of the image below, someone is watching a video. Their events are sent through a Snowplow pipeline to Kafka where they are consumed and processed by an application. The result of this processing is displayed in the right window. This shows the number of active users and their current state.
1211

1312
![Application Output](images/one-viewer.png)
1413

15-
Through this hands-on guide, youll learn how to build, deploy, and extend real-time, event-driven architectures using Snowplow and Kafka, enabling personalized recommendations, real-time insights, and dynamic analytics for streaming platforms. The framework is inspired by common challenges in video streaming, including tracking user behavior, ad engagement, and session activities, with the goal of maintaining up-to-date viewer profiles in DynamoDB.
14+
Through this hands-on guide, you'll learn how to build, deploy, and extend real-time, event-driven architectures using Snowplow and Kafka, enabling personalized recommendations, real-time insights, and dynamic analytics for streaming platforms. The framework is inspired by common challenges in video streaming, including tracking user behavior, ad engagement, and session activities, with the goal of maintaining up-to-date viewer profiles in DynamoDB.
1615

1716
This accelerator is open source and can serve as the foundation to build practical applications like real-time viewer insights, engagement analytics, ad performance tracking, and personalized recommendations. Whether you're optimizing ad placements or enhancing viewer satisfaction, this guide equips you to unlock the full potential of Snowplow event data.
1817

1918
Please start by reviewing how the application works in the next page on Localstack, even if you're planning to deploy with Terraform.
2019

21-
---
22-
23-
## Solution Accelerator Code
24-
[**The code for this infrastructure is available on here on GitHub.**](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles)
20+
## Solution Accelerator code
2521

26-
---
22+
The code for this infrastructure is available [here on GitHub](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles).
2723

2824
## Architecture
2925

3026
The solution comprises several interconnected components:
3127

32-
- **Web Tracking Application**:
33-
- A React application with a video to watch. Snowplow's media tracking has been configured to send events (e.g., play, pause, ad skipped) to the [Snowplow Collector](/docs/fundamentals).
28+
- **Web tracking application**:
29+
- A React application with a video to watch
30+
- Snowplow's media tracking has been configured to send events (e.g., play, pause, ad skipped) to the [Snowplow Collector](/docs/fundamentals)
3431
- Code available in [tracker-frontend](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles/tree/main/tracker-frontend) folder in GitHub
3532

3633
- **Snowplow Collector**:
37-
- Collects and forwards events via [Stream Enrich](/docs/fundamentals) and Kinesis to [Snowbridge](/docs/destinations/forwarding-events/snowbridge).
34+
- Collects and forwards events via [Stream Enrich](/docs/fundamentals) and Kinesis to [Snowbridge](/docs/destinations/forwarding-events/snowbridge)
3835

3936
- **Snowplow Snowbridge**:
40-
- Publishes events to Kafka for the Live Viewer Backend to consume
37+
- Publishes events to Kafka for the Live Viewer back-end to consume
4138

42-
- **Live Viewer Backend**:
43-
- A Java application which processes events from Kafka, stores the data in DynamoDB, and generates JSON state data for the Live Viewer Frontend
39+
- **Live Viewer back-end**:
40+
- A Java application which processes events from Kafka, stores the data in DynamoDB, and generates JSON state data for the Live Viewer front-end
4441
- Code available in [live-viewer-backend](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles/tree/main/live-viewer-backend) folder in GitHub
4542

46-
- **Live Viewer Frontend**:
47-
- A HTML website which displays the state of users currently watching the video.
43+
- **Live Viewer front-end**:
44+
- A HTML website which displays the state of users currently watching the video
4845
- Code available in [live-viewer-frontend](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles/tree/main/live-viewer-frontend) folder in GitHub
4946

50-
The following diagram maps out where each component sits in the end to end communication flow.
47+
The following diagram maps out where each component sits in the end-to-end communication flow.
5148
![Architecture Diagram](images/architecture.png)
5249

53-
### Components & Configuration
54-
The following files in the [GitHub repository](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles) can be used to configure the project's components.
50+
### Components and configuration
51+
52+
The following files in the [GitHub repository](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles) can be used to configure the project's components:
5553
- **Snowplow components**: `docker/compose.snowplow.yaml`
5654
- **Kafka infrastructure**: `docker/compose.kafka.yaml`
5755
- **Application components**: `docker/compose.apps.yaml`

tutorials/kafka-live-viewer-profiles/quickstart-localstack.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ position: 2
33
title: Quickstart with Localstack
44
---
55

6-
# Quickstart with Localstack
6+
The following steps will deploy the solution accelerator using Localstack.
77

8-
## Steps to Run the Application
8+
## Step 0: Prerequisites
99

10-
### Step 0: Prerequisites
11-
12-
1. Open a terminal.
13-
2. Install **Docker** and **Docker Compose**.
14-
3. [Clone the project](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles) and navigate to its directory.
10+
1. Open a terminal
11+
2. Install **Docker** and **Docker Compose**
12+
3. [Clone the project](https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles) and navigate to its directory
1513
```bash
1614
git clone https://github.com/snowplow-industry-solutions/kafka-live-viewer-profiles.git
1715
```
18-
4. Create a `.env` file based on `./docker/.env.example`. You can leave the AWS variables as placeholders when using Localstack
16+
4. Create a `.env` file based on `./docker/.env.example`
17+
5. You can leave the AWS variables as placeholders when using Localstack
1918
```bash
2019
ACCEPT_LICENSE="true"
2120
AWS_REGION=eu-west-2
@@ -24,20 +23,20 @@ AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxx
2423
AWS_ENDPOINT_URL=http://localstack:4566
2524
```
2625

27-
### Step 1: Start the Containers
26+
## Step 1: Start the containers
2827

2928
Run the following command to download and run everything in Docker:
3029

3130
```bash
3231
./docker/up.sh
3332
```
34-
Details on everything that is installed can be found in [architecture](/tutorials/kafka-live-viewer-profiles/introduction#architecture)
33+
Details on everything that's installed can be found in the [architecture](/tutorials/kafka-live-viewer-profiles/introduction#architecture) section on the previous page.
3534

3635
**Tips:**
37-
- Use `Ctrl+C` to stop services but keep containers running.
38-
- Pass service-specific options to `./docker/up.sh` (e.g., `./docker/up.sh kafka-services`).
36+
- Use `Ctrl+C` to stop services but keep containers running
37+
- Pass service-specific options to `./docker/up.sh` (e.g., `./docker/up.sh kafka-services`)
3938

40-
### Step 2: Open the Web Tracking Frontend
39+
## Step 2: Open the web tracking front-end
4140

4241
Visit [http://localhost:3000](http://localhost:3000) to configure the Stream Collector endpoint and start tracking events. Enter the Collector URL: `localhost:9090` and click `Create tracker`.
4342

@@ -51,38 +50,39 @@ You must keep this window open with the video playing because everything here is
5150

5251
![Video playing on the website](images/video.png)
5352

54-
### Step 3: Open the Live Viewer Frontend
53+
## Step 3: Open the Live Viewer front-end
5554

5655
Open [http://localhost:8280](http://localhost:8280) in a separate window. This will display the active users and their current state (e.g. watching video, watching advertisement, paused).
5756

5857
![Live viewer frontend](images/live-viewer.png)
5958

6059
Congratulations! You have successfully run the accelerator to stream web behavior through Snowplow and Kafka to a real-time dashboard.
6160

62-
## Next Steps
61+
## Next steps
62+
6363
- You can implement Snowplow media tracking on any [HTML5](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/media/html5/) or [YouTube](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/media/youtube/) media of your choice
64-
- Look into the output from Kafka and extend the Live Viewer to include information on the media being watched and the user.
65-
- Use our supplied Terraform in the next section to run this on AWS and make it publicly available.
64+
- Look into the output from Kafka and extend the Live Viewer to include information on the media being watched and the user
65+
- Use the supplied Terraform in the next section to run this on AWS and make it publicly available
6666

67-
## Other Things You Can Do
67+
## Other things you can do
6868

6969
### View Events in Kafka UI
7070

7171
Access [http://localhost:8080](http://localhost:8080) to review events within the Kafka UI.
7272

73-
### Manage Containers with LazyDocker
73+
### Manage containers with LazyDocker
7474

7575
Run the following command to manage containers visually:
7676

7777
```bash
7878
sudo ./docker/lazy.sh
7979
```
8080

81-
### Inspect Infrastructure with LocalStack UI
81+
### Inspect infrastructure with LocalStack UI
8282

8383
Visit the [LocalStack UI](https://app.localstack.cloud/) to inspect infrastructure components such as Kinesis and DynamoDB. Please note that a LocalStack account is required to view this.
8484

85-
## Cleaning Up
85+
## Cleaning up
8686

8787
### Stop the containers
8888

@@ -92,12 +92,12 @@ Shut down all running containers:
9292
./docker/down.sh
9393
```
9494

95-
### Clean Up and Delete
95+
### Clean up and delete
9696

9797
To remove all containers and images, use:
9898

9999
```bash
100100
./docker/clean.sh
101101
```
102102

103-
**Warning**: This command will delete all generated data.
103+
This command will delete all generated data.

0 commit comments

Comments
 (0)