HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
socketry
async
Ruby2018–2025
socketry / async

async

An awesome asynchronous event-driven reactor for Ruby.

11Distinct people
15Mentions
0Explicit recommenders
2.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

An awesome asynchronous event-driven reactor for Ruby.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year15 dated mentions

Observed mentions: 2018-05-07 03:24:25 UTC to 2025-02-28 16:48:38 UTC.

01232018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC211
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC312
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

15 sources
bryanp·Apr 3, 2023Submission

Show HN: Goru, an experimental, Go-inspired concurrency library for Ruby

Hey folks, wanted to show this off and get feedback. Still early/experimental but there are quite a few concepts I'm excited about here. This project came about while writing a program in Go and loving its approach to concurrency. Being a long-time Rubyist I immediately started to think about what similar concepts might look like in Ruby. I set out with two main design constraints: 1. Lightweight: I didn't want routines to be backed by fibers or threads. Having been involved some in the async project (https://github.com/socketry/async), I had some experience using fibers for concurrency but was curious if they could be avoided. 2. Explicitness: Routine behavior must be written to describe exactly how it is to behave. I always felt like concurrent code was hard to fully understand because of the indirection involved. On the spectrum betwee
Read the rest
n tedium and magical I wanted to err more on the side of tedium with Goru. Goru routines are just blocks that are called once for every tick of the reactor. It is up to the developer to implement behavior in terms of a state machine, where on each tick the routine takes some action and then updates the state of the routine for the next tick. This fulfills both design constraints: 1. Because routines are just blocks, they weigh in at about ~345 bytes of memory overhead. 2. Routine behavior is explicit because it is written as a state machine inside the block. Couple more features worth noting: * Goru includes channels for buffered reading/writing (similar to channels in Go). * Goru ships with primitives for non-blocking IO to easily build things like http servers. Curious your thoughts!
6 points · Open discussion
i think this announcement https://brunosutic.com/blog/async-ruby & the associated async libraries (https://github.com/socketry/async) do a much better job of showing off the potential for the ruby 3.1+ fiber scheduler. Async gem is powered by a fiber scheduler under the hood, and what you get is un-colored async-ready ruby code. That is to say, you can write a normal rack app with falcon-async as the webserver and get node/event-loop scale co-operative concurrency without changing your code. Its pretty exciting! Unfortunately rails makes heavy use of thread locals which arent compatible with fiber concurrency, so its going to take awhile until its async-ready, but I believe progress is being made (Async ActiveRecord was merged recently).
In Ruby 3 adds Scheduler Interface for Fibers
In a sense the GIL (or actually GVL as it's called in current ruby versions) has already been removed for ruby. It's only the original MRI Ruby that still has it several over Ruby implementations already removed it. e.g. JRuby. Concurrent-Ruby[1] is probably a good place to start if you want to work with GVL free ruby on JRuby. It's quite well supported and is currently used by Rails. If you just want async or non-blocking IO I'd take a look at the Async Gem[2]. It looks pretty solid in Ruby > 3.0 and it's been invited by Matz to be part of the stdlib, which I think is a pretty good endorsement. For MRI itself I don't think it's likely they'll ever remove the GVL. Ractors are probably a better solution for CPU concurrency in the long run, although I think they're pretty experimental currently. 1. https://github.com/ruby-concurrency/co
Read the rest
In Ask HN: Any efforts to remove the GIL for Ruby?
I love stuff like this thanks. It's really interesting to see that Falcon is based on the https://github.com/socketry/async library. I've previously been looking at https://github.com/ruby-concurrency/concurrent-ruby based on its use in Rails and was wondering if there's a comparison of the two approaches anywhere that would be newbie friendly? I was also wondering will Falcon run on JRuby? (I see that nio4r does so hopefully that also means that things like Async-Container will.)
In Falcon: A high-performance web server for Ruby, supporting HTTP/2 and HTTPS
There are two kinds of stackful coroutines - fibers and green threads. The difference is that fibers stay on the thread they were created on, while green threads can transit between OS threads. There have also been projects to cooperatively schedule OS level threads to minimise latency, but that's a bit different. I don't know that many decent green thread implementations [off the top of my head], but an interesting one is yahns: https://yhbt.net/yahns/design_notes.txt - to me, green threads have all the benefits of coroutines but all of the downsides of multi-threaded programming. I implemented fiber based concurrency for C++ here: https://github.com/kurocha/async. An example would be https://github.com/kurocha/async-network/blob/d1d2bf12eb2d9b... - calling read yields the fiber if it would block as implemented here: https://github.com/k
Read the rest
urocha/async/blob/2edef4d6990259cc60cc30... I implemented almost exactly the same model for Ruby here: https://github.com/socketry/async and if you are interested in how it works, see these projects which build on it: https://github.com/socketry/async#see-also
In The Various Kinds of IO – Blocking, Non-Blocking, Multiplexed and Async

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.