-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make ayon-shotgrid services multi-threaded and asynchronous #140
Comments
Popping @iLLiCiTiT and @dee-ynput. This would be great to implement but not sure about available resources. |
I'm not sure I do fully understand? If I get it correctly, you want to merge leecher and processor into one service? If yes, then there might be missing infromation why we do it the way we do now. We do split it so we can have option to run multiple leecher and processor services at once, and you can restart/change version of the services without loosing track about progress.
I don't think asyncio would add any benefit, the logic is straight and sequential, but sure, can be used. |
Sorry I was not clear enough, my proposal is not to merge leecher and processor together rather then tweak both of their main loops to use threads exchanging info through a For the leecher :
For the processor:
This logic would mean we implement smaller purpose-scoped functions that can be tested invividually, and makes it easier to debug/prepare parallelism performance-wise. AYON server performance does not impact SG autodesk query and the other-way around is also true. TBH I'm not sure yet if this is convoluted for our use-case or a good first step adopting a more event-driven approach in the future. |
We don't have the filtering part, but even if we would have it, I don't think that has to happen in a queue.
That's what enroll does. It does pull latest unprocessed event, creates dependent event (a job) to avoid other processors (if there are other) to process other events. The queue happens server side automatically, so if you have 2 processors, they don't process the same events multiple times, or don't process them in wrong order.
We're, to be able run multiple processor services at a time without breaking anything. And being able to freely restart/update them without loosing track about progress. (Explaining why it is as it is now.) |
Is there an existing issue for this?
Please describe the feature you have in mind and explain what the current shortcomings are?
Our current services implementation is quite monobloc with a big
while True
that does everything at once.This is functional but in my opinion this is a bit fragile and hard to test.
We could make all of those process asynchronous by reworking a bit of the initial design there.
Stability gains:
How would you imagine the implementation of the feature?
Quick example for leecher service (very quick thoughts, my be ending slightly different):
Are there any labels you wish to add?
Describe alternatives you've considered:
No response
Additional context:
No response
The text was updated successfully, but these errors were encountered: