diff --git a/README.md b/README.md index 9e8daee..eafd012 100644 --- a/README.md +++ b/README.md @@ -63,14 +63,14 @@ For the sake of brevity below, I will name the containers `backend` and `fronten Let's start the backend first. We will be using the published [chevdor](https://hub.docker.com/u/chevdor) images here, feel free to replace with your own image. -``` +```sh docker run --rm -i --name backend -p 8000:8000 \ chevdor/substrate-telemetry-backend -l 0.0.0.0:8000 ``` Let's now start the frontend: -``` +```sh docker run --rm -i --name frontend --link backend -p 80:80 \ -e SUBSTRATE_TELEMETRY_URL=ws://localhost:8000/feed \ chevdor/substrate-telemetry-frontend @@ -84,7 +84,7 @@ At that point, you can already open your browser at [http://localhost](http://lo Let's bring some data in with a node: -``` +```sh docker run --rm -i --name substrate --link backend -p 9944:9944 \ chevdor/substrate substrate --dev --telemetry-url 'ws://backend:8000/submit 0' ``` @@ -111,6 +111,6 @@ Now navigate to [http://localhost:3000](http://localhost:3000/) in your browser The building process is standard. You just need to notice that the Dockerfile is in ./packages/frontend/ and tell docker about it. The context must remain the repository's root though. -``` +```sh DOCKER_USER=chevdor ./scripts/build-docker-frontend.sh ``` diff --git a/ROADMAP.md b/ROADMAP.md index 9500027..7cec2aa 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,13 +1,17 @@ -# Frontend +# Roadmap + +## Frontend - Provide a pie chart of node implementations/versions above the list, next to Last Block timer, to have an overview of what the dominant impl/version is, and whether there is a significant amount of nodes running older versions. - + Latest partial implementation of this can be found in the `mh-piechart-new` branch. + + Latest partial implementation of this can be found in the `mh-piechart-new` branch. - Provide a block propagation graph: X axis being a number of blocks a node is behind, while Y axis is the number of nodes in that bucket. The size of buckets should grow: [0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000] - + Partial implementation of this can be found in `mh-version-piecharts` branch, although that branch is pre FE refactoring, so starting a new one and splitting it from pie charts would be advised. + + Partial implementation of this can be found in `mh-version-piecharts` branch, although that branch is pre FE refactoring, so starting a new one and splitting it from pie charts would be advised. - Network search by name when viewing the complete list (#276). -# Backend +## Backend - To keep up with increasing traffic, we should split out a new service from the current backend that replaces the `/submit` endpoint. This new service should take ownership of JSON deserialization of incoming messages from the nodes, discarding messages that Telemetry does not need, resolving chain multiplexing (this will likely need some two-way communication with the main backend when a new node connects), and then forwarding those messages using a lightweight protocol (Cap'n Proto or Protocol Buffers) to the main telemetry backend. Unlike the backend, which needs to have a single instance to keep track of all state changes, this new service should be stateless and therefore we should be able to spawn multiple instances of it behind a load balancer. This would solve the two bottlenecks we're currently having: the number of concurrent connections going to the backend, and the CPU use that comes from IO switching and JSON deserialization. diff --git a/backend/Cargo.toml b/backend/Cargo.toml index f1d0adf..b5e7082 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "telemetry" -version = "0.2.1" +version = "0.3" authors = ["Parity Technologies Ltd. "] edition = "2018" license = "GPL-3.0"