Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
RubyKaigi2017 http://rubykaigi.org/2017/presentations/codefinger.html Asynchronous and non-blocking IO yields higher throughput, lower resource usage, and more predictable behaviour under load. This programming model has become increasingly popular in recent years, but you don't need to use Node.js to see these benefits in your program. You can build asynchronous applications with JRuby. In this talk, we’ll look at libraries and patterns for doing high performance IO in Ruby.
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 'Asynchronous and Non-Blocking IO with JRuby' presented by Joe Kutner at RubyKaigi 2017, the focus is on enhancing Ruby applications through asynchronous and non-blocking I/O using JRuby. The talk highlights the inefficiencies of traditional blocking I/O methods commonly used with Ruby frameworks like Rails and Sinatra, where each request is handled by a dedicated thread that blocks during I/O operations, causing inefficient resource consumption. Instead, the speaker introduces an asynchronous model that allows a single thread to manage multiple requests concurrently, thereby improving throughput and reducing server costs. Key Points discussed include: - **Overview of JRuby**: A brief introduction to JRuby and its advantages for building asynchronous applications. - **Blocking vs. Non-Blocking I/O**: Explanation of how traditional blocking I/O leads to higher resource consumption as each thread waits for responses, resulting in single-threaded operation per request. - **Asynchronous I/O Benefits**: Demonstration of an asynchronous wait model that allows requests to be handled while waiting for I/O operations, freeing threads to perform other tasks. - **Frameworks Introduced**: - **Netty**: A Java framework used by major companies like Apple and Twitter for high-performance non-blocking I/O operations. Netty operates at a low level and efficiently supports both servers and clients. - **Ratpack**: The higher-level micro framework built on top of Netty, which allows developers to create web applications with asynchronous handling of requests through an event loop. - **Example Application**: Kutner presents an example of a simple application interacting with the eBay API, showcasing both blocking and non-blocking approaches to request handling. The blocking method waits for each response sequentially, while the asynchronous method allows the thread to remain active during I/O waits. - **Parallel Processing**: Suggestions for optimizing I/O operations using multiple event loops, which adds complexity but significantly enhances efficiency by allowing parallel handling of requests. In conclusion, the video emphasizes the advantages of using asynchronous and non-blocking I/O with JRuby, specifically through the Ratpack framework, which enables developers to write efficient and manageable code. The key takeaway is that implementing these techniques can lead to significant improvements in application performance and resource management. The presentation culminates with an invitation for questions and discussion from the audience, encouraging shared experiences with asynchronous programming and JRuby.
Suggest modifications
Cancel