Types of operators
When developing new operators, developers need to choose the kind of operator to implement based on the task they want to accomplish, the programming language they want to use and the trade-offs they are willing to make between generality and ease of implementation.
Streams Processing Language (SPL) programmers can write many useful streaming applications without implementing their own operators. Developers can build applications by assembling operators only from the SPL Standard Toolkit or other available toolkits. However, SPL programmers eventually might want an operator to perform new functions. Implementing a new operator is different from connecting existing operators.
When you choose the type of operator to implement, you must consider whether ease of development or implementation power is more important. Implementing operators purely in SPL (Custom or composite operators) is easier because less friction is caused by shifting between different languages. However, the capabilities of the operators that programmers can implement in SPL are more limited. Choosing to implement an operator in a lower-level language such as C++ or Java™ (primitive operators) might be more appropriate. The taxonomy of operators is represented in the following figure, and is oriented by operator relationships.
This figure shows that three boxes are in a row across the top, each specifying an operator type. The SPL box branches downward to custom and composite boxes. The C++ box branches downward to a box named primitive that branches to non-generic and generic titled boxes.

- The Custom row refers to using a Custom operator by itself.
- The
Composite and custom
row refers to the technique of wrapping a Custom operator inside of a composite operator.
Operator type | Languages | Must define operator model | Is input/output port generic | Can use generated APIs | Can receive expressions as parameters | Reusable |
---|---|---|---|---|---|---|
Generic | C++, Perl | yes | yes | no | yes | yes |
Non-generic | C++ | yes | yes | yes | no | yes |
Java™ primitive | Java™ | yes | yes | no | no | yes |
JavaOp | Java™ | no | yes | yes (with generated option;
still uses reflection) |
no | yes |
Custom | SPL | no | no | n/a | no | no |
Composite and custom |
SPL | no | no | n/a | yes | yes |