Hi, habravchanin!
This post focuses on
Plotti.co , a hellishly easy-to-use tool that does exactly one thing, but does it quickly and well. It will be about drawing graphs online and updating them in real time.
Creating live schedules on the fly, it seems to me, is not the task, for solving which you first need to read 10 pages of documentation, pay $ 20 a month for a subscription, and sometimes both. You can not do it this way. Not in 2016.
')

In Plotti.co, the client part is an SVG image that subscribes via an EventSource to a data source from a server, and updates the schedule in accordance with them. It is integrated into the page elementarily:
<object data="http://plotti.co/U0N5G5FQigwC/plot.svg" type="image/svg+xml"></object>
Yes that's all. Here, U0N5G5FQigwC is a hash of a picture. In order for the picture to be updated in all browsers in which it is currently open, you just need to send a GET request to the appropriate address. For example,
wget "http://plotti.co/U0N5G5FQigwC?d=1.5,3.6,7.8mbps" -O /dev/null
The values of the variables are passed in parameter d and separated by commas. The maximum number of variables (and, respectively, lines in the graph) is 9; the color of each of them is fixed. If you want to get a line of a particular color, you can skip the necessary number of variables in front of it (for example, like this:
http://plotti.co/U0N5G5FQigwC?d=,,,,,,1.0
:
http://plotti.co/U0N5G5FQigwC?d=,,,,,,1.0
?
http://plotti.co/U0N5G5FQigwC?d=,,,,,,1.0
).
The project is made on the principle of "eat your dogfood", so that right on the title you can see the graph of the current CPU load of the server on which it is spinning. The data is fed into the schedule using a simple shell script:
PS The project was written in two days by one person and launched on the ARM server from Scaleway for $ 3 per month, and almost survived the invasion of users from
Hacker News the day before yesterday (up to 4 thousand simultaneous connections). Gevent FTW! Further studies have shown that using the Vultr Xeon instance for $ 5 per month is more reasonable.
PPS
Open source project, bug reports and pull requests are welcome!
PPPS Moped is not mine, but a good man; I have so far basically only kept a candle.