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.

12/6/2018 Newest Rails Features: Action Cable - presentation from Spark Academy 2018: Ruby on Rails Workshops

111 views

Published on

TL;DR: 01/24/2019 Payment Provider Integration - apply here:
https://spark-solutions.workable.com/jobs/833497

What?
Recurring 2-hour workshops on Thursday at 18.30 in Spark’s office at Jasna 15 (started on October 25th) and happening every week, according to the schedule. Each workshop will have separate topic and consist of a live coding session / devops with some homework for the participants, to be submitted for review and feedback (not mandatory).

For whom?
For Junior and Mid RoR developers

Why?
Free RoR workshops with Senior Developers on interesting topics - improve your dev skills, gain some experience, make new friends!

Mentors
Piotr Leniec - Senior Fullstack Dev at Spark Solutions
Yuriy Kushnir - Senior RoR Dev at Spark Solutions
Bogusław Tolarz - Senior RoR Dev at Spark Solutions
Nathaniel Nande - Senior RoR Dev at Spark Solutions
Alexey Suslyakov - Senior RoR Dev at Spark Solutions

How to enroll?
1. Book some time
2/ Complete an evaluation task: Create a simple URL shortener using Rails or any other Ruby Web Framework and deploy it to Heroku.The user should be able to paste a link of any length and convert it to a short 8-character URL. Provide a link to Github / BitBucket repo & a link to a deployed website on Heroku.
3. Submit your application with a link to your task solution
4. Wait a bit for our reply
5. Code!

Seats are limited, so apply now! We’ll be selecting the most promising candidates.

Schedule & Topics*

Upcoming workshops:
01/24/2019 Payment Provider Integration
02/07/2019 Microservices in Ruby and Amazon Lambda

Completed workshops:
10/25/2018 PORO objects & their usage
11/8/2018 AWS/Heroku/DevOps
11/22/2018 Railway Oriented Programming
12/6/2018 Newest Rails Features
01/10/2019 Rails Performance Optimization

* Some workshops will be delivered in English

Apply TODAY! Number of seats is limited. Snacks and drinks are on us :)
https://spark-solutions.workable.com/jobs/833497

Published in: Technology
  • Be the first to comment

  • Be the first to like this

12/6/2018 Newest Rails Features: Action Cable - presentation from Spark Academy 2018: Ruby on Rails Workshops

  1. 1. 
 Action Cable
  2. 2. 
 • Specification on top of WebSocket protocol • Client-side components • Server-side components • Web-socket server What is it?
  3. 3. 
 WebSocket
  4. 4. 
 Action Cable server A single Action Cable server can handle multiple connection instances. It has one connection instance per WebSocket connection. A single user may have multiple WebSockets open to your application if they use multiple browser tabs or devices. The client of a WebSocket connection is called the consumer.
  5. 5. 
 Each consumer can in turn subscribe to multiple cable channels. Each channel encapsulates a logical unit of work, similar to what a controller does in a regular MVC setup.Channel ≈ Controller Notifications channel Chat channel
  6. 6. 
 When the consumer is subscribed to a channel, they act as a subscriber. A consumer can act as a subscriber to a given channel any number of times. For example, a consumer could subscribe to multiple chat rooms at the same time.  command: "subscribe"
 identifier: {"channel":"ChatChannel", "room": "SparkAcademy"} command: "subscribe"
 identifier: {"channel":"ChatChannel", "room": "Friends"}
  7. 7. 
 Practice Time Your Boss stumbled upon a research showing that desktop notifications in your online store may significantly raise conversion rate. Now he wants you to send a desktop notification to a user if someone has bought a product from their card. Being an Action Cable guru you finally have a chance to show yourself.
  8. 8. 
 Practice Time • Clone workshop repo https://bit.ly/2E5GaiK 
 (https://github.com/caudatecoder/action_cable_workshop) • Install Redis and Rails (could be done in parallel). Instructions are listed in README.md • Visit http://localhost:3000. Approve desktop notifications request
  9. 9. 
 Practice Time
  10. 10. 
 Practice Time
  11. 11. 
 Practice Time
  12. 12. 
 Practice Time ActionCable.server.broadcast("web_notifications_#{token}", attributes)
  13. 13. 
 Try it out • Add a product to your cart • Open the shop in a different browser / incognito mode • Add the same product to cart and submit order • Get your notification!
  14. 14. 
 One big drawback — performance
  15. 15. 
 One big drawback — performance
  16. 16. Useful links • https://guides.rubyonrails.org/action_cable_overview.html • https://github.com/anycable/anycable • https://en.wikipedia.org/wiki/WebSocket

×