Skip to content

Commit

Permalink
Small fixes for example documentation (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Böhm <[email protected]>
  • Loading branch information
torbsto and chrboehm authored Jul 20, 2022
1 parent 332511b commit f3255cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
11 changes: 4 additions & 7 deletions docs/docs/user/examples/real-time-customer-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The code can be found in [Quick's example repository](https://github.com/bakdata
The example uses the real world data set [LFM-1b](http://www.cp.jku.at/datasets/LFM-1b/).
The Kafka Streams application is written based on our open source [streams-bootstrap library](https://github.com/bakdata/streams-bootstrap).

---

Finally, there is a video explaining this example:
<div class="video-wrapper">
Expand All @@ -28,7 +27,7 @@ Finally, there is a video explaining this example:
title="YouTube video player" width="900" height="500" ></iframe>
</div>

## The Input: Listening Events
## Input: Listening events

Every time a customer listens to a song, the system emits a listening event containing the ids of album, artist and track.
The system additionally attaches metadata such as the timestamp to the event.
Expand All @@ -42,12 +41,12 @@ Later, a Kafka Streams application processes it for the customer profile creatio
{"userId": 1335, "artistId": 13866, "albumId": 29007, "trackId": 83201, "timestamp": 1568052385}
```

## The Quick Configuration
## Quick configuration

### The Global GraphQL Schema
### Global GraphQL schema

First, define the global schema with GraphQL.
The query called `getUserProfile` combines six metrics of the customer profile:
The query called `getUserProfile` combines six metrics for the customer profile:

- total listening events
- the first and last time a user listened to a song
Expand Down Expand Up @@ -160,15 +159,13 @@ The user profile has the following metrics:
- total number of listening events

1. Create topics that later store the corresponding data:

```shell
quick topic create firstlisten --key long --value long
quick topic create lastlisten --key long --value long
quick topic create counts --key long --value long
```

2. Deploy the applications:

```shell
quick app deploy firstlisten \
--registry bakdata \
Expand Down
23 changes: 10 additions & 13 deletions docs/docs/user/examples/real-time-monitoring.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
# Real-time monitoring and analytics

This use case demonstrates how Quick can be used to process data streams
and consume the results to build live dashboards.
This use case demonstrates how Quick can be used to process data streams and consume the results to build live dashboards.
For that, we consider the example of a car-sharing company.
Their fleet of cars drives around the city.
All of them emit statuses that, among others, include the trip's and vehicle's ids
as well as the car's current position and battery level.
All of them emit statuses that, among others, include the trip's and vehicle's ids as well as the car's current position and battery level.

## What this will demonstrate

- aggregations on an incoming stream
- how to join topic data at query-time
- subscriptions in action
- the ingest REST API used by an example producer

A [dashboard](https://carsharing.d9p.io/) displays this information on an interactive map.

[![carsharing-app](../../assets/images/carsharing.png)](https://carsharing.d9p.io/)

---
<div class="video-wrapper">
<iframe allow="accelerometer; autoplay;
clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube-nocookie.com/embed/fJz-Rasp7fE"
title="YouTube video player" width="900" height="500" ></iframe>
</div>

---

## What this will demonstrate

- the deployment of an aggregating application
- how to join topic data at query-time
- the usage of subscriptions
- the ingestion of demo data into your system

## Apache Kafka and data processing

Expand Down

0 comments on commit f3255cc

Please sign in to comment.