24 ms·
Seems like ractors would be perfect for a HTTP server.
by phendrenad2 2y ago
Seems like ractors would be perfect for a HTTP server.
- wutwutwat 2y agofalcon is worth a look https://github.com/socketry/falcon https://github.com/socketry/falcon
- phendrenad2 2y agoDoes that use ractors, or plan on using ractors? Seems like it uses fibers. Is it considered the best ruby server these days?
- wutwutwat 2y agoBest server is going to vary on your preferences and workload. Puma is a great multithreaded server, and it can do fork based workers as well. But unicorn is the go to for process/fork based workers. Falcon is newer and built on libraries that use the new fibers api. Not sure about ractors, but the code is there, have a look
- baggy_trough 2y agounicorn is pretty moribund. I think the maintainer has mostly moved on from ruby.
- tarellel 2y agoAt the moment I believe falcon uses fibers
- kubectl_h 2y agoYes I agree. Recently sat down and wrote some test ractor code to see if I could max out all my CPUs with a single ruby process running only ruby code and was pleasantly surprised to see that it works. The ruby systems I work on now scale to demand via kubernetes so it's not practical to find edge cases where I could apply ractors, but the future looks promising with real multi-threaded-like parallelism.