Using RequestStore with asynchronous I/O in Rails apps

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. Async Ruby

    An awesome asynchronous event-driven reactor for Ruby. (by socketry)

    You can use the Async gem and the Falcon web server to take advantage of this capability. And starting in Ruby 3.0, async I/O is even more automatic because inside the Ruby runtime, all socket operations will automatically yield the current fiber by default. It’s fully transparent to the developer. Your I/O calls appear to be blocking so they are easy to understand, consistent with Ruby’s “programmer happiness” philosophy.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. falcon

    A high-performance web server for Ruby, supporting HTTP/1, HTTP/2 and TLS. (by socketry)

    You can use the Async gem and the Falcon web server to take advantage of this capability. And starting in Ruby 3.0, async I/O is even more automatic because inside the Ruby runtime, all socket operations will automatically yield the current fiber by default. It’s fully transparent to the developer. Your I/O calls appear to be blocking so they are easy to understand, consistent with Ruby’s “programmer happiness” philosophy.

  4. request_store-fibers

    Lets you use `RequestStore` with a fiber-based server.

    To fix this I wrote a new request_store-fibers gem that detects whenever a new fiber is created by hooking into Fiber.new. Before the fiber is executed, I copy the current request_store data into a variable. Then as soon as the fiber is resumed the very first time, I copy that data into the fiber's request_store.

  5. fiber_hook

    Lets you hook into `Fiber.new` and `Fiber.resume`

    request_store-fibers is actually a thin layer on top of another more generic gem I wrote, fiber_hook, which does all the magic. It lets you hook into fiber creation and do anything you want right after any fiber is created and before it executes.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ruby, Rails, Multi-threading e Puma: Como tudo isso se conecta?

    2 projects | dev.to | 11 Feb 2025
  • Java's Cultural Problem

    1 project | /r/programming | 19 Sep 2022
  • Newb here: have you written your own web server? Seeking advice

    13 projects | /r/ruby | 18 Jun 2022
  • Ho would you go on about creating async rest api in rails

    1 project | /r/rails | 21 Mar 2022
  • Ask HN: Coming back to Web/Ruby/Rails since 2012. Help?

    1 project | news.ycombinator.com | 5 Mar 2021

Did you know that Ruby is
the 12th most popular programming language
based on number of references?