Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
This video was recorded on http://wrocloverb.com. You should follow us at https://twitter.com/wrocloverb. See you next year! Here's a situation we've all be in at one point. We have a program. We want to make that program faster. We know about threads, processes, fibers. Then you start programming and you have no clue what to do. I was there. It sucks. This talk guides you down the rabbit hole and brings out the other side. Points covered: Threads, Fibers Processes, Forking, Detaching Parellelism vs Concurrency The many many different ways I crashed my computer learning these things Gotchas of each Common ways you shoot yourself in the foot Celluoid This is a learning and informative talk. It's target at intermediate developers who have ruby experience but never written any multi threaded code.
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 "Dear God, What Am I Doing? Concurrency and Parallel Processing," Adam Hawkins delves into the complexities of parallel and concurrent programming, particularly aimed at Ruby developers who are familiar with the language but inexperienced in multi-threaded programming. He relates his personal experiences and challenges when first introduced to these concepts, emphasizing that many share this sense of confusion. The talk is organized around several key points regarding the practicalities of concurrency and how to make programs faster: - **Understanding Basics**: Hawkins provides a simple analogy using a hamster on a wheel to distinguish between threads (the hamster) and processes (the wheel). He outlines that concurrent programming allows tasks to run faster by performing multiple operations simultaneously, but warns that this often leads to complications. - **Thread Management**: He explains mechanisms like threads, processes, and fibers available in Ruby, emphasizing that threads share the same memory space, which can lead to issues such as race conditions. He advocates using locks to ensure exclusive access to shared resources. - **Blocking I/O Operations**: Hawkins points out that I/O operations often block threads due to their nature, contrasting this with non-blocking I/O used in other systems like Node.js, which can improve efficiency. - **Creating Processes**: The tutorial covers how to implement concurrency through new processes via methods such as `fork`. He explains that, unlike threads, processes do not share memory, leading to a different set of considerations and potential chaotic outcomes if managed poorly. - **Practical Examples**: The speaker introduces various coding examples, including fetching search results or engaging in Bitcoin mining, illustrating the differences in performance across single-threaded and multi-threaded approaches. - **Celluloid Framework**: Hawkins discusses the Celluloid library, highlighting its actor model for handling concurrency, which simplifies thread management and inter-process communication. He indicates that Celluloid not only provides benefits for concurrent programming but also integrates smoothly with distributed systems through its dCell feature. - **Conclusion**: He concludes that while Ruby's MRI has limitations due to its global interpreter lock, alternative interpreters like JRuby or Rubinius can provide improved concurrency capabilities. The speaker encourages developers to consider these factors when designing concurrent applications, stressing efficiency in memory and processing as crucial components in Ruby programming. Overall, this enlightening talk provides a supportive framework for intermediate Ruby developers looking to enhance their understanding of concurrency and parallel processing in their applications.
Suggest modifications
Cancel