Overview

This toolkit contains:

  • APIs to create applications with Python, Java, or Scala for IBM Streaming Analytics service and IBM Streams.
  • Ability to create SPL Python primitive operators.
  • Publish-subscribe stream operators to integrate streaming applications that are implemented in different languages (SPL, Python, Java, or Scala) with a microservice approach.
  • Java and Python APIs wrapping the Streaming Analytics and Streams REST APIs.

Python language support

PyPI version

  • Python Topology API — Create streaming applications entirely in Python for IBM Streams or IBM Streaming Analytics service in IBM Cloud®. The streams are created, processed, and sinked by using Python callables. (Tuples are Python objects when you use this API.)
  • SPL Python primitive operators — Easily create SPL operators that invoke Python classes or functions.
  • Python Streams REST API — Easily monitor and manage your streaming application with this REST API.
For more information, see the streamsx.topology documentation.
Python support can be installed using the streamsx package from Pypi
pip install streamsx

Java and Scala language support

The Java Application API enables a developer to create streaming applications entirely in Java and Scala for IBM Streams. The API employs a functional style of programming—a developer might define a graph's flow and data manipulation simultaneously.


    /*
     * Declare a source stream (hw) with String as tuples that sends two
     * tuples "Hello" and "World!" and prints them to output.
     */
    Topology topology = new Topology("HelloWorld");
    TStream<String> hw = topology.strings("Hello", "World!");
    hw.print();
    StreamsContextFactory.getEmbedded().submit(topology).get();
		

Publish-subscribe

Publish-subscribe operators connect streams between independent IBM Streams applications regardless of their implementation language. This capability allows a microservice approach where a Streams application acting as a service publishes one or more streams. Subscriber services then subscribe to those streams without requiring any knowledge of how a stream is published.

Unlike SPL Import/Export operators, publish-subscribe operators allow the publisher and subscriber to be totally independent. A subscriber always receives the correct tuples regardless of the number of parallel regions in the publisher or subscriber, and regardless of if the publisher allows filters. A stream is published by using a topic and its stream type.

For more information, see com.ibm.streamsx.topology.topic.

Documentation links