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:
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
Environment Variables
For simplified operation, set the following environment variables.
Linux and macOS Example:
export TIBCO_HOME=/opt/tibco/
Windows:
setx TIBCO_HOME C:\tibco
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.
Starting the FTL Server
Start the FTL server. You need administrative permissions to run this command.
-
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, enterftlstop ftls1@localhost:8585
-
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.
-
Open two command windows—one for sending and the other for receiving.
-
In each window, source the setup file.
cd $TIBCO_HOME/ftl/6.5/samples . ./setup
-
If not already running, start an FTL server in one of the windows.
ftlstart ftls1@localhost:8585
-
In the receive window, start a receiver.
tibftlrecv localhost:8585
-
In the send window, start a sender.
tibftlsend localhost:8585
-
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.
-
Open two command windows—one for requesting and the other for replying.
-
In each window, source the setup file.
cd $TIBCO_HOME/ftl/6.5/samples . ./setup
-
If not already running, start an FTL server in one of the windows.
ftlstart ftls1@localhost:8585
-
In the replier window, start the reply application.
tibftlreply localhost:8585
-
In the requester window, start a request application.
tibftlrequest localhost:8585
-
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"}
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.