9

使用 Python API 构建流应用程序

 3 years ago
source link: https://developer.ibm.com/zh/patterns/build-a-streaming-app-using-ibm-streams-python-api/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Code Pattern

使用 Python API 构建流应用程序

使用 Jupyter Notebook 和 Streamsx 构建应用程序,以用于处理用户浏览网站时发生的鼠标点击事件的数据

Richard Hagarty 发布: 2020-11-24


本教程已纳入学习路径:IBM Streams 入门

级别 主题 类型 100 IBM Streams 简介 文章 101 无需编写代码即可创建您的首个 IBM Streams 应用程序 教程 201 从 Apache Kafka 提取数据 Code Pattern 301 使用 Python API 构建流应用程序 Code Pattern 401 使用机器学习模型对流数据评分 Code Pattern

在本开发者 Code Pattern 中,我们将创建一个 Jupyter Notebook,其中包含用于通过 Streamx API 构建流应用程序的 Python 代码。使用 IBM Cloud Pak® for Data 上的 IBM Streams 来构建应用程序。

通过 Python API Streamx,您可以构建使用 IBM Streams(一个在 IBM Cloud Pak for Data 上运行的服务)的流应用程序。IBM Cloud Pak for Data 平台还提供了其他支持,例如,与多个数据源集成、内置分析、Jupyter Notebook 和机器学习。通过跨多个计算资源分配流程来增强可扩展性。

在本 Code Pattern 中,我们将通过使用 Streamx Python API 创建 Jupyter Notebook 以构建流应用程序。该应用程序将处理在用户浏览购物网站时发生的鼠标点击事件的数据流。

  1. 用户在 IBM Cloud Pak for Data 中运行 Jupyter Notebook。
  2. 将点击流数据插入到流应用程序中。
  3. 在 IBM Streams 服务中执行使用 Streamx Python API 的流应用程序。
  4. 用户访问 IBM Streams 服务作业以查看事件。

可以在 README 文件中找到本 Code Pattern 的详细步骤。这些步骤将展示如何:

  1. 克隆存储库。
  2. 将 IBM Streams 服务添加到 IBM Cloud Pak for Data 中。
  3. 在 IBM Cloud Pak for Data 中创建一个新项目。
  4. 将一个数据资产添加到该项目中。
  5. 将一个 Notebook 添加到该项目中。
  6. 运行该 Notebook。
  7. 在 IBM Streams Service 面板中查看作业状态。
  8. 取消该作业。

这是学习路径的一部分,它将指导您完成用于构建 IBM Streams 应用程序的步骤。本系列博客文章介绍了多种创建流应用程序的方法,并说明了如何浏览支持这些方法的平台。继续学习本系列中的最后一篇 Code Pattern:使用机器学习模型对流数据评分

本文翻译自:Build a streaming app using a Python API(2020-11-23)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK