Stream Applications¶
Learn about stream application concepts, a programming language made for stream applications, and get started developing and running these types of applications.
Concepts¶
Review Development concepts to learn about stream applications and what they're comprised of.
Specifically, learn about:
- What a stream application is
- Data streams, tuples, their attributes, and types
- How windows logically group tuples and how punctuation act as stream control signals
- What an operator is, their different types, and what an operator invocation is
Streams Processing Language (SPL)¶
SPL is a programming language designed for streaming data and distributed data flow applications. See the language overview to get an introduction to the language.
Applications written in SPL must be compiled using the SPL compiler (which is shipped with Teracloud Streams) before they can be run.
Set up a development environment¶
To develop stream applications, you need a Teracloud Streams installation. An install can be obtained using any of the following methods:
-
- Quick Start Edition (QSE)
- A container that provides a free, non-production version of Teracloud Streams suitable for desktops and developer machines.
- The system you wish to run the QSE on must have a container runtime. See the QSE Requirements and Restrictions sections for more information.
-
- Product installer
- Installs a full installation of Teracloud Streams suitable for production and multi-node deployments.
- See the hardware and software requirements for supported systems.
To write applications, you can use Visual Studio Code (VS Code) and the Teracloud Streams extension, or use a text editor and command-line interface (CLI).
Choose your preferred installation method and development tool, then follow one of the options below:
Try out Streams quickly in a full-featured, preconfigured, and auto-managed environment
- Follow these instructions to get a VS Code window preconfigured and ready for Streams application development.
Try out Streams quickly in a full-featured environment, but manually manage tools and the QSE container
- Follow the QSE Getting Started section to start the container.
-
Follow the instructions for your development tool:
- Install the VS Code Dev Container extension
- Open the Command Palette (Click
View -> Command Palette...) - Type in and select
Attach to Running Container... - Select the QSE container
- In the VS Code window connected to your container, install the Teracloud Streams extension:
- Bring up the Extensions view by clicking on the
icon in the Activity Bar
- Search for Teracloud Streams and click on the Install button.
- Bring up the Extensions view by clicking on the
- Configure the extension to point to your Streams install
- Follow the QSE's Accessing the container section
Install Streams on one or more hosts for enterprise-level environments
- Contact the Streams team for a product installer.
- Follow Preparing to install Teracloud Streams to plan and perform the install.
-
Follow the instructions for your development tool:
- Install the VS Code Remote Development extension
- Open the Command Palette (Click
View -> Command Palette...) - Type in and select
Add New SSH Host... - Follow the prompt to enter your username and hostname (e.g.,
user1@example.com) - Follow the prompt to choose a config file to save these settings to
- In the Command Palette, enter
Connect Current Window to Host... - Follow the prompt to enter your password
- In the VS Code window connected to your remote host, install the Teracloud Streams extension:
- Bring up the Extensions view by clicking on the
icon in the Activity Bar
- Search for Teracloud Streams and click on the Install button.
- Bring up the Extensions view by clicking on the
- Configure the extension to point to your Streams install
- Install the Teracloud Streams extension:
- Bring up the Extensions view by clicking on the
icon in the Activity Bar
- Search for Teracloud Streams and click on the Install button.
- Bring up the Extensions view by clicking on the
- Configure the extension to point to your Streams install
- Access a host with Streams installed via SSH or another method
- Set up your environment for Streams:
source <streams-install>/bin/streamsprofile.sh
Write, build, and run your first application¶
Follow the HelloWorld SPL tutorial to create and run an application.
QSE users
You can skip the first step because the Streams environment is already set up.
VS Code users
For step 5 and 6, see Building applications and Running standalone to build and run the application within VS Code.