Getting Started with Tigon

We recommend you follow these steps to get started with Tigon:

  1. Check that you have the prerequisites and install if necessary.
  2. Download the pre-compiled sources and related files.
  3. Configure your system, if necessary.
  4. Run the examples to test your installation and learn about Tigon.

Prerequisites

Tigon is supported on *NIX systems such as Linux and Macintosh OS X. It is not supported on Microsoft Windows.

To install and use Tigon and its included examples, there are a few prerequisites:

  1. JDK 6 or JDK 7 (required to run Tigon; note that $JAVA_HOME should be set)
  2. GCC
  3. G++
  4. Apache Maven 3.0+ (required to build the example applications)

Note: To run the TigonSQL Stream Engine outside of Tigon, libz, Perl 5.x, and Python 3.x are required.

Download

Pre-compiled sources and related files can be downloaded in a zip file: tigon-developer-release-0.2.0.zip.

Install

Once the download has completed, unzip the file to a suitable location.

Creating an Application

The best way to start developing a Tigon application is by using the Maven archetype:

$ mvn archetype:generate \
  -DarchetypeGroupId=co.cask.tigon  \
  -DarchetypeArtifactId=tigon-app-archetype
  -DarchetypeVersion=0.2.0

This creates a Maven project with all required dependencies, Maven plugins, and a simple application template for the development of your application. You can import this Maven project into your preferred IDE—such as Eclipse or IntelliJ—and start developing your first Tigon application.

Building Tigon from Source

You can also build Tigon directly from the latest source code:

git clone https://github.com/caskdata/tigon.git
cd tigon
mvn clean package -DskipTests -Pdist

After the build completes, you will have a distribution of Tigon under the tigon-distribution/target/ directory.

Take the tigon-sdk-<version>.zip file and unzip it into a suitable location.

Is It Building?

These links allow you to check the status of the automated builds of the source code:

Configuration

Macintosh OS X

TigonSQL will not run with the default shared memory settings of the Macintosh, as OS X does not provide sufficient shared memory regions by default. To run TigonSQL, you’ll need to revise these settings by executing these commands:

sudo sysctl -w kern.sysv.shmall=102400

sudo sysctl -w kern.sysv.shmseg=100

sudo sysctl -w kern.sysv.shmmax=419430400

Problems with the Downloaded Package?

If the downloaded package doesn’t work, try to build a tarball for your system as described above.

If you face problems using TigonSQL, you can build the TigonSQL Streaming library from the GitHub repo source:

mvn clean install -DskipTests -P sql-lib,dist

The TigonSQL jar will be installed locally and will be used by maven to create Tigon applications when they are created on the same machine.

Examples

Examples of using Tigon are described in the Tigon Examples Guide:

  • Hello World Example

    An application that emits and counts “Hello World” messages.

  • Twitter Analytics Example

    An application that collects Tweets and logs the top 10 hashtags used in the last minute.

  • SQL Join Flow Example

    An application that demonstrates the capabilities of the TigonSQL library. It performs an inner-join of two data streams and logs the result of the SQL command.

Where to Go Next

Now that you’ve gotten started with Tigon, take a look at: