SlideShare a Scribd company logo
ActionCable
What’s the big deal?
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
Why Does ActionCable Exist?
Demand for push notifications & real-time
features
Lack of out-of-box support for websockets
Because Basecamp
The Moving Parts /
What You Need To Know
Puma
Redis
Websockets
Channels
Cable
Puma
Modern concurrent webserver
Designed for parallelism & speed
Handles the incoming and outgoing
connections
Redis
Data structure server
Stores data in memory for fast read/write
ActionCable leverages PubSub feature
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!
Channels
This is where the PubSub magic happens
Channels are the publisher
Connections are the subscriber
Channels will connect the websocket’s stream
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
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
Resources
https://github.com/rails/actioncable
https://github.com/rails/actioncable-examples
http://nithinbekal.com/posts/rails-action-cable/
https://gorails.com/episodes/rails-5-actioncable-
websockets?autoplay=0
http://blog.bigbinary.com/2015/07/19/using-reactjs-with-
rails-actioncable.html
Action cable

More Related Content

Action cable