Taking a Test Drive

To verify that your FTL installation is ready for configuration and deployment, perform the following general tasks and confirmations. This information targets simple default configurations and uses scripts and programs in the samples directory; your requirements may vary and should be reflected in your resultant configuration settings.

This section assumes operation in a Linux or macOS environment, with the FTL Server used as a message broker. Windows operation is similar, and some Windows examples are also provided.

The samples directory provides a variety of resources for testing, learning, and client programming examples. Sample applications include the following types of operations:

  • Basic Publish-Subscribe
  • Publish-Subscribe with Persistence
  • Request / Reply
  • Performance Measurement

For more information on the samples library, see the following:

  • The online community FTL Quick Start Guide
  • TIBCO FTL Administration, Sample Programs Reference
  • $TIBCO_HOME/ftl/6.5/samples/readme.txt

Prerequisites

  • TIBCO FTL installed per the prior sections in this manual

Environment Variables

For simplified operation, set the following environment variables.

  • TIBCO_HOME –– the FTL installation directory

Linux and macOS Example:

export TIBCO_HOME=/opt/tibco/

Windows:

setx TIBCO_HOME C:\tibco
Note: For Linux and macOS, set these environment variables for every new command-line window. For Windows, you must open a new Command Prompt window for the setx command to take effect.

Paths

Add the following directories to your programs search path. These examples use typical paths for default software installations and may need to be modified to reflect the specific installation directories for software on your system.

Linux and macOS example:

export PATH=$TIBCO_HOME/ftl/6.5/bin:$PATH
export PATH=$TIBCO_HOME/ftl/6.5/samples/bin:$PATH
export PATH=$TIBCO_HOME/ftl/6.5/samples/scripts:$PATH

Windows example:

set PATH=%TIBCO_HOME%\ftl\6.5\bin;%PATH%
set PATH=%TIBCO_HOME%\ftl\6.5\samples\bin;%PATH%
set PATH=%TIBCO_HOME%\ftl\6.5\samples\scripts;%PATH%

Java versions of example applications are located in $TIBCO_HOME/ftl/<release_num>/samples/src/java. The Java samples require JRE 1.8 or later, so PATH should also include access to this.

Initializing the TIBCO FTL environment

Use the setup script to initialize the TIBCO FTL environment. For multiple command windows, run the script in each window.

  1. Navigate to the samples directory. For example:
    cd $TIBCO_HOME/ftl/6.5/samples
  2. Launch/source the setup script.
    . ./setup
Note: On Linux and macOS, be sure to include the preceding “. ” (dot space). This ensures that the appropriate environment variables are set in the current shell.

Starting the FTL Server

Start the FTL server. You need administrative permissions to run this command.

  1. Start an FTL server named ftls1 available at localhost port 8585:

    ftlstart ftls1@localhost:8585

    Output from the FTL Server and any TIBCO FTL services for this FTL Server is saved in $HOME/ftl-server/ftls_1.

    FTL Server configuration file has been saved as /var/tmp/<userID>_ftlstart_ftl_xxx.yaml
    Note: To stop the FTL server, enter
    ftlstop ftls1@localhost:8585
  2. Confirm the FTL server is running. To do this, point a web browser to http://localhost:8585. You see the administrative GUI.

Running the Publish/Subscribe Samples

To run the basic publish-subscribe sample, perform the following steps.

  1. Open two command windows—one for sending and the other for receiving.

  2. In each window, source the setup file.

    cd $TIBCO_HOME/ftl/6.5/samples
    . ./setup
  3. If not already running, start an FTL server in one of the windows.

    ftlstart ftls1@localhost:8585
  4. In the receive window, start a receiver.

    tibftlrecv localhost:8585
  5. In the send window, start a sender.

    tibftlsend localhost:8585
  6. In the receive window, verify that the received message is similar to this:

    #
    # tibftlrecv
    # (FTL) TIBCO FTL Version 6.5.0   V4
    #
    # Client name tibftlrecv_43520
    #
    Waiting for message(s)
    Received message
      {string:type="hello", string:message="hello world earth"}

Running the Request/Reply Samples

With the request/reply use case, one application sends a message to another and then waits for a reply message—typically a query response or receipt confirmation. To run the request/reply sample, perform the following steps.

  1. Open two command windows—one for requesting and the other for replying.

  2. In each window, source the setup file.

    cd $TIBCO_HOME/ftl/6.5/samples
    . ./setup
  3. If not already running, start an FTL server in one of the windows.

    ftlstart ftls1@localhost:8585
  4. In the replier window, start the reply application.

    tibftlreply localhost:8585
  5. In the requester window, start a request application.

    tibftlrequest localhost:8585
  6. In the requester window, verify that the received message is similar to this:

    #
    # tibftlrequest
    # (FTL) TIBCO FTL Version 6.5.0   V4
    #
    # Client name tibftlrequest_43592
    #
    Sending request message: {string:type="request", string:client_name="tibftlrequest_43592"}
    Reply message received: {string:type="reply", string:client_name="tibftlreply_43568"}

Stopping the FTL Server

To stop the FTL server:

ftlstop ftls1@localhost:8585

Compiling Samples and Coding with the FTL Tutorials

The FTL Tutorials provide an introduction to developing messaging applications. The exercises focus on writing messaging applications using the C language, on 64-bit Linux or 64-bit OSX. The tutorial package includes additional sample materials that must be downloaded.

To access the FTL Tutorials, go to TIBCO FTL Tutorials.

In Lesson 1 you can build/compile and run sample applications.

Secure FTL Server

Start the server:

ftlstart --secure ftls1@localhost:8585

For customized secure FTL servers, modify the security settings in the YAML configuration file. For more information see the FTL Administration and FTL Security documents.