Download the IBM Aspera FASPStream SDK 3.8.0:

Overview

The Aspera FASPStream SDK was designed to allow third-party developers to integrate Aspera
transfer technology into their streaming applications.

FASPStream uses the stream-to-stream approach to provide a byte-stream write interface that
lets you use a standard file I/O interface to read and write data for transfers that use the
FASP protocol. The FASPStream API lets you enable in-memory to in-memory data transfers.
This lets byte-stream data be sent as it’s being captured or created, or forwarded to an
endpoint that can utilize the data stream as it’s being received. Developers have full
control over the pre- and post-processing from within both the client and server endpoints.
This approach requires the developer to implement the following:

  • A custom FASPStream server application
  • A custom FASPStream client application

The server application must always start first since it waits to accept a connection from
the client. Once the connection is made, the data stream can be transmitted. The server
accepts a client connection over a TCP port, and negotiates a UDP port to use for the data
transfer.

The best way to get acquainted with this setup is to use the examples included with the
download. ServerDownloadExample, ServerUploadExample, ClientDownloadExample, and
ClientUploadExample can easily be run using the redistributable binaries. This requires a
valid server license that overwrites the “client” Aspera license file that is already
present. For instructions on how to run the examples, see the sections “FASPStream SDK
Examples” below.

Requirements

FASPStream SDK 3.8.0 requires the following:

  • The executable binary faspstream.exe, found in the SDK
    package you downloaded.
  • Version 3.8.1 of either of the following Aspera transfer servers, with a valid server
    license:

    • Aspera HST Server (High-Speed Transfer Server, formerly Enterprise Server and
      Connect Server).
    • Aspera HST Endpoint (formely Aspera Point-to-Point).
  • A valid Aspera configuration file (aspera.conf).

Platform Support

  • FS SDK for Java: Windows 64-bit, Linux 64-bit
  • FS SDK for C#: Windows 64-bit, .NET on Visual Studio 2010, 2012

FASPStream SDK Examples ‚Äď .NET (C#)

To run the basic examples for the C# SDK:

  1. Download and install an Aspera transfer server product and ensure the license file is
    installed in the following location:

    C:\Program Files\Aspera\Enterprise Server\etc\aspera-license 
  2. Download the FASPStream SDK; then extract and compile the included Visual Studio
    Solution.
  3. Go to the following location under the solution
    folder:

    FaspStream.Samples\bin\Debug
  4. Run the following executable in that folder to display a list of the code
    examples:

    >FaspStreamCombinedSample.exe

    You must specify one of the following command-line parameters:

    ServerDownloadExample
        ClientDownloadExample
        ServerUploadExample
        ClientUploadExample

    To run any of the above examples, execute FaspStreamCombinedSample.exe and
    give the example name as the argument.

  5. Always run a “server” example first. When it starts, and while waiting for a connection,
    it displays output similar to the following:

    > FaspStreamCombinedSample.exe server_sample_name
    48 [1] INFO faspStreamLogger (null) - Executing: C:\Program Files\Aspera\Enterprise Server\bin\faspstream.exe -S- -S. --subprocess
    -P 33444 -L C:\Users\SDKuser\AppData\Local\Temp\ --rate-target=1000000 --udp-port 33001 301 [1] INFO faspStreamLogger (null) - Stderr: ACCEPTING: 0.0.0.0:33444 
  6. Leave the server running, and open a new command prompt window to execute the
    corresponding “client” example. It will connect to the server and begin streaming data.
    The output in the new window will look something like the following:

    > FaspStreamCombinedSample.exe client_sample_name
    56 [1] INFO faspStreamLogger (null) - Executing: C:\Program Files\Aspera\Enterprise Server\bin\faspstream.exe -S- --subprocess -P 3
    3444 -L C:\Users\SDKuser\AppData\Local\Temp\ --force-send-after=100 --chunk-size=4096 --rate-target=1000000 --udp-port 33001 127.0.0.1
    346 [1] INFO faspStreamLogger (null) - Stderr: direction: send
    346 [1] INFO faspStreamLogger (null) - Client setup/configured and ready to go...
    Sending contents of file: C:\Users\SDKuser\AppData\Local\Temp\random.file 

    The
    server side will then show the following:

    7892 [1] INFO faspStreamLogger (null) - Stderr: direction: recv
    Receiving bytes and writing to file: C:\temp\FS-OUTPUT 
  7. At this point, you should see both the client and server windows incrementing the count
    of bytes transferred over the stream:

    NNNNNNN bytes written 
  8. Finally, once all bytes have been sent, you should see the matching checksum displayed
    on both sides:

    100000000 bytes written
    Transfer Complete!!
    Final File Checksum: 3fbddbe7c9fcc14df3b5d723c9324edc

FASPStream SDK Examples ‚Äď Java

The Java SDK includes both the sample source code and the compiled bytecode for these
examples. The source code is located in the directory examples/src/samples/p2p. The
basic examples are:

    ServerDownloadExample
    ClientDownloadExample
    ServerUploadExample
    ClientUploadExample

Run the the examples as follows:

  1. Download an Aspera transfer server product and ensure the license file is installed in
    the standard location.
  2. Download and extract the FASPStream SDK package for Java.
  3. Change to the extracted directory.
  4. From the command line, run the server-side example first. (The server should always be
    started first because it waits on the connection request from the client.) For
    example:

    $ java -cp lib/faspstream-3.8.0.jar:examples/lib/faspstream-examples-3.8.0.jar:etc samples.ServerUploadExample
  5. Leave the server running, and open a new terminal window and execute the corresponding
    “client” example. It will connect to the server and begin streaming
    data:

    $ java -cp lib/faspstream-3.8.0.jar:examples/lib/faspstream-examples-3.8.0.jar:etc samples.ClientUploadExample
  6. The output varies, depending on which example is run. In some, there is a command REPL
    (read-evaluate-print loop). For details about how the examples work, see the documentation
    in the Java source code for each.