Skip to content

Commit b388e27

Browse files
committed
todo
1 parent 53ce1e0 commit b388e27

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# driveshare-graph
22

3-
Go to [graph.driveshare.org](graph.driveshare.org) to see network statistics. Built using the Flask framework. MongoDB contains raw data on farmers.
3+
Go to [graph.driveshare.org](graph.driveshare.org) to see network statistics. Built using the Flask framework. MongoDB contains raw data on farmers. Data in MongoDB is collected from the farmers and totalStorage scrapy scripts which are located in the scrapers directory.
4+
45
Currently displays:
56
* total storage capacity over time
67
* average capacity per farmer
@@ -9,17 +10,16 @@ Currently displays:
910
* histogram of active farmers' uptime percentages (active farmers are farmers who have been seen on the network in the past week)
1011
* average uptime percentage of active farmers
1112

12-
## How to set up and deploy website
13-
14-
### Ubuntu Digital Ocean Node
13+
## Setup on Ubuntu Digital Ocean Node
1514

16-
**Setup**
15+
###Setup
1716
```
1817
sudo apt-get install sqlite3 gunicorn tmux
1918
pip install -r requirements.txt
2019
```
2120

22-
**Setup MongoDB**
21+
###Setup MongoDB
22+
2323
For instructions on how to migrate/copy the existing MongoDB, look at the README in the scrapers folder. After restoring the MongoDB on a machine, run the scrapers in order to continue collecting data on farmers.
2424
```
2525
tmux attach -t crawler
@@ -28,22 +28,24 @@ cd ~/driveshare-graph/scrapers
2828
```
2929
Detach the tmux session (ctrl-b then d) after starting the scrapeAPI script.
3030

31-
**Deploy**
31+
###Deploy
3232
```
3333
tmux attach -t driveshare-graph
3434
cd project
3535
gunicorn -b 0.0.0.0:80 --workers=4 app:app
3636
```
3737
Detach the tmux session after running gunicorn.
3838

39-
Then, create a new tmux session that will update the network.db every 30 seconds.
39+
Then, create a new tmux session that will update the network.db.
4040
```
4141
tmux attach -t updateSQL
4242
cd project
4343
python updateSQL.py
4444
```
4545
Detach the tmux session after beginning the updateSQL script.
4646

47+
4748
## Databases
4849

49-
network.db in the project directory is a sqlite database containing duration and uptime information for each payout address.
50+
network.db in the project directory is a sqlite database. The farmers table contains duration and uptime information for each payout address. updateSQL.py updates the network.db every 30 seconds. MongoDB queries take a lot of time to execute, so the farmers table is used to generate the uptime histogram and average uptime percentage.
51+

TODO

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-Code can be optimized for faster loading.
2+
-Graphs should be made more interactive.
3+
-Could add graphs such as height/size histogram.
4+

0 commit comments

Comments
 (0)