-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define the concurrency model and libraries to be used #3
Comments
Async and the fiber scheduler introduced in Ruby 3 seem like a great option |
TODOs:
|
At the moment, using |
I decided to go with:
Each unit of execution can be a thread/ractor/process. I found that using Async with Ractors causes many problems and there's no support for solving those issues in Async yet, see this issue 128. It's important to use Async for a more scalable injection of load. Also, I think using only threads will not make much difference from using only Async, except that I would have to implement synchronization mechanisms for threads, which would be harder. For now, I'll try using multiple processes, perhaps with async-container, and I'll figure out a mechanisms for communicating between those processes. Processes are better isolated and I would be able to use Async freely inside each process. Some of the drawbacks would be: a higher memory usage, and a slower communication channel between the components (executor, counter, reporter) |
I don't see the poing on using async-container at the moment. Regular One of the main features of async-container is to provide a mechanism for restarting processes when they fail, but I don't see how that would benefit me. Also, I don't see that it provides a mechanism for custom communication between processes. |
After iterating over different design ideas I'll try to implement the following:
Each of these objects will be running in a separate process. |
Look at the design idea I created. You should read this article first, it's nice: https://shopify.engineering/ruby-execution-models |
Understand the Ruby threding model (GVL):
Libraries to consider:
The text was updated successfully, but these errors were encountered: