Installing Quine¶
Quine is a key participant in a streaming event data pipeline that consumes data, builds it into a graph structure, runs computation on that graph to answer questions or compute results, and then stream them out. Quine combines the real-time event processing capabilities of systems like Flink and ksqlDB with the graph data structure found in graph databases like Neo4j and TigerGraph.
There are multiple ways for you to install Quine, select the one that is best for your environment from the list below.
Method | Description |
---|---|
Docker Container | If you already have Docker, this is the quickest way to get up and running with the minimum setup time and impact to your environment. |
Download Java executable file | Download the jar file to run locally on your laptop or development server. Running the jar file locally is the most flexible way to evaluate Quine. |
Build from source | Need to do a deeper evaluation of how Quine operates? Clone the open source repository from GitHub and dig in! |
Cloud hosted by thatDot | Are you interested in the Quine Enterprise features? Contact our sales team to set up an evaluation environment in your cloud provider of choice. |
Note: You will need cURL and jq installed in your environment to use the tutorial commands.
Follow the steps below to install Quine for use in your environment.¶
Docker Container¶
Docker allows you to install a containerized version of Quine for evaluation.
Prerequisites¶
- Host Environment - You need a Mac, Windows, or Unix host server to run Docker. Please be sure that your host meets the system requirements outlined in the proceeding links.
- Docker Desktop - Instructions on how to install Docker can be found on the official Docker website.
Install and start the Quine container¶
The Quine Docker image is distributed via Docker Hub and can be installed and launched with a single command.
- Open a terminal window
- With the Docker desktop application running, issue the following command
docker run -p 8080:8080 thatdot/quine
If successful, you will see a message similar to the following appear in the terminal.
Unable to find image 'thatdot/quine:latest' locally
latest: Pulling from thatdot/quine
2408cc74d12b: Pull complete
3d4177d25912: Pull complete
84eef58e1007: Pull complete
7d414c479da8: Pull complete
ac0978c82c5c: Pull complete
5e38591d5629: Pull complete
Digest: sha256:8200a2ea46aaa021865cfa7e843c65bb3f6dded4d00329217800f1a26df36e14
Status: Downloaded newer image for thatdot/quine:latest
Graph is ready
Quine web server available at http://127.0.0.1:8080
Tip
If you want to use a recipe in docker, you’ll need to include the recipe file (and data file if required) in your docker container. The easiest way to do this is by mounting a docker volume.
For example, docker run -it -p 8080:8080 -v ~/quine-recipe.yml:/tmp/recipe.yml thatdot/quine:1.5.1 -r /tmp/recipe.yml
would mount the recipe at ~/quine-recipe.yml
on your host system as a volume at /tmp/recipe.yml
in the container, and instruct quine to use that recipe via the startup flag.
For cases when you need to pass multiple files to Quine from a single directory, docker run -it -p 8080:8080 -v ~/quine/:/tmp/ thatdot/quine:1.5.1 -r /tmp/recipe.yml --recipe-value in_file=/tmp/recipe_file.json
would mount the directory ~/quine/
with recipe ~/quine/quine-recipe.yml
and data file ~/quine/recipe_file.json
on your host system as a volume at /tmp/
in the container, and instruct quine to use the recipe and data files from /tmp/
via the startup flags.
Verify that Quine is operating using the admin/build-info
API endpoint.
❯ curl -s "http://127.0.0.1:8080/api/v1/admin/build-info" | jq '.'
{
"version": "1.3.2",
"gitCommit": "6f8bb1b3a308d9c90cc71a2328858907ec341e74",
"gitCommitDate": "2022-08-10T11:01:51-0700",
"javaVersion": "OpenJDK 64-Bit Server VM 17.0.2 (Azul Systems, Inc.)",
"persistenceWriteVersion": "12.0.0"
}
You can connect to the Quine exploration UI by entering http://127.0.0.1:8080
into your browser.
Shutdown Quine¶
POST to the admin/shutdown
endpoint to gracefully shutdown Quine and stop the Docker container.
curl -X "POST" "http://127.0.0.1:8080/api/v1/admin/shutdown"
Both Quine and the Docker container will shutdown and exit. If successful, you will see a message similar to the following appear in the terminal and the container will have a status of exited
in the Docker desktop.
Quine is shutting down...
Shutdown complete
Executable¶
Using an executable file to run Quine locally provides the most flexibility …
- Evaluate Quine using your hardware of choice
- Make changes to the Quine configuration file
- Launch Quine recipes
- Benchmark Quine's performance running different versions of Java
Prerequisites¶
You will need the following in order to run Quine in your environment.
- Java JRE version 11 or greater - instructions for how to install Java can be found on the official Oracle/Java web site .
Download the Quine Executable File¶
Quine is distributed as a pre-built Java jar
executable that you download and run on your local laptop or server.
- Download the
jar
file from thequine.io
download page. - Store the
jar
file in a working directory
We recommend storing the Quine jar
file in the same directory that you plan to use during your evaluation and development.
On a Mac, this process would look similar to this.
- Selecting the
JAR DOWNLOAD
button prompted the browser to download the latest version of Quine and store it in the~/Downloads
directory. - Once the download completes, issue the following commands to move Quine into a directory that you can use for evaluation and testing.
❯ mkdir gettingStarted
❯ cd gettingStarted
❯ mv ~/Downloads/quine-1.3.2.jar .
❯ ls -l
total 460088
-rw-r--r--@ 1 quine staff 220704180 Aug 25 09:22 quine-1.3.2.jar
Start Quine¶
Once you have the Quine package stored locally, you are ready to launch Quine for the first time.
To launch Quine, issue the following command.
❯ java -jar quine-1.8.2.jar
If successful, you will see a message similar to the following appear in the terminal.
Graph is ready
Quine web server available at http://127.0.0.1:8080
Verify that Quine is operating using the admin/build-info
API endpoint.
curl -s "http://127.0.0.1:8080/api/v1/admin/build-info" | jq '.'
{
"version": "1.3.2",
"gitCommit": "6f8bb1b3a308d9c90cc71a2328858907ec341e74",
"gitCommitDate": "2022-08-10T11:01:51-0700",
"javaVersion": "OpenJDK 64-Bit Server VM 17.0.2 (Azul Systems, Inc.)",
"persistenceWriteVersion": "12.0.0"
}
You can connect to the Quine exploration UI by entering http://127.0.0.1:8080
into your browser.
Shutdown Quine¶
You can stop Quine at any time by either typing CTRL-c
into the terminal window or gracefully shutting down by issuing a POST to the admin/shutdown endpoint.
curl -X "POST" "http://127.0.0.1:8080/api/v1/admin/shutdown"
Source Code¶
Quine is an open source project and can be built from source code.
Build Quine from source code if …
- You want to review the code as part of your evaluation
- You are interested in contributing to the Quine open source project
- You need an enhancement or issue resolution that was delivered between releases
Prerequisites¶
Quine is written and Scala. The UI is built on React and building it depends on NodeJS. Please review the README.md file in the GitHub repository for most up to date requirements to build Quine from source.
- Java JDK 11 or greater
- Scala SBT version 1.7.1 or greater
- Node version 16
- Yarn version 0.22.0 or greater
Clone the Quine repository from GitHub¶
The Quine open source project is managed on GitHub, and the repo is located at https://github.com/thatdot/quine .
❯ mkdir quineEvaluation
❯ cd quineEvaluation
❯ git clone git@github.com:thatdot/quine.git
Cloning into 'quine'...
Build Quine¶
❯ cd quine
❯ nvm use 16
Now using node v16.15.1 (npm v8.11.0)
❯ sbt quine/assembly
[info] welcome to sbt 1.7.1 (Homebrew Java 11.0.16.1)
[info] loading settings for project quine-build from plugins.sbt
... <build details removed> ...
[success] Total time: 78 s (01:18), completed Aug 25, 2022, 9:54:42 AM
If successful, the sbt
tool will configure your environment, build, and package Quine into a jar
file located in the target directory.
❯ find . -name "quine-*.jar"
./quine/target/scala-2.12/quine-assembly-1.3.2+n.jar
Start Quine¶
Once that you have successfully built and assembled the Quine jar
file, we recommend copying that file into a working directory to make it easier to evaluate Quine.
❯ cp $(find . -name "quine-assembly-*.jar") ..
❯ cd ..
❯ ls
quine/ quine-assembly-1.3.2+n.jar
Then you can launch Quine in the same way that you would launch the executable file.
❯ java -jar quine-assembly-1.3.2+n.jar
If successful, you will see a message similar to the following appear in the terminal.
Graph is ready
Quine web server available at http://127.0.0.1:8080
Alternatively, you can run Quine directly from the source code with sbt quine/run
.
❯ sbt quine/run
[info] welcome to sbt 1.7.1 (Homebrew Java 11.0.16.1)
[info] loading settings for project quine-build from plugins.sbt ...
...
[info] running com.thatdot.quine.app.Main
Graph is ready
Quine web server available at http://127.0.0.1:8080
Regardless of the method that you choose to launch Quine, you can verify that it is operating using the admin/build-info
API endpoint.
❯ curl -s "http://127.0.0.1:8080/api/v1/admin/build-info" | jq '.'
{
"version": "1.3.2+n",
"gitCommit": "45dc9789b344b5c282cab227c560c45bc1a883b5",
"gitCommitDate": "2022-08-24T19:29:11+0000",
"javaVersion": "OpenJDK 64-Bit Server VM 11.0.16.1 (Homebrew)",
"persistenceWriteVersion": "12.0.0"
}
You can connect to the Quine exploration UI by entering http://127.0.0.1:8080
into your browser.
Shutdown Quine¶
You can stop Quine at any time by either typing CTRL-c
into the terminal window or gracefully shutting down by issuing a POST to the admin/shutdown endpoint.
curl -X "POST" "http://127.0.0.1:8080/api/v1/admin/shutdown"
Cloud Hosted / SaaS¶
Please contact the thatDot team using the link below to set up a call if you are interested in the Quine-Enterprise edition or a SaaS hosted option.