oleg gorbunov action cable
TRANSCRIPT
Что еще за ВебСокеты?
Это та крутая тема, которую чуваки на
Node.js используют?
Я слышал за сокетами будущее
Full-duplex это в 2 раза круче чем half-
duplex, так ведь? Realtime и Full-duplex? звучит круто, добавлю в резюме
Новые потребности
Клиенту нужно часто отправлять запросы на
сервер
Клиенту нужно часто получать обновления с
сервера
Streaming
в том числе
How WebSockets Work?
Persistent stateful connectionLightweight metadata
- upgrade request (652 bytes) - and no more
Full-duplex communication
Other Options
MessageBus Sync ActionController::Live
faye-websocket-ruby
websocket-rails em-websocket
MessageBus
• simple api • polling, long-polling or streaming • supports server-server, client-server communication
faye-websocket-ruby• uses Faye for pub/sub • separate process, no access to rails code • more work to do
Конклюжены
• loosing caching, routing, multiplexing, gzipping and lot more
• good for cases with rapid communication • simple and fun • all-in-box • fast start • rails integration • npm-package • works with heroku • good prospectives
Sources I am thankful for:1. http://tenderlovemaking.com/2012/07/30/is-it-live.html 2. https://www.sitepoint.com/websockets-in-the-ruby-ecosystem 3. https://www.nateberkopec.com/2015/09/30/action-cable.html 4. http://edgeguides.rubyonrails.org/action_cable_overview.html 5. https://www.sitepoint.com/action-cable-and-websockets-an-in-depth-tutorial 6. https://github.com/websocket-rails/websocket-rails 7. https://github.com/rails/rails/tree/master/actioncable 8. https://github.com/chrismccord/sync 9. https://github.com/SamSaffron/message_bus 10. http://edgeguides.rubyonrails.org/action_cable_overview.html
Author: Oleg Gorbunov game: http://freerider.herokuapp.com email: [email protected] linkedin: https://ua.linkedin.com/in/oleggorbunov