Developers: Articles

Home
Documentation
Library
Sample Code and Applications
FAQs
Articles
Community
Training
Download Center
Contact DevZone

Printer Friendly

Library Articles

The StreamBase Library presents technical articles about a variety of topics:

StreamBase 5 Articles

New Features in StreamBase Studio — Describes the changes and enhancements to StreamBase Studio resulting from the full integration of Studio into the Eclipse Integrated Development Environment.

Using the StreamBase Studio Custom Function Wizard — Explains how to write, test, and deploy custom functions (both simple and aggregate), which are used to manipulate streaming data in ways not provided by the 90+ built-in StreamBase functions.

Using the StreamBase Studio Java Operator Wizard — Explains how to write, test, and deploy custom Java operators, which are used to manipulate streaming data in ways not provided by the built in operators.

Using the StreamBase Studio Client Wizard — Explains how to write, test, and deploy Java applications that enqueue or dequeue tuples from a StreamBase application..

Working with Shared Query Tables  — Describes the declaration and usage of shared query tables.

Using Configuration to Add a Custom Function to a StreamBase Application  — Explains how a <custom-function> configuration entry can be used to integrate a simple or aggregate custom function into a StreamBase application. This approach avoids the necessity of using the calljava or callcpp functions to invoke a custom function.

Detecting Patterns in StreamBase Applications  — Describes the pattern matching language introduced in StreamBase 5.0, and presents examples of applying pattern matching to tuples/events enqueued to single and multiple streams.

Defining Dequeue Predicates  — This article describes how to restrict the tuples emitted by an output stream by defining a dequeue predicate. Only those tuples for which the predicate evaluates to true will be emitted on this stream.

Using the BLOB Data Type  — Introduces the new BLOB (Binary Large Object) data type, which provides an efficient way of handling large, variable length binary data (or text documents)

Version Control with StreamBase 5  — Explains how to use new StreamBase 5 features for version control and comparison ("diff") of StreamBase applications

Using the Adobe Flex Adapter   — Explains how to use the Adobe Flex output adapter, for building interactive graphical clients of StreamBase applications

Using the opentick Adapter to build Market Data Applications   — Explains how to use the opentick adapter, to connect to free real-time market data, for building market data analysis applications.

 

General StreamBase Articles

Tracking the Top N Query Items  — Describes an application that demonstrates how to use the Query Operator's limit number of output rows option.

Obtaining Monitoring Data from a StreamBase Application  — Explains how you can write your own StreamBase Monitor listener client in Java, by extending the classes in the package com.streambase.sb.monitor. Compared to the prewritten monitoring utilities, writing your own monitoring application gives you a much higher level of control over the presented information.

Adding a Unique ID Field to a Tuple's Schema   — There are many cases within a StreamBase application when it is necessary to uniquely identify a tuple. For example, there might be a need for an identifier that will be passed to an application outside of StreamBase, or the identifier may be needed to utilize the functionality inherent in a Gather, Merge, Join, or Aggregate EventFlow operator or their equivalent StreamSQL statements. This article explains a number of approaches to generating a unique ID.

Understanding How Windows Open and Close  — When developing an EventFlow application, you use an aggregate operator to compute aggregations over moving windows of tuple values. The window is defined through entries you make on the Edit Dimension window, which is accessed through the aggregate operator's Properties view, Dimensions tab. This article discusses how the entries you make in the Opening policy and Window size groups affects the behavior of the window.

Controlling Window Size — Part 1  — Frequently it would be useful if the size of a tuple based window dimension could be changed while an application is running. The article describes a StreamBase application with the capability of managing the dimensions of a downstream field based window so that it behaves as a reconfigurable tuple based window.

Controlling Window Size — Part 2  — Frequently it would be useful if the size of a time based window dimension could be changed while an application is running. The article describes a StreamBase application with the capability of managing the dimensions of a downstream field based window so that it behaves as a reconfigurable time based window.

Controlling Window Size — Part 3  — Whenever a read operation is performed against a query table, materialized window, or external RDBMS, the result set may include multiple rows, each of which becomes a tuple that the downstream operators must process. Since the result sets may contain a variable number of rows, your application must have some mechanism to determine when the tuples derived from one result set end and tuples from a subsequent result set begin. This article describes how you accomplish this task.

Modularization of StreamBase Applications   — A StreamBase EventFlow or StreamSQL application may incorporate any existing Application Diagram or StreamSQL Application as a modular component. This article describes the benefits of taking a modular approach to building complex StreamBase applications, and gives examples.

Using the StreamBase XML Normalizer  — Explains how to use the StreamBase XML Normalizer, which is a custom Java operator that takes a well-formed XML string and creates one or more output tuples from the parsed XML. The StreamBase XML Normalizer is available from the Developer Zone as an add-on kit.

Understanding How Null Values Are Processed in a StreamBase Application  — Describes how null values are processed in a StreamBase application.

Using Dynamic Variables  — A dynamic variable is used to store a tuple field value for later use. For example, your application may maintain a threshold value that is compared to a field value in each tuple processed. StreamBase 3.7 added the DECLARE statement in StreamSQL, allowing you to define and use dynamic variables in your .ssql applications (in addition to dynamic variables in .sbapp EventFlow applications).

Measuring Application Performance  — Explains how to measure throughput and latency of an application under development, determine the comparative performance of competitive products, and measure the effect of a technical innovation added to an existing product. It includes an example to illustrate these concepts in practice.

Stream Processing Technology — Gearing Up for Low-Latency FX Trading — Stream processing has recently emerged as a response to sophisticated monitoring and analytical applications that require low-latency processing of high volume, real-time event streams, often integrated with historical data. A Stream Processing Engine (SPE) makes it possible to execute the same types of queries and computations against real-time streaming data that were previously possible only on stored data. The goal of this article is to review the latest innovations in stream processing and describe its applications in the FX trading market.

Understanding Parameterized Modules  — Explains how you can define parameters at design time to pass data between modules in a StreamBase application. By using parameters, you can increase the reusability of your modules.

The StreamBase Server Container Model   — StreamBase containers are the building blocks for organizing and connecting multiple StreamBase applications. There is one StreamBase application per container, and each container name serves as a handle — a unique qualifier — for that application's resources. Multiple containers and applications can be run in a single StreamBase Server process, and you can share selected resources between applications.

Managing Custom Java Operators and Embedded Adapters  — Custom Java operators and embedded adapters can be individually managed using the sbadmin command. You can shut down, restart, suspend, or resume a custom Java operator or embedded adapter. Additionally, sbadmin can be used to invoke methods on a specific instance of a custom Java operator or embedded adapter, which allows reconfiguration while an application is running.

The Materialized Window Data Construct  — A materialized window is a managed view of tuples passing on a stream. The contents of a Materialized Window Data Construct are accessed through the StreamSQL EventFlow Query operator, or a StreamSQL SELECT statement.

Data Parallelism in StreamBase Applications  — The concurrency option has been extended to include the concept of data parallelism. Data parallelism is the ability within a StreamBase application to instantiate multiple instances of a StreamSQL EventFlow operator or an EventFlow or StreamSQL module. This feature may not be appropriate for your application's components. It should be used only after careful consideration.

Aggregation over Query Tables and Materialized Windows  — StreamBase 3.7 added the ability to perform aggregate calculations over a collection of tuples managed by a Query Table or Materialized Window. This functionality should reduce the complexity of your applications as it will no longer be necessary to use an EventFlow Aggregate operator or StreamSQL windowed stream to manipulate the collection and obtain aggregate values.

Handling 16-bit Character Streams  — Discusses how you can work with UTF-16 encoded character strings in your StreamBase applications.

Debugging Feature: Dequeuing Data from Intermediate Streams  — Explains how you can dequeue data from intermediate streams in your application, for debugging purposes.  

StreamBase 3.7 Java Toolkit for Eclipse Articles

These articles describe the installation and usage of the StreamBase Java Toolkit with releases of StreamBase prior to StreamBase 5. In StreamBase 5, StreamBase Studio includes all of the functionality of the toolkit and it is not necessary to install the toolkit into Studio or Eclipse.

Getting Started with the StreamBase Java Toolkit for Eclipse — Explains how to set up the StreamBase Java Toolkit for Eclipse. The Toolkit is designed to accelerate your development work, saving you valuable time as you learn the StreamBase API. After you complete the setup steps described in the article, Toolkit wizards walk you through the creation steps, and generate templates for StreamBase clients, embedded adapters, operators, and functions.

Using the StreamBase Java Toolkit to Write an Enqueuer Client  — Explains how to use the Toolkit to write a StreamBase enqueuer client, which can produce tuples on the StreamBase application's entry points, called input streams.

Using the StreamBase Java Toolkit to Write a Dequeuer Client   — Explains how to use the Toolkit to write a StreamBase dequeuer client, which can consume the processed tuples from the StreamBase application's output streams.

Using the StreamBase Java Toolkit to Write a Custom Java Operator  — Explains how to use the Toolkit to write a custom StreamBase Java Operator, which can perform special functionality not provided by the built-in StreamBase operators.

Using the StreamBase Java Toolkit to Write a Custom Simple Function  — Explains how to use the Toolkit to write a custom simple (non-aggregating) function, to manipulate the streaming data in ways not provided by the 90+ built-in StreamBase functions.

Using the StreamBase Java Toolkit to Write a Custom Aggregate Function  — Explains how to use the Toolkit to write a custom aggregate function, which can perform special aggregating work on streaming data that enters an Aggregate operator.

Using the StreamBase Java Toolkit to Write a Create an Embedded Input Adapter  — Explains how to use the Toolkit to write a custom embedded input adapter, which runs in the same process as the StreamBase Server instance that is hosting your application.

Using the StreamBase Java Toolkit to Write a Create an Embedded Output Adapter   — Explains how to use the Toolkit to write a custom embedded output adapter, which runs in the same process as the StreamBase Server instance that is hosting your application.

Using the StreamBase Java Toolkit to Write a One Shot Embedded Input Adapter   — StreamBase applications often need a simple input adapter that can be used to ensure that something always happens once — and only once — when the application starts. For example, you may need your application to update some dynamic variables or to trigger a database read in order to populate a Query Table. This article explains how to do this with an embedded input adapter.

Using the StreamBase Java Toolkit to Write a Dead End Embedded Output Adapter  — Sometimes when developing a StreamBase application, you need to temporarily ignore the output of a stream. While you could simply not connect the stream to a downstream component, at runtime these tuples would still be captured by StreamBase Studio in the Application Output View. An alternative approach would be to direct these tuples to an embedded output adapter that justs drops each tuple without attempting to write, save, or display the tuple's field values. This article explains how to do this with an embedded output adapter.