-
Notifications
You must be signed in to change notification settings - Fork 132
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
Clarification re repeated addContextListener and addIntentListener calls #1394
base: main
Are you sure you want to change the base?
Clarification re repeated addContextListener and addIntentListener calls #1394
Conversation
✅ Deploy Preview for fdc3 canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! Personally, I think that we triggering of all listeners is currently a MUST and should remain so (meaning the SHOULDs in the this PR become MUSTs to explicitly state that).
I also wonder if we need to add a comment about reconnection. If a web app is refreshed it needs to add new handlers as the old ones will be fone - the DA should be tracking the lifecycle of the app and considering them to have been removed if the app reloads/navigates/reconnects. That generally only applies to web apps as most others don't 'reconnect' or 'refresh' in a way that would wipe out their handler functions
I see a mix of resolvererror and resolveerror in text and anchor links. |
Good 👀 @bingenito - I missed several of those. Added to suggestions |
Co-authored-by: Kris West <[email protected]>
@kriswest In terms of the reconnection, I think that there a case which can to be made for Desktop Agent to keep the listeners in memory at least for a short period of time. Not sure as much for web apps, but for others, depending on which method of connection is used, it is possible that the app temporarily lost the connection, and I am not sure if it makes sense to always ask apps to reconnect. |
…tiple_listeners_handling
Apologies, for the delay in responding to your question on this. Disconnection is an awkward topic for FDC3 as what it means could vary greatly between implementations. In the classic container implementations for web apps, its doesn't really happen other than via the lifecycle of the application. That's because the Desktop Agent tends to be provided by a local service of some sort and is therefore not affected by the network connection... If it goes down, the Desktop Agent API is still available (the connection between the app and Desktop Agent is unaffected), listeners remain valid etc.. I suspect that this will be the same for most FDC3 for the Web implementations... if the Desktop Agent was already loaded and connected to, then the network connection going down doesn't affect its ability to provide interoperability between windows! Of course, there will be exceptions: Desktop Agent implementations which rely on a remote web service and situations where the Desktop Agent window is refreshed and reloads. I suspect these cases need thinking about. In both cases there is potentially a need for some sort of event to pass back for either the apps or the I think we'd be well advised to trigger the connection flow afresh - the DA might come back with a different config for apps for example. The alternative is that the Desktop Agent. Whether the getAgent code retains listener or requires new ones to be set-up at that point is something we'll need to consider. When it comes to native apps and disconnection, we will usually be talking about a local service that provides access to the DA going down or being restarted. In those cases, new connections (and polling for connection) will likely be needed. Whether listeners need to be readded or not feels like something we should discuss as it should probably be implemented consistently (and hence handled in a standardized way). At the very least we'll need to think about adding an ( |
P.S. I think this PR is ready to go - the only thing holding it up is the fact that we closed the 2.2 scope and this does introduce a new error that MUST be thrown. However, it's not a big change and I would be happy to consider a motion to put it into 2.2 (which is currently blocked by completing the |
@kriswest has there been consensus on this one? In my view, it is a pretty small change, but if we want to hold it off until 2.3 that is fine as well |
We were set to hold off for 2.3 for purely procedural reasons (we voted to close the scope). However, I agree this is small and fixes an existing problem and could go in for 2.2. This PR could be called a breaking change as it introduces a new error that could be returned on existing calls to Regardless it will need approval by the SWG which we can do at the next meeting. |
Closes #1390
Based on the discussion on the issue, adding the clarification to the standard on the expected behavior when multiple calls are made to addContextListener and addIntentListener
@michael-bowen-sc