Spread
Spread vizualizes how viruses and other pathogens are spreading in time and space. It creates shareable, interactive and time-animated vizualisation.
Table of Contents
Technical Overview
To be able to easily pick up stack used to build spread, one should be familiar with following topics:
The diagram below presents an overview of the architecture of spread:
- API is a gateway service, exposing graphql endpoints and publishing messages to the SQS queue.
- Worker is a messaging service wrapping the phylogeographic tree graphs parsing library libspread, multiple workers compete for the messages published by the API.
- Relational Database and S3 object storage are used for persistance.
- User-facing interface facilitates communicating with the API from the client.
- Visualization engine accepts S3 stored output, animates and displays it on the geographical map.
Development
Start all
Make sure you have tmux multiplexer installed.
Execute ./start_all_components
in your temrinal window and it will start all the components in separate tmux windows.
Backend services
Make sure you have docker and docker-compose installed. You will also need maven and clojure cli-tool.
Source the environment variables and start the dev infrastructure:
source env/dev
docker-compose -f deployments/dev/docker-compose.yml up
Deploy the database schema changes:
cd services/db-migration
source ../../env/dev
mvn package
mvn liquibase:update
Compile and package libspread:
mvn clean package
Start an instance of the worker-service:
clj -A:run-worker
Start an instance of the api-service from the comand-line:
clj -A:run-api
Start an instance of the api-service from the REPL:
M+x cider-jack-in
C-c M-n-n api.main
(restart)
In the default dev
environment a GraphQL IDE is started at:
http://127.0.0.1:3001/ide
Browser client
Make sure you have yarn installed.
Install dependencies:
yarn deps
Start watcher and local server
yarn watch
Open in browser: http://localhost:8020
To get the cljs REPL:
M+x cider-connect-cljs
Select localhost
and the nREPL port printed by the watcher (e.g. 46000), select shadow
and :ui
as the build.
Viewer browser client
Start watcher and local server
yarn watch:viewer
Tests
Start a watcher on the libspread test suite:
mvn fizzed-watcher:run
Start a watcher on the spread's integration test suite:
bin/kaocha --watch
Contributors
This project exists thanks to all the people who contribute.
License
MIT © Filip Bielejec