Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Action cable


Published on

What is it and why the hell does it matter?

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Action cable

  1. 1. ActionCable What’s the big deal?
  2. 2. What is ActionCable? Framework for real-time communication Integrates websockets with the rest of your Rails application Full stack offering with client side JS & server side Ruby It’s Rails 5 new hotness
  3. 3. Why Does ActionCable Exist? Demand for push notifications & real-time features Lack of out-of-box support for websockets Because Basecamp
  4. 4. The Moving Parts / What You Need To Know Puma Redis Websockets Channels Cable
  5. 5. Puma Modern concurrent webserver Designed for parallelism & speed Handles the incoming and outgoing connections
  6. 6. Redis Data structure server Stores data in memory for fast read/write ActionCable leverages PubSub feature
  7. 7. Websockets Full duplex connections over single TCP connection Simultaneous upstream and downstream connections The special sauce behind push notifications & real-time features Rails 5 - now with websockets!
  8. 8. Channels This is where the PubSub magic happens Channels are the publisher Connections are the subscriber Channels will connect the websocket’s stream
  9. 9. Blah Blah Blah...Why The Hell Does This All Matter!??!?!?!??!? It’s more than just new hotness It’s the future of streaming websockets in Rails It will fill the void for real-time features that has been lacking in Rails
  10. 10. What Can I Do With It? Anything that requires a real-time stream Chat Feeds API calls Financial data Collaborative software Anything that requires JSON encoded requests
  11. 11. Resources websockets?autoplay=0 rails-actioncable.html