
Real-Time Web Analytics Dashboard with NodeJs, Socket.io, and VueJs - fadymak
http://coligo.io/real-time-analytics-with-nodejs-socketio-vuejs/
======
nailer
If you love super fast virtual DOM but don't want all the stuff that comes
with react (including the learning curve), Vue's awesome. The same site has a
bunch of other Vue tutes: [http://coligo.io](http://coligo.io)

~~~
pdog
React itself is already pretty simple if you ignore all the extraneous
tooling. The core API is just about a dozen lifecycle methods.

~~~
thkim
That extraneous tooling killed React for me. React itself is simple and easy,
I agree with that. But getting things wired up so that you can develop a real
application? I think I lost a good day or two on it. Even after I was set up,
honestly there were a lot of tweaks left such that I didn't really get to
where I wanted to be. Also I can't really see where things might break down in
between. It's enough to be frustrated with the code itself, let alone getting
bogged down in a long, incomprehensible path along the build pipeline.

~~~
KurtMueller
I've always thought of React itself as just one step up from jQuery. You don't
need to use a router or flux to get use out of it.

------
fadymak
Edit: Heroku instance should be up now :)

The Heroku instance is currently overwhelmed with all the traffic. You can
download the code from the GitHub repository here: [https://github.com/coligo-
io/real-time-analytics-node-socket...](https://github.com/coligo-io/real-time-
analytics-node-socketio-vuejs)

and run it using: node app.js

------
mapcars
What is the point in preferring Socket.io to WebSockets in 2016?

~~~
coltonv
i actually went through this debate a few days ago when deciding what to use
for realtine updates on our new platform. I had previously used socket.io but
decided I'd try just using straight websockets and not bothering backporting
realtine updates to IE9. Really great decision IMO. The basic Websocket API is
actually really easy to use. i got everything up and running in less than a
day, the server is less than 100 lines, and the client side code is about 50
lines and completely resuable and DRY wherever i need realtime updates.
Compare this to the 100kb (minified) and all sorts of boilerplate you have to
write for socket.io, so in my opinion you're better off with straight
WebSockets these days.

~~~
dcwca
> and the client side code is about 50 lines and completely resuable and DRY

Were you able to implement auto-reconnect with backoff? That's one of the most
important features that something like Socket.io gives you.

~~~
jkarneges
If you don't need fallback to HTTP, there are some alternative libraries that
handle auto reconnect for pure WebSockets:

[https://github.com/fanout/websockhop](https://github.com/fanout/websockhop)

[https://github.com/joewalnes/reconnecting-
websocket](https://github.com/joewalnes/reconnecting-websocket)

~~~
dtf
Also, if your traffic is basically one-way like in this example, don't forget
Server-Sent Events, which are auto-reconnecting and well supported.

------
graupel
So - for a large site with say 25,000 average concurrents peaking at 250,000
once in a while, how much computing power on heroku or AWS would I need to run
this setup?

------
sandra_saltlake
the main feature of Socket.io

