Skip to content

deephaven-examples/crypto-application

Repository files navigation

Crypto Application

About

The crypto application is a multifaceted example that extends the Deephaven Community Core docker images.

The publisher connects directly to a number of cryptocurrency exchanges via the XChange library, and publishes quotes and trades into a Redpanda Kafka server.

The Deephaven server consumes the Kafka feed, and creates a number of useful tables from the cryptocurrency quotes and trades.

The web server packages up a specific layout for the cryptocurrency tables.

The client is a stand-alone client that demonstrates pulling the table data from Deephaven into a remote application.

Requirements

Launch web

To launch the latest release, you can clone the repository and run via:

git clone https://github.com/deephaven-examples/crypto-application.git
cd crypto-application
docker-compose up -d

Or, you may download the release docker-compose.yml file if preferred:

mkdir crypto-application
cd crypto-application
curl https://raw.githubusercontent.com/deephaven-examples/crypto-application/main/release/docker-compose.yml -o docker-compose.yml
docker-compose up -d

This will launch the web server at http://localhost:10042/ide/.

Launch client

The stand-alone client is not started by default. To see it in action, run:

docker-compose up client

This will connect to the server and print out the real-time BTC/USD prices once a second for ten seconds, then exit.

Cleanup

The default configuration creates a few named volumes. If you want to delete just the containers, run:

docker-compose down

If you want to delete the containers and the volumes, run:

docker-compose down -v

Development

Requirements

Build

./gradlew clean build

Run

TAG=edge docker-compose up -d

To develop against an unreleased version of the Deephaven core images, change the base images as appropriate in gradle.properties.

To change the defaults, edit the environment file.