× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

How To Approach Chat with Ruby On Rails [2016]

Yad Faeq
Mar 08, 2016
<p>Fayejs related source:</p> <p> </p> <p><a href="http://faye.jcoglan.com/">Javascript Library Fays.js </a></p> <p>It's <a href="http://faye.jcoglan.com/ruby.html">Ruby Extension</a>.</p> <p>Here is an image how FayeJS works:</p> <p><a href="http://faye.jcoglan.com/images/faye-internals.png"><img alt="Faye Arch" src="http://faye.jcoglan.com/images/faye-internals.png" style="height:622px; width:400px"></a></p> <p> </p> <p>Now to make this easier, you can use the Rails Gem for FayeJS's ruby extension.</p> <p>Here: <a href="https://github.com/jamesotron/faye-rails">Faye-Rails</a></p> <p>Faye-Rails&gt; Ruby Gem Fayejs &gt; FayeJS itself &gt; SocektIO &gt;</p> <p>The above chain explains how each library is accessing it's lower level library.</p> <p> </p> <p><strong>Tutorials:</strong></p> <ul> <li><a href="http://www.sitepoint.com/realtime-mini-chat-rails-faye/"><strong>SitePoint: </strong>Realtime Mini-Chat with Rails and Faye</a></li> <li><a href="http://josephndungu.com/tutorials/gmail-like-chat-application-in-ruby-on-rails">Gmail like chat Tutorial</a></li> <li><a href="http://www.webgranth.com/learn-using-faye-as-a-real-time-push-server-in-rails">Simple Explanation of the Pub/Sub and how FayeJS is using this approach.</a><br> <br> <strong>Older tutorials, helpful though:</strong></li> <li><strong><a href="http://railscasts.com/episodes/316-private-pub?view=asciicast">Ryan Bates RailsCast</a> (might be confusing, since Private Pub, it another level higher than FayeJS)</strong></li> </ul> <p><a href="https://devcenter.heroku.com/articles/ruby-websockets"><strong>Heroku: </strong>Here is a sample how to launch Websocket apps on Heroku, it helps after build simple web app from above.</a></p> <p> </p> <p><a href="http://code.runnable.com/Up5_Pc3lNms8AAIq/a-chat-example-using-ruby-on-rails-for-polling">This an old Polling example! Just for reference, though I would not recommend Polling.</a></p> <p> </p> <hr> <p>Now the otherside of Rails and Action Cable for realtime:</p> <p><a href="https://github.com/rails/rails/blob/master/actioncable/README.md">ActionCable explained here On Rails Project.</a></p> <p>Tutorials:</p> <ul> <li><a href="https://medium.com/@dhh/rails-5-action-cable-demo-8bba4ccfc55e#.dtuki1362">DHH (Author of Rails) Explaining Action Cable.</a></li> <li><a href="http://www.sitepoint.com/action-cable-and-websockets-an-in-depth-tutorial/">Action Cable and WebSockets: An in-Depth Tutorial</a></li> <li><a href="http://www.thegreatcodeadventure.com/rails-5-preview-action-cable/">Rails 5 detailed preview with ACable Part 1</a></li> <li><a href="http://hectorperezarenas.com/2015/12/26/rails-5-tutorial-how-to-create-a-chat-with-action-cable/">Simple 101 example of AC chat.</a></li> </ul> <p>Other honrbale mentions :)</p> <ul> <li><a href="https://github.com/mattreduce/minasan">Cowboy</a>. <a href="http://marianoguerra.org/posts/making-a-chat-app-with-erlang-rebar-cowboy-and-bullet.html">Tutorial</a></li> <li><a href="http://www.rubyflow.com/p/6756-rack-adapter-for-erlang-http-server-cowboy">Cowboy Ruby Adapter</a></li> <li><a href="https://github.com/phoenixframework/phoenix">Phoniex </a></li> </ul> <p> </p>

Get New Tutorials Delivered to Your Inbox

New tutorials will be sent to your Inbox once a week.

comments powered by Disqus