Rack
falcon
Our great sponsors
Rack | falcon | |
---|---|---|
23 | 8 | |
4,833 | 2,468 | |
0.6% | 1.5% | |
7.4 | 8.5 | |
4 days ago | 5 days ago | |
Ruby | Ruby | |
MIT License | MIT License |
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.
Rack
- Como desenvolvi um backend web em Clojure
-
How to Use Sinatra to Build a Ruby Application
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
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
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
In Elixir world, Plug is a bit similar to Rack in Ruby. Official documentation describes Plug as:
- Rack 3 Upgrade Guide
-
Newb here: have you written your own web server? Seeking advice
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
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
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
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
falcon
-
Pitchfork: Rack HTTP server for shared-nothing architecture
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
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
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
-
Using RequestStore with asynchronous I/O in Rails apps
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?
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
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?
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?
Puma - A Ruby/Rack web server built for parallelism
Unicorn - Unofficial Unicorn Mirror.
Thin - A very fast & simple Ruby web server
Goliath - Goliath is a non-blocking Ruby web server framework
Phusion Passenger - A fast and robust web server and application server for Ruby, Python and Node.js
Roda - Routing Tree Web Toolkit
Iodine - iodine - HTTP / WebSockets Server for Ruby with Pub/Sub support
TorqueBox - TorqueBox Ruby Platform
AnyCable - AnyCable for Ruby applications