<a id="scripted-demo"></a>

# Scripted Confluent Platform Demo

The scripted Confluent Platform demo (`cp-demo`) example builds a full Confluent Platform deployment with an Apache Kafka® event streaming
application that uses [ksqlDB](../../ksqldb/overview.md#ksql-home) and [Kafka Streams](../../streams/overview.md#kafka-streams) for stream processing,
and secures all of the components end-to-end.
The tutorial includes a module that makes it a hybrid deployment that runs Cluster Linking and Schema
Linking to copy data and schemas from a local on-premises Kafka cluster to Confluent Cloud, a fully-managed service
for Kafka.

Follow the accompanying guided tutorial to learn how Kafka and Confluent Cloud work
with Connect, Confluent Schema Registry, Confluent Control Center, and Cluster Linking with security enabled end-to-end.

## Use case

The use case for this application is an Kafka event streaming application that processes real-time edits to real Wikipedia pages.
The following image shows the application topology:

![image](tutorials/cp-demo/images/cp-demo-overview-with-ccloud.svg)

The full event streaming platform based on Confluent Platform is described as follows:

1. Wikimedia’s [EventStreams](https://wikitech.wikimedia.org/wiki/Event_Platform/EventStreams) publishes a continuous stream of real-time edits happening to real wiki pages.
2. A Kafka source connector [kafka-connect-sse](https://www.confluent.io/hub/cjmatta/kafka-connect-sse) streams the server-sent events (SSE) from [https://stream.wikimedia.org/v2/stream/recentchange](https://stream.wikimedia.org/v2/stream/recentchange), and a custom Connect transform [kafka-connect-json-schema](https://www.confluent.io/hub/jcustenborder/kafka-connect-json-schema)
   extracts the JSON from these messages and then are written to a Kafka cluster.
3. Data processing is done with [ksqlDB](../../ksqldb/overview.md#ksql-home) and a [Kafka Streams](../../streams/overview.md#kafka-streams) application.
4. A Kafka sink connector [kafka-connect-elasticsearch](https://www.confluent.io/hub/confluentinc/kafka-connect-elasticsearch) streams the data out of Kafka and is materialized into [Elasticsearch](https://www.elastic.co/products/elasticsearch) for analysis by [Kibana](https://www.elastic.co/products/kibana).

All data is in Avro format, uses Confluent Schema Registry, and [Confluent Control Center](https://www.confluent.io/product/control-center/) is managing and monitoring the deployment.

## Data pattern

The data pattern for this application is as follows:

| Components                   | Consumes from                | Produces to                        |
|------------------------------|------------------------------|------------------------------------|
| SSE source connector         | Wikipedia                    | `wikipedia.parsed`                 |
| ksqlDB                       | `wikipedia.parsed`           | ksqlDB streams and tables          |
| Kafka Streams application    | `wikipedia.parsed`           | `wikipedia.parsed.count-by-domain` |
| Elasticsearch sink connector | `WIKIPEDIABOT` (from ksqlDB) | Elasticsearch/Kibana               |

## How to use this tutorial

We suggest following the `cp-demo` tutorial in order:

1. [Module 1: Deploy the Confluent Platform Demo Environment](on-prem.md#cp-demo-on-prem-tutorial): bring up the on-premises Kafka cluster and explore the different technical areas of Confluent Platform
2. [Module 2: Deploy Hybrid Confluent Platform and Confluent Cloud Environment](hybrid-cloud.md#cp-demo-hybrid): create a cluster link to copy data from a local on-premises Kafka cluster to Confluent Cloud, and use the Metrics API to monitor both
3. [Troubleshoot and Stop the Confluent Platform Demo](teardown.md#cp-demo-teardown): troubleshoot issues with the demo and clean up your on-premises and Confluent Cloud environments
