-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Backlog/event manager allow remote and local events #559
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
feat: Backlog/event manager allow remote and local events #559
Conversation
…event-manager-allow-remote-and-local-events
…event-manager-allow-remote-and-local-events
|
First thank you for updating the PR description and clarifying your reasoning, it helps a lot! 🙏 I'd like to dig a little deeper into the changes in order to understand the motivation of changing the event manager. And I'd like to make sure I understand the intend of the mode as it was previously implemented:
Now, from what I understand what we want is to allow the session to be connected to the remote event_hub (session = ftrack_api.Session(auto_connect_event_hub=True)), and that this should be possible regardless of whether the event_manger is running remote or local? Have I understood this part correctly? And would you say that the purpose of the event manager as it is today (previous to this change) is to manage the client/host communication in an abstracted way. So that Client and Host doesn't need to understand if they work in remote or local. |
Yes.
Maybe yes, not sure, and not sure if this is good. Why can't I decide in the client when publishing an event if the event should be processed by the remote ftrack event server (asyncrounous) or should it be processed locally (meaning as well a obtaining a direct result from the published event) ? So, how I see this: As you said, Session can (or not) be connected to the remote event_hub with the In the proposed method, Session is meant to by default be IMPORTANT: Then for what it concerns the root cause of this changes, when the framework is working locally, the subscription of any "default" ftrack server event like |
So my take on this is that with a host and client model that we have, the event manager abstracts the communication between the host and client. It can be through local events in the session, remote events, or in the future it could be through https or some other ways. |
Resolves :
This PR has been tested on :
Overview
Purpose: Allow event manager to publish remote and local events.
Scope:
Implementation Details
Approach:
Reasoning:
I have removed the “mode” in favor of the allow_remote events for the following reasons:
In my opinion this gives more flexibility in the framework for advanced users, also allow us to slowly make sure that each event is correctly implemented in booth locally and remotely modes, otherwise we need to make sure that all events in the event manager work in remote mode since the release (And that is a big task to do that I have lowered the priority in order to be able to tackle it after the summer, here is the link to the task: https://dev.ftrackapp.com/#slideEntityId=70c014cf-922c-4680-985f-a9a5bf45d316&slideEnt[…]tityId=dc34b754-79e8-11e3-b4d0-040102b7e101&entityType=show )
Changes:
Trade-offs:
modeIn any case, this argument was all around but never used.REMOTE_EVENT_MODE = 1andLOCAL_EVENT_MODE = 0which makes it incompatible with prevoius version that is why updateing to 3.0.0 version.Testing
Tests Added:
Manual Testing:
Testing example in the documentation: https://developer.ftrack.com/pr/47/integrations/advanced/framework/architecture/framework-core#event-manager
Testing Environment:
Notes for Reviewers
Focus Areas: framework-core/event; EventManager
Dependencies:
Known Issues: