Skip to content
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

This is a fantastic effort! #17

Open
j-manu opened this issue Sep 30, 2023 · 3 comments
Open

This is a fantastic effort! #17

j-manu opened this issue Sep 30, 2023 · 3 comments

Comments

@j-manu
Copy link

j-manu commented Sep 30, 2023

I was looking for a background job implementation using Fibers and ended up here.

  1. I couldn't find any information on IO_EVENT_SELECTOR env variable. Can you point me in the right direction?
  2. Instead of a fixed concurrency, why not a fiber per job model (like how falcon is fiber per request) with a max concurrency config option (enforced by Async::Semaphore)?
  3. Add an option to disable the forced context switch since If the jobs are IO bound, then the event reactor of Async is sufficient.
@tuwukee
Copy link
Owner

tuwukee commented Oct 2, 2023

hi @j-manu,

  1. Take a look at https://github.com/socketry/io-event/blob/main/lib/io/event/selector.rb
  2. Fixed concurrency in the context of this gem is basically a number of jobs. It's possible to spin up any number of fibers within a job.
  3. Thanks for the suggestion, I'm a bit out of free time atm, but I'll add a note about it in the future :)

@j-manu
Copy link
Author

j-manu commented Oct 2, 2023

  1. Thank you.
  2. I got that. What I meant is, instead of restricting the number of concurrent jobs, leave it unrestricted. For ex, Puma has a fixed number of workers while falcon doesn't. A fixed concurrency is required for threads but can be dispensed with for Fiber + Async.
  3. Will you be open to a PR for that? I'm also not free atm, but I would love to contribute

@tuwukee
Copy link
Owner

tuwukee commented Oct 2, 2023

  1. Ah I see, interesting... I need to give it some more thoughts, but should be doable
  2. Sure, I'll be glad 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants