Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
http://rubykaigi.org/2016/presentations/ko1.html A proposal of new concurrency model for Ruby 3 This presentation proposes a new concurrency model to support parallel execution for Ruby 3. Now, Ruby has "Thread" to support concurrency. However, making thread-safe programs is very hard because we need to manage all of the concurrent object mutations. To overcome such difficulty, we propose a new concurrency model that enables parallel execution. This presentation shows the following topics. (1) Why is thread programming difficult? (2) New concurrent model proposal and why is this model easy? (3) Current design and implementation of this idea. Koichi Sasada/ @ko1 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, now, he is a member of Matz's team in Heroku, Inc. 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
The video presents a discussion by Koichi Sasada on a proposed new concurrency model for Ruby 3, which aims to facilitate parallel execution and improve performance. As thread programming has proven to be challenging due to difficulties in managing concurrent object mutations, Sasada introduces the idea of 'Guild' as a solution. Key Points Discussed: - **Challenges of Thread Programming:** - Concurrency discussions often focus on improving performance in Ruby programs, which currently do not execute threads in parallel. - Difficulties arise from issues like race conditions and non-deterministic behavior, which complicate debugging and lead to bugs due to improper handling of mutable states. - **Historical Context:** - The evolution of programming languages indicates a trade-off between performance and safety. C programming offers control through pointers, leading to speed but higher risks of bugs. Ruby prioritizes safety, leading to easier programming at a slight performance cost. - **Introduction of 'Guild':** - The 'Guild' model prevents the use of shared mutable objects, focusing instead on immutability, thus reducing concurrency risks. This approach is inspired by inter-process communication techniques from languages like C. - **Guild Channel Object:** - This object manages communication risk-free, as the sharing of mutable state across threads is prohibited, leading to safer programming practices. - **Efficiency and Compatibility:** - The Guild model allows for better management of many threads organized within groups. Furthermore, it preserves some level of compatibility with Ruby 2, still permitting the use of threads. - **Examples Used:** - A bank transfer program is cited as an example where concurrency complexities can lead to bugs. An array concatenation example illustrates the unpredictable results of concurrent modifications. In conclusion, Sasada advocates for embracing the Guild concurrency model in Ruby 3, emphasizing that it not only enhances multi-threading capabilities but also simplifies the programming experience. The proposal aims to provide a safer and more efficient way to handle concurrency within Ruby applications, addressing both performance and safety concerns.
Suggest modifications
Cancel