如何将 IBM Infosphere Streams 应用程序与 IBM Bluemix Watson 集成?

How to Integrate a IBM Infosphere Streams application with IBM Bluemix Watson?

我是 IBM InfoSphere Streams 的新手,我正在使用 InfoSphere Streams 快速入门版。我正在尝试开发一个从 Watson IoT 设备获取输入的应用程序。我浏览了一个教程,该教程告诉我们如何将数据发送到 InfoSphere Streams 控制台,他们刚刚使用了一个 .sab 文件。他们使用 com.ibm.streamsx.iot 工具包从 Watson IoT 设备获取数据。我正在尝试下载并安装 streams.iot 工具包以使用 Streams Studio 开发应用程序。但是我找不到 streams.iot 工具包的正确位置。我也找不到将此工具包配置到 Stream Studio 的方法。谁能告诉我在 Streams studio 中下载、安装和使用 com.ibm.streamsx.iot 的步骤。

物联网工具包设计为微服务。如 IOT 工具包所述,要连接到您的设备,您需要做的就是使用 Streams 控制台提交 SAB 文件。该工具包充当 Watson IOT Platform 和 Streams 应用程序之间的桥梁。该服务采用发布-订阅模型。要在您的 Streams 应用程序中接收事件,您需要从 IOT 网桥订阅您的设备事件。

此处的自述文件提供了有关 IOT 工具包的良好背景描述: https://github.com/IBMStreams/streamsx.iot

要在 Streams Studio 中使用 IOT 工具包:

  1. 从此处下载版本:https://github.com/IBMStreams/streamsx.iot/releases/tag/v0.8.0
  2. 按照发布安装文档中的说明进行操作。下载 IOT 工具包及其所有依赖项。
  3. 要让您的应用程序找到这些工具包,请在 Streams Studio 中打开 Streams Explorer 视图。
  4. 展开 "InfoSphere Streams Installation" 树项,继续展开直到看到 "Toolkit Locations" 项
  5. 右键单击 "Toolkit Locations" 项,右键单击 -> 添加工具包位置
  6. 在出现的对话框中,浏览您的工具包所在的目录。单击确定。对所需的每个工具包重复上述步骤。

您现在可以编写使用 IOT 工具包的 Streams 应用程序了。

要了解有关 Streams Studio 的更多信息,请查看此 Streams Studio 快速入门指南: https://developer.ibm.com/streamsdev/docs/studio-quick-start/

看看这个视频: https://youtu.be/ir_nUv4maL4

这是一个演示如何将 Streams 与 Watson IOT Platform 集成的入门工具包: https://github.com/IBMStreams/streamsx.waterConservation.starterKit