Talks
Speakers
Events
Topics
Search
Sign in
Search
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
search talks for
⏎
Suggest modification to this talk
Title
Description
Oh no! Computers are not doubling in speed every two years anymore! How can we make software run faster? You and your Rails app cannot just wait doing nothing, so join me to explore how we can leverage concurrency and parallelism concepts to enhance performance and scalability!
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the presentation titled "The Fast Lane: Asynchronous Rails," Matheus Richard explores the intricacies of asynchronous programming within Ruby on Rails at the Tropical.rb 2024 event. With a focus on performance and scalability in software, Richard first outlines the fundamental concepts of concurrency and parallelism. He illustrates these concepts using the analogy of two siblings sharing a video game controller, differentiating 'taking turns' (concurrency) from 'independently playing' (parallelism). The video is structured into three key sections: - **Understanding Asynchronous Programming**: Richard explains the basics of asynchronous programming, emphasizing the difference between concurrency (taking turns) and parallelism (independence). He details Ruby implementations, primarily focusing on CRuby, and examines threads and fibers, highlighting their differences and use cases. - **Asynchronous Concepts in Ruby**: Richard elaborates on fibers, threads, and processes, showcasing how each serves distinct purposes. Threads can allow concurrent execution of tasks that involve waiting for I/O operations, while processes enable true parallel execution—although at a heavier resource cost. He also touches on actors, noting their experimental status in Ruby and the potential complications they may introduce. - **Implementing Asynchronous Features in Rails**: Richard presents practical strategies for incorporating asynchronous programming into Rails applications. He emphasizes two principles: - "Don't do now what you can do later" to optimize task completion timing (e.g., sending emails after registration). - "Don't stand still; don't wait idly," promoting the use of the Async gem for concurrent executions to enhance performance, especially in I/O-bound tasks. Richard also discusses advantages such as lazy loading techniques with Turbo frames and appropriately loading CSS and images to improve user experience. He warns about the potential pitfalls of async programming, such as race conditions-induced errors, which necessitate a solid understanding of concurrency fundamentals before implementing these techniques. In conclusion, Richard encourages developers to lay a strong performance groundwork—ensuring efficient coding practices—before leveraging asynchronous programming as a powerful tool to enhance application performance and responsiveness. He suggests that, when done correctly, async programming can offer significant performance improvements over traditional methods.
Suggest modifications
Cancel