Writing a Ractor-based web server: part II

27-Dec-2020 1584
A few months ago I published a post about writing a simple web server in Ruby using Ractors. That took only 20 lines of code and it was able to leverage multiple CPUs with Ruby without having to go through the Global Interpreter Lock (GIL). That was a good preview to what the Ractor primitive is going to provide.Since then Ruby 3.0 was released and the Ractor implementation has got more mature. In this post, we’ll make our Ractor-based web server do more things.By the end of the post, you’ll learn the constraints of Ractors and get familiar with three PRs to MRI that I had to open to make it work.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle