Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Ruby 3 will have a new feature Ractor, an abstraction for thread-safe concurrent/parallel execution. Because most of objects are not shared with multiple Ractors, Ruby programmer can enjoy parallel programming without some kind of difficult thread-safety issues. However, to keep objects isolation, Ractor introduces some limitation for the languages. For example, you can not use global variables on a multi Ractor program. This presentation will introduce about Ractor briefly and show the powers of Ractor and its limitations with interactive demonstration. Koichi Sasada Koichi Sasada is a programmer, mainly developing Ruby interpreter (CRuby/MRI). He received Ph.D (Information Science and Technology) from the University of Tokyo, 2007. He became a faculty of University of Tokyo (Assistant associate 2006-2008, Assistant professor 2008-2012). After the 13 years life in university, he had joined a member of Matz's team in Heroku, Inc. Now he is a member of Cookpad Inc (engineer). He is also a director of Ruby Association.
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 'Ractor Demonstration', Koichi Sasada introduces Ractor, a new feature in Ruby 3 designed to facilitate thread-safe concurrent and parallel execution. This presentation aims to highlight the benefits of Ractor while also addressing its limitations, providing a comprehensive understanding of how it enhances Ruby's capabilities in handling parallel programming. The background for Ractor arises from the necessity for efficient multi-core processing without succumbing to traditional threading complexities, which have posed significant challenges in the past. The key points discussed include: - **Background and Motivation**: The need for parallel computation in modern GPU and multi-core CPU environments, contrasting the difficulties faced with multiple processes and threads in the current MRI Ruby interpreter. - **Challenges with Current Threading**: Issues like race conditions, deadlocks, and the complex nature of synchronization that can complicate Ruby programming. - **Introduction of Ractor**: The Ractor model minimizes object sharing between threads (Ractors), promoting a message-passing communication system which prevents synchronization-related bugs. - **Creating and Using Ractors**: Demonstrations on how to create Ractors using `Ractor.new`, showcasing their ability to utilize CPU cores effectively. - **Performance Comparisons**: Examples illustrating Ractor's performance improvements over conventional threading, such as the prime number checking program which illustrated significant speed increases by parallelizing the workload. - **Object Sharing and Messaging**: Ractors allow limited sharing of objects, emphasizing the importance of isolating mutable state to avoid bugs. - **Communication Methods**: Explanation of push-type and take-type communication methods, allowing for effective inter-Ractor message passing which maintains isolation, yet facilitates collaboration. - **Exception Handling**: Ractors can propagate exceptions back to the main Ractor to aid in handling errors across concurrent execution. - **Limitations and Future Outlook**: Discussion of the constraints imposed on Ractors, including restrictions on global and shared variables, highlighting necessary adjustments developers may need to make for compatibility. Sasada aims to clarify that while Ractor is still in its experimental phase, it holds great potential to upgrade Ruby's parallel programming landscape, making it accessible and less error-prone for developers. The conclusion emphasizes the importance of feedback during the maturation of Ractor as it approaches its official inclusion in Ruby 3.0, encouraging the community to engage with the new feature and its capabilities.
Suggest modifications
Cancel