Async Ruby VS falcon

Compare Async Ruby vs falcon and see what are their differences.

Async Ruby

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

falcon

A high-performance web server for Ruby, supporting HTTP/1, HTTP/2 and TLS. (by socketry)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
Async Ruby falcon
20 8
1,983 2,468
2.3% 1.5%
7.8 8.5
10 days ago 1 day ago
Ruby Ruby
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Async Ruby

Posts with mentions or reviews of Async Ruby. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-05.
  • EventMachine Performance Spikes
    2 projects | /r/ruby | 5 Sep 2023
    The Async gem is the natural successor, It's actively maintained, and allows you write synchronous code is if it wasn't non-blocking, and most libraries don't need any special support for Async (exceptions are gems with C extensions that do I/O and DB libraries with connection pooling that would otherwise be thread-based).
  • Philosophy of Coroutines
    7 projects | news.ycombinator.com | 1 Sep 2023
    https://github.com/socketry/async uses coroutines and I think in general it’s been a great model with very few downsides in practice.
  • Is ruby really slow?
    2 projects | /r/ruby | 21 Apr 2023
    There's async I/O. Here's a library that leans on Ruby 3's fiber scheduler.
  • Show HN: Goru, an experimental, Go-inspired concurrency library for Ruby
    2 projects | news.ycombinator.com | 3 Apr 2023
    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 between 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!

  • Twitter (re)Releases Recommendation Algorithm on GitHub
    12 projects | /r/programming | 31 Mar 2023
  • Simple MapReduce that melt my brain (yes, fibers there)
    3 projects | /r/ruby | 16 Mar 2023
    For those who are interested here is the question.
  • How does Ruby handle parallel HTTP requests in separate threads?
    3 projects | /r/ruby | 2 Mar 2023
  • Two months into learning Ruby, it is the most beautiful language I ever learned
    5 projects | /r/ruby | 25 Feb 2023
    Welcome! Ruby isn't exactly "dying", but the hype/popularity is definitely fading. This is primarily because Ruby is no longer "new", most of Ruby's popularity came from Rails, and now Rails is no longer the "new hotness". However, Ruby still has lots of awesome features and lots of awesome other libraries and frameworks, such as the new fancy irb gem that uses reline, nokogiri, chunky_png, the async gems, Dragon Ruby, SciRuby, Ronin, and the new Hanami web framework.
  • ruby has supported native async or not?
    1 project | /r/ruby | 6 Feb 2023
    In Github, there is a Async Gem(https://github.com/socketry/async).
  • Efficient IO in Linux with io_uring [pdf]
    5 projects | news.ycombinator.com | 16 Oct 2022

falcon

Posts with mentions or reviews of falcon. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-12.
  • Pitchfork: Rack HTTP server for shared-nothing architecture
    8 projects | news.ycombinator.com | 12 Oct 2022
    Could you command on any projects within Shopify that are helping Ruby's concurrency story? I'm aware of Ractors (https://docs.ruby-lang.org/en/master/ractor_md.html) and Fibers, but it's unclear to how feasible these primitives currently are to build the necessary abstractions on top of them that would make Rails more concurrent.

    https://github.com/socketry/falcon is an interesting project, but again, it's not clear how difficult it would be deploying a Rails app on top of this.

    There's a lot of really great projects happening and plenty to be hopeful about, but when that stuff will land or the changes the rest of the community and ecosystem should think about making still isn't clear.

  • Java's Cultural Problem
    1 project | /r/programming | 19 Sep 2022
    HOWEVER HAD, not all of these problems (in Java) are due to some corporation going bulldozer-mode. Several problems seem to come primarily from bad technical decisions. The import-situation annoys me in Java. I think it is really bad that I can not easily require add-ons or files, without being forced into a specific, nonsensical directory structure. In ruby I just do require, or load (I could do require_relative but this is a pretty pointless addition; It even leads to bugs such as the author of https://github.com/socketry/falcon assuming that everyone uses a hardcoded filesystem, so code such as https://github.com/socketry/falcon/blob/main/bin/falcon at: require_relative '../lib/falcon/command' not working unless the assumption that the directory BELOW the bin/ one must contain a lib/ which is not always the case. I am not sure he understood the problem domain though. If he would have simply used require instead, that would not be an issue, but no, he thinks one has to use hardcoded path assumptions into require_relative, which means it'll break when you relocatethe bin/ executable file there. It's trivial to fix of course, just replace the require_relative with require, but I think he did not understand the explanation so ...)
  • Ho would you go on about creating async rest api in rails
    1 project | /r/rails | 21 Mar 2022
    This doesn't have much to do with Rails, more with the web server that serves the Rails app. Take a look at Falcon.
  • The time is right for Hotwire
    7 projects | /r/ruby | 8 Dec 2021
  • Using RequestStore with asynchronous I/O in Rails apps
    4 projects | dev.to | 22 Nov 2021
    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.
  • Where is Ruby Headed in 2021?
    14 projects | news.ycombinator.com | 18 Nov 2021
    There seem to a lot of ruby pieces falling into place for Rails 7.

    The Achilles Heel of Hotwire apps has previously been the low number of supported websocket connections and high memory usage when using ActionCable and Puma but I have high hopes that Falcon[1] will take care of that.

    That along with Github's View Components[2] and Tailwind make me really please with the way Rails is heading right now.

    1. https://github.com/socketry/falcon

    2. https://github.com/github/view_component

  • Async Ruby
    3 projects | news.ycombinator.com | 30 Oct 2021
    This is all new to me as well, but the project mentioned the Falcon web server(https://github.com/socketry/falcon).

    The documentation for Falcon mentions using it with rails: https://socketry.github.io/falcon/guides/rails-integration/i...

    I imagine something more "native" to rails will happen eventually though. But would need to be after this makes its way into core ruby(which has not happened yet apparently).

  • Ask HN: Coming back to Web/Ruby/Rails since 2012. Help?
    1 project | news.ycombinator.com | 5 Mar 2021
    Welcome back.

    It's still the best choice in the Ruby world, well maintained, responsive and new features added. Shopify and github use it, you might want to look at the Rails 6 annoucements what these companies added for scalability features. There've been changes to the asset pipeline since version 3 but you'll still recognize it. You can run Rails as API-only and there's subprojects/tutorials for combining a frontend-heavy React,Vue with a Rails backend. You can still ignore the webpack based asset setup unless you use React,Vue I think. Ruby-3 works fine though I'm still waiting for some less-maintained gems to finally merge PRs, maybe you want to use Ruby-2.7 first.

    I use https://puma.io/ , that scales well enough for me. https://github.com/socketry/falcon#readme is faster with build-in HTTP/2 support but harder to setup in my opinion, e.g. requires SSL certificate even on localhost.

What are some alternatives?

When comparing Async Ruby and falcon you can also consider the following projects:

Concurrent Ruby - Modern concurrency tools including agents, futures, promises, thread pools, supervisors, and more. Inspired by Erlang, Clojure, Scala, Go, Java, JavaScript, and classic concurrency patterns.

Puma - A Ruby/Rack web server built for parallelism

EventMachine - EventMachine: fast, simple event-processing library for Ruby programs

Thin - A very fast & simple Ruby web server

Polyphony - Fine-grained concurrency for Ruby

Goliath - Goliath is a non-blocking Ruby web server framework

Celluloid - Actor-based concurrent object framework for Ruby

Roda - Routing Tree Web Toolkit

Sequel - Sequel: The Database Toolkit for Ruby

Iodine - iodine - HTTP / WebSockets Server for Ruby with Pub/Sub support

net-ssh - Pure Ruby implementation of an SSH (protocol 2) client

Rack - A modular Ruby web server interface.