Add Fiber-Based Non-Blocking IO Worker Support - #21
Conversation
julik
left a comment
There was a problem hiding this comment.
Epic stuff! It does feel like we could merge the two workers and have a wrapper which either uses Async or not, and also sets the appropriate isolation level - instead of having two separate worker modules.
Can't wait to try this with the sync job!
|
@julik Thanks for the insight! Implemented all your suggestions. Feel free to review again or we can discuss the last details on a call |
Otherwise we lose thread/fiber information and I cannot see any reason why this is being overwritten in the first place
svanhesteren
left a comment
There was a problem hiding this comment.
Hey cool stuff! I like the current implementation. Sorry it took so long! Since you tested this thoroughly I assume the comments I made are not an issue (yet).
I like the idea of running both kind of workers for different kind of jobs. This gives us a bit more control in optimizing for certain jobs. Are there any jobs we have currently that would benefit from sticking to classic thread-only execution?
Add async execution support with fiber-based concurrency
Feature Overview:
Adds hybrid execution mode combining threads with fibers for higher concurrency on IO-bound jobs. Jobs can now yield during database queries, HTTP requests, and other IO operations, allowing other jobs to execute concurrently within the same thread.
Key Features:
asyncgems automatically benefit from non-blocking IOConfiguration:
Performance Benefits:
Safety Features:
Implementation:
Workerclass supporting both execution modes