Contents
Use the Feed Simulations view to send test data to a running StreamBase
application. This view shows the available feed simulation configurations
(sbfs) in your Studio workspace. The Feed Simulations
view allows you to run or stop the feed simulation, and to dynamically change the
date rate.
A companion to the Feed Simulations view is the Feed Simulation Editor, where you can
define new feed simulations or edit existing ones. Open the Feed Simulations Editor
by double-clicking an sbfs file in the Feed Simulations
view. See Using the Feed Simulation
Editor for more on editing a feed simulation's settings.
If your feed simulation requires a data file, you can either import an existing one into a project, or create and edit a new one in StreamBase Studio. To create a new one, click → → . In the New File dialog, select the project containing the application, and specify a file name. A new, empty file is opened in a Text Editor, where you can edit and save it.
Note
StreamBase 3.7 introduced a new version of the StreamBase
Feed Simulator and a new file format for the sbfs
feed simulation files. If you have feed simulations saved with
StreamBase 3.5 or earlier, you can upgrade to the 3.7+ format. See
Upgrading Legacy Feed Simulations.
Remember that you must run your StreamBase application (sbapp or ssql) before you can use the
Feed Simulations view. That is, a StreamBase Server process
must be running and hosting the application.
In the SB Test/Debug perspective, click the Feed Simulations tab to bring it to the front.
If you have many feed simulations in your workspace, you may see a progress bar in
the Feed Simulations view as it loads. The StreamBase Server validates
each feed simulation in the workspace against the input streams defined in the
running application. Feed simulations can be shared between applications and
projects, and are not tied to a particular application. However, to successfully run
a feed simulation, each stream name configured in the sbfs must match an Input Stream name in the running application.
The figure below shows a sample Feed Simulations View. The workspace in this example
contains feed simulations for two projects: sample_operator and sample_bestbidsandasks.
The red icons (
) indicate that those .sbfs files do not
have streams compatible with the running application as described in Status Indicators and Display Options.
In this example, the running application is the BestBidsAsks.sbapp, from the sample applications shipped with StreamBase.
To run the NYSE.sbfs feed simulation, select it and
click the button. Another way to start it is to
right-click the .sbfs file name, and select
Run Feed Simulation from the pull-down menu.
If this feed simulation is defined to log its data to the Application Input view, you see the inbound generated or trace data show there while the feed simulation is running. In addition, when processing results occur on the dequeue streams, that data is shown in the Application Output view.
In the example above, the Feed Simulations view contains a Status column, showing the number of tuples sent to the application thus far (12,000 in this example).
During the running of the feed simulation, you can increase the data rate with the slider in the Feed Simulations view. Click the button to shut down the feed simulation. The server process continues to run until you shut it down separately.
The Feed Simulations view uses icons to indicate whether the sbfs feed simulations are compatible with the running application.
A feed simulation with a red icon (
) or yellow icon (
) does not
indicate that the flagged feed simulation has an inherent problem, only that it is
incompatible with the currently running application.
The red icon indicates that the simulation was designed for another application that uses different stream names. Select a feed simulation row to see error text on why that simulation cannot run with the current application.
The yellow icon indicates that the input stream name matches an input stream in the currently running application, but one or more fields in the schema are mismatched or have invalid data.
The yellow icon error shown in the example above can happen when you have multiple
feed simulations in your workspace, and there is a common stream name (in this
example, NYSE_Feed), but the schemas are different.
That is, the running application has a schema that matches the schema defined in the
NYSE.sbfs configuration, but does not match the schema
in the NYSE2.sbfs configuration.
The Run button is disabled when a red icon feed simulation is selected. It is not disabled for yellow icon simulations. That is, It is possible to run a feed simulation with a yellow warning icon, but it is not recommended. Best practice is to only run feed simulations that have no warning icons.
You can temporarily hide feed simulations that have red error icons. In the upper-right corner of the Feed Simulations view, click the down-pointing triangle button and select Hide Feed Simulations with errors. The resulting display is shown here:
The Hide Feed Simulations control is a toggle: select it again to restore the full feed simulations view.
To stop a running feed simulation, click the button in the Feed Simulations view. The running application continues to run.
If you stop the running application, any running feed simulations also stop.
When you re-run a stopped feed simulation, StreamBase Studio starts the feed simulation over from the beginning. There is no mechanism to pause and restart a running simulation.
