SaaSHub helps you find the best software and product alternatives Learn more →
Top 11 Ruby Concurrency 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.
Let’s say we need to traverse through thousands of files in our S3 Storage in a Ruby app. Let’s say we have a bunch of logs there that we need to read every day and process. If we just use a straightforward approach, like opening, reading, and processing every file one by one, our solution will work, but It will take a lot of time to process. So we need to improve the speed. Here ruby-concurrent gem is our helper https://github.com/ruby-concurrency/concurrent-ruby. Why do we need this gem? Because It’s simpler to use than Threads and this gem has a lot more features in It. In this article, we will use Concurrent::Promises.future as the most common use of concurrent code. Because reading a file from S3 is an IO operation, we can get a huge benefit in speed if we gonna use concurrent code doing HTTP requests. Remember that concurrency will not give you speed improvements if in every Promise or Thread you will do any calculations. Because of Ruby GIL, every thread will be blocked until calculations are finished.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
-
Project mention: Shoes makes building little graphical programs for Mac, Windows, Linux simple | news.ycombinator.com | 2024-02-23
As someone who has looked at Shoes several times but never dove in, it's confusing how Shoes 4 has been the "preview version" of Shoes for, like, a decade or more. It made me actively avoid getting invested in Shoes 3 (the release promoted on the linked website) because Shoes 4 requires JRuby and I am happy with CRuby (the Ruby interpreter most people think of when they hear "Ruby").
https://github.com/shoes/shoes4/
http://www.rubydoc.info/github/shoes/shoes4
No disrespect to the developers but to me it feels like taking over a GUI toolkit created "to teach programming to everyone" (to quote the Shoes 4 readme) and making it depend upon a super-complicated enterprise-focused Ruby was sort of Missing The Point™ in a huge way.
Heck I couldn't even switch to JRuby if I wanted to because I <3 Ractors and JRuby still lacks CRuby 3.0 feature parity: https://github.com/jruby/jruby/issues/7459
-
Project mention: Persistent Redis Connections in Sidekiq with Async::Redis: A Deep Dive. | dev.to | 2024-07-18
Async is a composable asynchronous I/O framework for Ruby. It allows you to do things concurrently using Fibers. Since 3.0, Ruby has a fiber scheduler and Ruby core supports it. This means you can have non-blocking I/O without much effort, for example, when using Net::HTTP. If you perform a blocking operation, such as an HTTP call, inside a fiber, it will immediately yield so that another fiber can become active and do some useful work instead of blocking and waiting for the HTTP call to complete.
-
-
-
-
-
distributed-lock-google-cloud-storage-ruby
Ruby implementation of a distributed lock based on Google Cloud Storage
-
Ruby Concurrency discussion
Ruby Concurrency related posts
-
Persistent Redis Connections in Sidekiq with Async::Redis: A Deep Dive.
-
Concurrent-ruby (async) S3 files download
-
Ruby class pattern to work with API requests with built-in async approach
-
A Tour of Go Examples in Ruby
-
Exploring concurrent rate limiters, mutexes, semaphores
-
EventMachine Performance Spikes
-
My Adventure with Async Ruby
-
A note from our sponsor - SaaSHub
www.saashub.com | 5 Oct 2024
Index
What are some of the best open-source Concurrency projects in Ruby? This list will help you:
Project | Stars | |
---|---|---|
1 | Concurrent Ruby | 5,683 |
2 | EventMachine | 4,254 |
3 | Celluloid | 3,886 |
4 | JRuby | 3,785 |
5 | Async Ruby | 2,115 |
6 | render_async | 1,079 |
7 | sidekiq-throttled | 704 |
8 | paralines | 45 |
9 | concurrent_rails | 35 |
10 | distributed-lock-google-cloud-storage-ruby | 17 |
11 | Opal-Async | 9 |