Streams applications can be developed in SPL, Python, Java, and Scala. This article is a collection of resources to help you create operators or entire applications in Java.
There are many reasons why you might want to use Java in your Streams application. The most common reason would be if you have existing Java code or libraries that you would like to use in your Streams application, you can write a primitive Java operator that is invoked in your SPL composite. You can also create your entire Streams application using only Java by using the Java Application API.
The first portion of this article is a collection of resources on how to develop Java primitive operators, and the second set of resources are all related to using the Java Application API.
If you are new to Streams and have not done so already, I recommend you follow the Quick Start Guide. This will help you understand Streams concepts and be better equipped to create your own applications. For a deeper dive into Streams, you can also take the Streams course.
Developing Java primitive operators
Streams Studio, the IDE for Streams, makes creating a Java operator very easy. See how it is done in 1 minute in the following video:
Using the operator is also fairly simple, as shown in this next video:
There are several more videos in this series, see the Java Operator development guide for detailed information.
- Learn how to use Java annotations to develop Java Primitive Operators: Simplified Java Operator Development
- API Reference
Debug and Performance for Java Operators
- Prevent data loss in your Java operator: add a consistent region by following this guide
- Performance Tuning with Java Operators: Performance Tuning Tips for Java Operators
Debugging a Java Operator: How to debug Java operators using the Eclipse Java Debugger?
Developing Streams applications using only Java
The streamsx.topology project on Github includes the Java Application API that allows you to create Streams applications using only Java. The advantage of this is that you do not have to learn SPL! The toolkit is included in Streams but you can download the latest release from GitHub.
- Learn more by following the developer guide:
- Tips on using Java 8 with the Java Application API
- Javadoc for the API and its samples.
- streamsx.topology project on Github
The streamsx.topology project includes samples that demonstrate how to perform common tasks. These samples are included in the toolkit.
- Find a sample in the Samples Catalog
- Ask a question on the forums or StackOverflow
- Articles on Streamsdev tagged “Java”