Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
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 video titled "Real World Applications with the Ruby Fiber Scheduler" presented by Samuel Williams at RubyKaigi 2022, the speaker discusses his journey with Ruby's fiber scheduler and its various applications. The presentation outlines several key points regarding scalability, non-blocking operations, and real-world applications of concurrency in Ruby. Key Points Discussed: - **Background and Initial Challenges**: Samuel shares his early experience with building a DNS server in Ruby, highlighting the limitations he faced with single-threaded processes and blocking operations, which led to slow performance and system crashes. - **Exploring Alternatives**: In an effort to create a more robust solution, he experimented with Event Machine and later Celluloid, but encountered concerns with compatibility and non-deterministic behavior. - **Development of Async**: Frustrated by the lack of a compatible concurrency model in Ruby, he created the async gem, which facilitates asynchronous execution. The fiber scheduler was proposed in 2018 and merged into Ruby in 2020, allowing for transparent redirection of blocking IO operations. - **How Fiber Scheduler Works**: The speaker explains how fibers act as lightweight execution units that switch context during blocking operations, enabling concurrent processing of multiple tasks without modifying existing code. - **Real World Applications**: Several practical applications of the fiber scheduler include: - **Handling High Request Loads**: The speaker compares his async web server, Falcon, to Puma in terms of performance under load, showing that Falcon can substantially manage more requests during blocking operations. - **Graceful Scaling**: The transition to utilization-sized pools allows Falcon to better handle incoming requests without queuing, improving performance. - **Latency Reduction**: The new Rack 3 supports real-time streaming, significantly reducing memory usage and improving time to first byte through incremental data generation. - **Concurrency in Web Interactions**: The presentation emphasizes how async can facilitate non-blocking execution of external HTTP requests, enhancing interactivity and user experience in web applications. - **Non-blocking DNS Resolution**: The DNS functionality has been revamped with async, enabling the creation of scalable DNS servers. In summary, Samuel concludes that the fiber scheduler and async gem significantly enhance Ruby's capability for scalable, concurrent applications. He encourages attendees to explore these advancements to maximize performance and interactivity in their own Ruby applications. The talk embodies the potential improvements in Ruby's performance thanks to new concurrency paradigms.
Suggest modifications
Cancel