csvalpha / amber-ui

https://csvalpha.nl
MIT License
4 stars 4 forks source link

Quickpost #50

Open cmitz opened 5 years ago

cmitz commented 5 years ago

The Quickpost could use a refactor. We should refactor to Actioncable, but also refactor the way messages are loaded in the frontend.

Matthijsy commented 4 years ago

I am actually not sure if we should migrate to actioncable. Since actioncable uses websockets and this needs more configuration (like special webserver, redis config etc). What is wrong with the current messagebus system? (except that ember is revoking the session due to this)

cmitz commented 4 years ago

What is wrong with the current messagebus system?

However I played around with ActionCable last week and it lacks authorization (because Websocket does not have HTTP headers) and it is not easier to work with than messagebus.

So, when thinking about ActionCable it is easier to just fire events over the websocket to make Ember fetch the new data itself. Somethink like the 'notify-observers' pattern.

Either way, long-polling is not a bad technique.

Matthijsy commented 4 years ago

Maybe we could use pusher (https://pusher.com/chatkit) for the job. Could be a bit overkill, but does the job and works with ember (https://blog.pusher.com/real-time-chat-with-ember-2-and-pusher/).