plug VS Rack

Compare plug vs Rack and see what are their differences.

plug

Compose web applications with functions (by elixir-plug)

Rack

A modular Ruby web server interface. (by rack)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
plug Rack
6 23
2,756 4,833
0.5% 0.6%
7.7 7.4
10 days ago 1 day ago
Elixir Ruby
Apache License 2.0 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.

plug

Posts with mentions or reviews of plug. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-03.
  • Elixir for Cynical Curmudgeons
    12 projects | news.ycombinator.com | 3 Aug 2023
    Yes, it’s a bit of a magic argument, but it’s the only unhygienic variable introduced with a Plug dispatch:

    https://github.com/elixir-plug/plug/blob/main/lib/plug/route...

    Everything else is explicitly passed, AFAICT.

  • I'm struggling with creating a rest api with Elixir - total noob
    2 projects | /r/elixir | 2 May 2023
    Have you read https://github.com/elixir-plug/plug ? Shows you how to do a GET in under 5 mins.
  • ElixirのHTTPクライアントでお天気情報を取得したい(2022年)
    8 projects | dev.to | 8 Jun 2022
  • Request Coalescing in Async Rust
    4 projects | news.ycombinator.com | 6 Mar 2022
    Coming from the Ruby ecosystem, a lot of this played out similarly to how the Rack[1] middleware conventions developed in the early Rails v1 and v2 days. Prior to Rack there was a lot of fragmentation in HTTP server libraries, post-Rack everything more or less played nicely as long as libraries implemented Rack interfaces.

    I don't write Rust professionally, but it was a bummer seeing that this seems to be a place that was figured out (painfully) in ecosystems used heavily for web development--Javascript and Elixir have their own Rack equivalents[2][3]. I hope that Tower plays a similar role to unify the library ecosystem in Rust.

    1. https://github.com/rack/rack

    2. http://expressjs.com/en/guide/writing-middleware.html

    3. https://github.com/elixir-plug/plug

  • Learn how to deploy Elixir apps on Heroku
    8 projects | dev.to | 12 Feb 2021
    If you're not familiar with it, feel free to check the inner workings of Plug in their documentation. For now, the code above is fairly self-explanatory I hope. All we need to know is that we're using the Plug.Router capabilities and exposing an endpoint /bpi which we're going to use to retrieve our data and to show it.
  • For Web Developers The Stakes Are Generally Lower
    1 project | /r/programmingcirclejerk | 31 Dec 2020
    Well if Phoenix came with the ability to use Sqlite I'd definitely like it a lot better for smaller sites. Maybe if Elixir had something like Sinatra. I guess using Cowboy or Plug could work.

Rack

Posts with mentions or reviews of Rack. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-03.
  • Como desenvolvi um backend web em Clojure
    23 projects | dev.to | 3 Jul 2023
  • How to Use Sinatra to Build a Ruby Application
    8 projects | dev.to | 7 Jun 2023
    Because of its lightweight and Rack-based architecture, Sinatra is great for building APIs, mountable app engines, command-line tools, and simple apps like the one we'll build in this tutorial.
  • Building a Ruby app without any framework
    1 project | /r/ruby | 26 Apr 2023
    Since you mentioned Sinatra and Rails I assume you're talking about web apps. In that case you want to build a Rack Application. That's where web frameworks' responsibility ends.
  • Ask HN: Release Notes
    1 project | news.ycombinator.com | 9 Feb 2023
    I'm thinking about building a website that scrapes release notes from sources like https://community.ui.com/releases, https://github.com/rack/rack/blob/main/CHANGELOG.md, https://developer.android.com/about/versions/13/release-notes etc, and cleans them up & formats into the same format so they can be searched a lot easier.

    It seems like the best place to start would be for folks who read HN since we refer to these quite a bit day-to-day to figure out what changes in software, apps, etc. Let's open this up with a few questions:

    1. Would you find a service like this useful? Why or why not?

    2. What release notes would you want to have formatted into the same thing and why?

    3. What features or capabilities would you like to see a service like this do? e.g. would you like to select multiple "products/apps/whatever" and see their release notes in one timeline? Side-by-side? etc. etc. etc.

  • Elixir Plugs
    1 project | dev.to | 2 Dec 2022
    In Elixir world, Plug is a bit similar to Rack in Ruby. Official documentation describes Plug as:
  • Rack 3 Upgrade Guide
    1 project | news.ycombinator.com | 22 Oct 2022
  • Newb here: have you written your own web server? Seeking advice
    13 projects | /r/ruby | 18 Jun 2022
    The spec for Ruby's Rack is another good reference for how a Ruby webserver is expected to work.
  • The Definitive Guide to Rack for Ruby and Rails Developers
    4 projects | dev.to | 24 May 2022
    You've been around in the Rails world for a while. You know your way around rails. But you keep hearing this word 'Rack' and don't really understand what it is or what it does for you. You try to read the documentation on the Rack Github repository or the Rails on Rack guides, but the only thing it does is add to the confusion.
  • Crafting mini RubyOnRails
    2 projects | dev.to | 10 May 2022
    Begin with writing a rack-middleware. Rack is a standard library for writing a web server. The main structure is simple. Here is an example:
  • Request Coalescing in Async Rust
    4 projects | news.ycombinator.com | 6 Mar 2022
    Coming from the Ruby ecosystem, a lot of this played out similarly to how the Rack[1] middleware conventions developed in the early Rails v1 and v2 days. Prior to Rack there was a lot of fragmentation in HTTP server libraries, post-Rack everything more or less played nicely as long as libraries implemented Rack interfaces.

    I don't write Rust professionally, but it was a bummer seeing that this seems to be a place that was figured out (painfully) in ecosystems used heavily for web development--Javascript and Elixir have their own Rack equivalents[2][3]. I hope that Tower plays a similar role to unify the library ecosystem in Rust.

    1. https://github.com/rack/rack

    2. http://expressjs.com/en/guide/writing-middleware.html

    3. https://github.com/elixir-plug/plug

What are some alternatives?

When comparing plug and Rack you can also consider the following projects:

ex_admin - ExAdmin is an auto administration package for Elixir and the Phoenix Framework

Puma - A Ruby/Rack web server built for parallelism

phoenix_ecto - Phoenix and Ecto integration with support for concurrent acceptance testing

Unicorn - Unofficial Unicorn Mirror.

Raxx - Interface for HTTP webservers, frameworks and clients

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

phoenix_pubsub_redis - The Redis PubSub adapter for the Phoenix framework

falcon - A high-performance web server for Ruby, supporting HTTP/1, HTTP/2 and TLS.

corsica - Elixir library for dealing with CORS requests. 🏖

Phusion Passenger - A fast and robust web server and application server for Ruby, Python and Node.js

phoenix_live_reload - Provides live-reload functionality for Phoenix

Thin - A very fast & simple Ruby web server