HaCSBCU/MesaHub

Socket Session

alexwileyy opened this issue · 6 comments

Remove AJAX from the front end and replace with Socket Sessions. This improves the room for scalability as well as reducing the number of requests per seconds when a client is connected for the server. Instead, a client only updated when a new event is triggered.

There is obviously some intermediary polling between the client and server however this is negligible in comparison to sending new data across each time.

Do we need socket events with vue's inbuilt reactivity?

https://vuejs.org/v2/guide/reactivity.html

Not quite sure how this works on server rendered vue components but i think some more research in this areas is required

@PandelisZ I need to read up more but essentially the server side rendering will only render a page upon request, which means that once it's served the page, if there are no requests polling for more data, the front end will never be updated.

I believe Vue follows along the same lines of react, the only way to get rid of Ajax or sockets; technically, is to implement a flux store. I will outline now, we're not doing this in the near future; it's only needed for applications with extremely high data throughput.

I need to read into it a lot more but you definitely need something on the client end that polls for more data. This does actually bring the question, what advantage does server side rendering bring to us? There are other alternative that you can do with Vue.

Anyway, I'm going to do a good amount of research into it and plan and propose a deployment plan for our pages and how we will do it.

The page component its left could be rendered server side however the components within with the live data and posting could have server/client side vue magic going on? I'm sure that's possible but needs more research on my end also

This is the exact use case libraries like react vue and angular exist for though so it's just a case of implementing in in the correct way

Maybe, but either way there's a higher emphasis on getting things concerted to Vue rather than focusing on server side rendering which doesn't give too much advantage for us atm

OMG! Firebase!!! This is a perfect candidate for that sort of tech

In what sense?