Diameter Client/Server Input, Output, Controller Adapter Samples

About the Samples

In this sample, the following adapters are demonstrated:

  1. TIBCO StreamBase® Diameter client input adapter

  2. TIBCO StreamBase® Diameter client output adapter

  3. TIBCO StreamBase® Diameter client controller adapter

  4. TIBCO StreamBase® Diameter server input adapter

  5. TIBCO StreamBase® Diameter server output adapter

  6. TIBCO StreamBase® Diameter server controller adapter

The Diameter adapters are used to communicate with other Diameter-enabled applications over a TCP or SCTP connection. The adapters follow the RFC 6733 specification.

This sample includes a server and client version of the adapters and when started, the client automatically connects to the server and sends a CER (Capabilities-Exchange-Request) message, which the server will process and returns a CEA (Capabilities-Exchange-Answer). The device watchdog messages are automatically handled and are sent between the adapters when no messages were sent for a configured period of time.

This demo also shows how you can create a new Diameter message type by updating the dictionary and creating the EventFlow to do so. The TestDictionary.json file contains a demo message set up with a demo vendor and application. This message is then used in the EventFlow; the client sends a request and the server returns an answer. The message sends a simple list of strings in field, DemoField1, and a simple string in field, DemoField2.

Running the Samples in StreamBase Studio

  1. In the Package Explorer, double-click to open the SectionedApp.sbapp. Make sure the application is the currently active tab in the EventFlow Editor.

    The SectionedApp.sbapp file is the upper level application that contains the module references to SectionedClient.sbapp and SectionedServer.sbapp which are the client and server implementations.

  2. Click the Run button. This opens the SB Test/Debug perspective and starts the application.

  3. In the Application Output view, observe tuples emitted on multiple output streams. Each stream will correspond to a specific Diameter message type.

  4. In the Manual Input view, select the SendDemoCommand stream then press the Send Data button to push a tuple into the EventFlow module. You do not need to fill out any fields in the Manual Input view as the EventFlow module contains a Map operator, StartDemoCommandRequestDefaults which supplies default values required to send this message request.

  5. Select the tuple emitted from one of the streams, then use the triangles next to the data fields displayed to analyze and understand their structure.

  6. Press F9 or click the Stop Running Application button.

  7. When done, press F9 or click the Stop Running Application button.

Importing This Sample into StreamBase Studio

In StreamBase Studio, import this sample with the following steps:

  • From the top menu, select FileLoad StreamBase Sample.

  • Type Diam and select Diameter client/server input/output adapters from the Other TIBCO Product Connectivity category.

  • Click OK.

StreamBase Studio creates a single project containing the sample files.

Sample Location

When you load the sample into StreamBase Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.

Important

Load this sample in StreamBase Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.

Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:

studio-workspace/sample_adapter_embedded_diameter

See Default Installation Directories for the location of studio-workspace on your system.