
Show HN: Live streaming SVG plot microservice that just works - grandrew
http://plotti.co
======
grandrew
Hi, I'm Andrew and I had this stupid frustration: in order to have a live
streaming web plot in my page I am required to either read 10+ pages of JS
integration docs, or pay $20+/mo, and usually both.

In the world of HTML5, EventSource and all the modern infrastructure that
shouldn't be so complicated!

So I crafted this microservice in a couple of days to solve this unfairness.

It generates an SVG image that does everything automatically, you just need to
do some GET requests to feed your live data. It is in early stage testing, so
be free to post what you think of the idea and the code, I will be happy to
discuss!

p.s. my microservice is currently hosted at scaleway ARM microserver and I am
very excited about pushing it to the limits!

~~~
untog
I do web dev for a living and I'm slightly embarrassed that this is the first
time I've heard of the EventSource API. Why would I use it over Websockets,
though? It appears that it does the same thing - keeps an HTTP connection open
- but without the ability for the client to send anything back.

~~~
TN1ck
I wouldn't, EventSource isn't supported by IE yet[0].

[0]
[http://caniuse.com/#search=EventSource](http://caniuse.com/#search=EventSource)

~~~
adrianpike
I've been using this polyfill for years in production with success:
[https://github.com/Yaffle/EventSource](https://github.com/Yaffle/EventSource)

------
ryanmarsh
I'm not usually a fan of plotting tools. I prefer instead to make custom plots
in D3. Usually plotting tools are too simplistic to be useful for
significantly valuable use cases. This however is an example of a "simple"
plotting tool bringing lots of value. Kudos. This is great.

------
ChuckMcM
Fun gizmo Andrew! So much cleaner than the one I wrote that pretends it is an
animated GIF. Next up you'll want some sort of reflection UI so that user's
can mouse over the graph and have it pop up the values from the colors at that
point (that feature is in most (if not all) of the plot packages out there. It
does look a lot easier to just plop in and go for simple live displays,
excellent work.

~~~
grandrew
Thank you! More interaction should definitely be on the roadmap! Not everyone
likes too heavy plots though.

btw, I updated the front page with short snipptes of how it can be used for
server monitoring.

------
zapt02
So is this a service or is this open source? Can I set up my own Plotti
instance?

~~~
fweespee_ch
[https://github.com/grandrew/plotti.co](https://github.com/grandrew/plotti.co)

[https://github.com/grandrew/plotti.co/blob/master/evsvg.py](https://github.com/grandrew/plotti.co/blob/master/evsvg.py)

Open source, yes.

It is AGPL v3 so depending on your environment Legal may tell you No. :p

------
drdaeman
Ouch. I didn't knew that I can just put a <script> into SVG and it would just
work. Nice, thanks!

------
sciencerobot
This is one of those rare things that seems so obvious and simple yet awesome
that I immediately slap myself in the face for not thinking of it already.
Great idea :)

------
davidjgraph
I'm getting "Internal Server Error" each time I try to connect. Marketing
something as "just works" is asking for trouble on a beta release :).

~~~
grandrew
Yes, it is ;-) Now fixed

------
theknarf
I'm not sure marketing something as just works is good, especially when none
of the plots worked for me at all.

~~~
grandrew
I will be very pleased to hear what browser/OS do you use

------
dogweather
Should maybe the endpoint for feeding data into the stream use POST instead of
GET?

~~~
grandrew
I am adding HTTPS and (some minimal) POST support soon!

------
PaulHoule
You need something more like value-based instead of cost-based pricing for
this kind of service.

~~~
grandrew
Agreed, just had no time to invent anything else yet! Thank you for
suggestion!

------
geuis
Umm the page literally jumps up and down when viewed from my phone.

~~~
grandrew
What OS/version do you have? Will be interesting to investigate!

