Bloc / Messenger

This is a small app to message using the Bloc Api
8 stars 3 forks source link

Switch API to use web sockets over multiple API fetches #35

Open bdougie opened 8 years ago

bdougie commented 8 years ago

Some ideas are using Action Cable or Pusher. There is also a web socket gem available for Rails 4, just can't think of the name

bdougie commented 8 years ago

http://bamboolab.eu/blog/implement-a-chat-app-in-rails-4

bdougie commented 8 years ago

http://bamboolab.eu/blog/implement-a-chat-app-in-rails-4

drbeowulf commented 8 years ago

Check this out https://gorails.com/episodes/rails-5-actioncable-websockets Might want to think about Rails 5 which has ActionCable.

dpaola2 commented 8 years ago

What are the advantages of using web sockets over HTTP requests?

drbeowulf commented 8 years ago

From what I understand, performance wise, they are roughly the same. Perhaps some advantages are that you can have communications between the client and server simultaneously, along with the advantage you get with having a sever send information before the client asks for it, which is also beneficial for receiving updates. However, from what I read, you will also need HTTP fallbacks.

You're probably more knowledgable than me about it, but there's my 1 cent of info.

bdougie commented 8 years ago

Performance is really the win here, which for now is not a big deal.

Rails 5 is ideal but it would require Bloc to upgrade the entire platform, which I tested out a few months back and will need a bit of cleanup.

I open this issue to remind me to experiment with it. Not sure how realistic it is at this stage of the project