-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #182 from quixio/dev
Docs Release 2023-07-002 (10 Jul 2023)
- Loading branch information
Showing
14 changed files
with
168 additions
and
29 deletions.
There are no files selected for viewing
Binary file added
BIN
+88.1 KB
docs/platform/images/integrations/confluent/confluent-broker-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Connect to Confluent Cloud | ||
|
||
Quix requires Kafka to provide streaming infrastructure for your Quix workspace. | ||
|
||
When you create a new Quix workspace, there are three hosting options: | ||
|
||
1. **Quix Broker** - Quix hosts Kafka for you. This is the simplest option as Quix provides hosting and configuration. | ||
2. **Self-Hosted Kafka** - This is where you already have existing Kafka infrastructure that you use, and you want to enable Quix to provide the stream processing platform on top of it. You can configure Quix to work with your existing Kafka infrastructure using this option. | ||
3. **Confluent Cloud** - if you use Confluent Cloud for your Kafka infrastructure, then you can configure Quix to connect to your existing Confluent Cloud account. | ||
|
||
This documentation covers the third hosting option, Confluent Cloud. | ||
|
||
## Sign up for a Confluent Cloud account | ||
|
||
If you do not already have Confluent Cloud account, you can [sign up for a free trial](https://www.confluent.io/confluent-cloud/tryfree/). | ||
|
||
## Selecting Confluent Cloud to host Quix | ||
|
||
When you create a new Quix workspace, you can select your hosting option in the `Broker settings` dialog, as shown in the following screenshot: | ||
|
||
![Broker Settings](../../images/integrations/confluent/confluent-broker-settings.png) | ||
|
||
Select the option `Connect to your Confluent Cloud`. | ||
|
||
## Confluent Cloud setup guide | ||
|
||
When you choose the `Connect to your Confluent Cloud` broker setting, the `Confluent Cloud Setup Guide` is displayed, as shown in the following screenshot: | ||
|
||
![Broker Settings](../../images/integrations/confluent/confluent-cloud-setup.png) | ||
|
||
All the required configuration information can be found in your Confluent Cloud account. | ||
|
||
!!! note | ||
|
||
If you already have topics created in your Confluent Cloud, you can synchronize these with your Quix workspace. The `Synchronize Topics` checkbox is enabled by default. |
6 changes: 3 additions & 3 deletions
6
docs/platform/tutorials/image-processing/connect-video-tfl.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# 6. Stream merge | ||
|
||
In this part of the tutorial you add a stream merge service into the pipeline. This service merges the inbound streams into one outbound stream. This is required because the images from each traffic camera are published to a different stream, allowing the image processing services to be scaled up if needed. Once all the image processing is completed and to allow the UI to easily use the data generated by the processing stages, the data from each stream is merged into one stream. | ||
|
||
Follow these steps to deploy the **Stream merge service**: | ||
|
||
1. Navigate to the `Code Samples` and locate `Stream merge`. | ||
|
||
2. Click `Deploy`. | ||
|
||
3. And again, click `Deploy`. | ||
|
||
This service receives data from the `image-processed` topic and streams data to the `image-processed-merged` topic. | ||
|
||
??? example "Understand the code" | ||
|
||
Here's the code in the file `quix_function.py`: | ||
|
||
```python | ||
# Callback triggered for each new event. (1) | ||
def on_event_data_handler(self, stream_consumer: qx.StreamConsumer, data: qx.EventData): | ||
print(data.value) | ||
|
||
# All of the data received by this event data handler is published to the same predefined topic (2) | ||
self.producer_topic.get_or_create_stream("image-feed").events.publish(data) | ||
|
||
# Callback triggered for each new parameter data. (3) | ||
def on_dataframe_handler(self, stream_consumer: qx.StreamConsumer, df: pd.DataFrame): | ||
|
||
# Add a tag for the parent stream (4) | ||
df["TAG__parent_streamId"] = self.consumer_stream.stream_id | ||
|
||
# add the base64 encoded image to the dataframe (5) | ||
df['image'] = df["image"].apply(lambda x: str(base64.b64encode(x).decode('utf-8'))) | ||
|
||
# All of the data received by this dataframe handler is published to the same predefined topic (6) | ||
self.producer_topic.get_or_create_stream("image-feed") \ | ||
.timeseries.buffer.publish(df) | ||
``` | ||
|
||
1. `on_event_data_handler` handles each new event on the topic that is subscribed to. | ||
2. All events are published to the output topic in a single stream called `image-feed`. | ||
3. `on_dataframe_handler` handles each new dataframe or timeseries data on the topic that is subscribed to. | ||
4. Add a tag to preserve the parent stream id. | ||
5. Add an `image` column to the dataframe and set the value to the base64 encoded image. | ||
6. All data is published to the output topic in a single stream called `image-feed`. | ||
|
||
[Part 7 - Web UI :material-arrow-right-circle:{ align=right }](web-ui.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters