Get Started
A Crash Course in Deephaven is your backpack guide through the world of real-time data analysis using the Deephaven data engine.
This crash course provides a broad, clear, and technically informative overview of Deephaven's capabilities. Let's dive in and unlock the potential of this powerful platform.
This first chapter gets a Deephaven server running and opens the Deephaven IDE, where you run the code for the rest of the crash course.
Start Deephaven
To follow along, ensure you have Docker installed on your machine.
Note
If you'd rather not use Docker, start a server on port 10000 by following the guide on installing Deephaven with pip. Four things differ from the Docker setup:
- Unless you set your own pre-shared key, the server prints a key when it starts. Enter that key as your password when you log in to the IDE. If you start the server with the
deephaven servercommand, it opens the IDE in your browser and logs you in automatically. - Later chapters read and write files under
/data. With pip,/datais a directory on your own machine. On Linux, create it and make sure your user can write to it. On macOS, you can't create directories at the root of the file system. Choose a directory you can write to, such as one in your home directory, and use it in place of/datain later chapters. - Later chapters also read Deephaven's example datasets from
/data/examples. The Deephaven examples repository stores its data files with Git LFS. Install Git LFS, then clone the repository into/data/examples. If you chose a different directory in place of/data, clone into itsexamplessubdirectory instead: - The deephaven.ui chapter uses the
deephaven-plugin-uianddeephaven-plugin-plotly-expresspackages, which the Docker image includes butdeephaven-serverdoesn't. Install them into the same environment before you start the server:
Then skip to Open the IDE.
Once Docker is installed, run this command:
Caution
Replace YOUR_PASSWORD_HERE with a secure password of your own to keep your session safe. Deephaven uses this password as its pre-shared key to authenticate you.
The server keeps running in this terminal and prints its log there. When the log shows Server started on port 10000, the server is ready.
The command's options do the following:
-p 10000:10000makes the container's port 10000 available on your machine, so you can open the IDE athttp://localhost:10000/ide/in Open the IDE.--env START_OPTS=...passes your password to the server as a startup option. The Configure your Deephaven instance chapter near the end of this crash course usesSTART_OPTSto set other options, such as the server's maximum Java heap size.-v "$(pwd)/data:/data"mounts adatadirectory from your current working directory at/datain the container. Docker creates the directory if it doesn't exist.--rmdeletes the container when it stops.--name deephavennames the containerdeephaven, so you can refer to it by name in other Docker commands, such asdocker stop deephaven.
Files you save in the IDE go to data/storage on your machine. Anything your code writes under /data in the container also appears in your local data directory. Because these files live on your machine, you won't lose your work when --rm deletes the container. To learn more about mounting directories in Docker, see Docker data volumes.
Get the example data
Later chapters read Deephaven's example datasets from /data/examples in the container. To download the Deephaven examples into your local data/examples directory, open a second terminal in the same directory and run:
Open the IDE
Open the Deephaven IDE at http://localhost:10000/ide/, enter your password in the Token field, and you're ready to go!
Once you're in, the Console on the left is where you write and run code. Results, such as tables and plots, open as panels in the workspace. The Panels menu at the top right of the IDE lists the tables, plots, and other objects in your session. Select one to open it. See Navigate the GUI for a full tour of the interface.
Next, Architecture overview explains how Deephaven's tables, engine, and user interface fit together.