Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ractors_Slide_Deck.pdf

 Ractors_Slide_Deck.pdf

This is the slide deck of my Ractor’s talk from Helvetic Ruby 2023.

Avatar for Abiodun Olowode

Abiodun Olowode

September 12, 2025

More Decks by Abiodun Olowode

Other Decks in Programming

Transcript

  1. Hardware Overview • Model Name: MacBook Pro • Model Identifier:

    Mac14,9 • Chip: Apple M2 Pro • Total Number of Cores: 10 (6 performance and 4 efficiency) • Memory: 16 GB • System Firmware Version: 10151.1.1 • OS Loader Version: 10151.1.1
  2. Ractor is designed to provide a parallel execution of Ruby

    without thread-safety concerns. Ruby Documentation 15
  3. • Achieving Parallelism Purpose of Ractors • Eliminating thread safety

    concerns • Race Conditions • Data Races • Deadlock/Livelock issues
  4. Characteristics of Ractors • Are unable to access any objects

    through variables not defined within their scope
  5. Characteristics of Ractors • Are unable to access any objects

    through variables not defined within their scope • Communicate via sending and receiving messages • Process one message at a time (FIFO)
  6. We experience freedom from • Race conditions and Data races

    • The overhead of using locks for synchronization • The need to trace all state mutations to debug thread safety issues
  7. Ractor thread-safety concerns • Class/Module objects are shareable but can

    be modified in a multi-Ractor program • Blocking operations can still occur via waiting send, waiting yield and waiting take
  8. Consideration Yes No/Maybe/Slowly Speed Computation Object Creation Compatibility New Projects

    Already existing projects Environment Test Production – start at non- critical points to build trust and observe, then expand
  9. Ractors are a parallel execution feature in Ruby, inspired by

    the actor model in which each Ractor operates independently, helping mitigate thread safety concerns. Abiodun Olowode PRESENTATION TITLE