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

Make optional: fdc3.joinChannel and fdc3.leaveChannel #431

Closed
kriswest opened this issue Jul 26, 2021 · 4 comments · Fixed by #512
Closed

Make optional: fdc3.joinChannel and fdc3.leaveChannel #431

kriswest opened this issue Jul 26, 2021 · 4 comments · Fixed by #512
Assignees
Labels
api FDC3 API Working Group channels feeds & transactions Channels, Feeds & Transactions Discussion Group enhancement New feature or request

Comments

@kriswest
Copy link
Contributor

Output from the Channels, Feeds & Transactions discussion group: #420

The fdc3.joinChannel and fdc3.leaveChannel functions provide programmatic access to joining and leaving channels. Once joined to a channel, the top-level fdc3.broadcast function will broadcast to that channel and fdc3.addContextListener function will receive those broadcasts. However, it is intended that the desktop agent provide UI to enable joining and leaving (system) channels, making these functions redundant and occasionally giving rise to requests for additional functions needed to use these alongside the built-in UIs (e.g. #313). Further, the spec doesn't currently limit which channels can be joined - allowing the unintended joining of 'App channels' and problems with a lack of display metadata for them (e.g. #243).

Consider deprecating these functions and removing them from the API in favour of the requirement that the desktop agent provide UI for joining channels.

@kriswest kriswest added enhancement New feature or request api FDC3 API Working Group channels feeds & transactions Channels, Feeds & Transactions Discussion Group labels Jul 26, 2021
@kriswest
Copy link
Contributor Author

I would consider making these functions (fdc3.joinChannel and fdc3.leaveChannel) optional, rather than deprecating them. If the desktop agent doesn't provide UI (e.g. to a native application with its own titlebar) then an alternative means of joining a channel is required.

Further, if we accept #242 these functions will change - or #242 can be simplified if we decide to deprecate the functions (#242 would simply become a spec addition saying that you can support multiple channels if you want to, there are no API additions for this).

@kriswest
Copy link
Contributor Author

Recommendation from discussion group:

  • Take the soft option and make the joinChannel, leaveCurrentChannel, getSystemChannels can all be made optional (not required for compliance with specification
  • Differentiate these in the documentation better (e.g. break them out in the Nav)
  • Improve the documentation of addContentListener to mention joining the channel
  • Rename joinChannel -> joinUserChannel and deprecate joinChannel
  • Consider how to do feature detection, options:

@Qiana-Citi
Copy link

@kriswest I agree that in many cases it’s users who join/leave channels, so fdc3.joinChannel/fdc3.leaveChannel is usually used together with UI functions. But I cannot ignore the fact that in some of our real use-cases, fdc3.joinChannel/fdc3.leaveChannel is used for pure cross-app communication without any UI interoperations. In such cases, apps need some app channels to share info between each other for app feature purpose rather than user interaction purpose. So from my perspective, it’s better not to force to bound channel to UI and leave the possibility to use channel programmatically.

However, it is intended that the desktop agent provide UI to enable joining and leaving (system) channels, making these functions redundant and occasionally giving rise to requests for additional functions needed to use these alongside the built-in UIs (e.g. #313).

@kriswest
Copy link
Contributor Author

kriswest commented Sep 6, 2021

@Qiana-Citi for pure cross-app communication without any UI interactions you should use app channels, rather than the (perhaps poorly named) 'System channels'. These are interacted with through the Channel API directly rather than through the top=level desktop agent window.fdc3.

E.g.

  const myChannel = await fdc3.getOrCreateChannel("myChannel");
  const myChannel.addContextListener(null, context => {});
  myChannel.broadcast(myContextObject);

See https://fdc3.finos.org/docs/api/spec#direct-listening-and-broadcast-on-channels for more details.

This issue is not proposing to remove AppChannels - only that the joinChannel and leaveCurrentChannel functions should become optional (so not needed for a Desktop Agent to be compliant with the FDC3 spec) - although we should also establish how an app could test for whether they are supported.

@kriswest kriswest added this to the 2.0-candidates milestone Sep 7, 2021
@kriswest kriswest changed the title Deprecate fdc3.joinChannel and fdc3.leaveChannel ~Deprecate~ Make optional fdc3.joinChannel and fdc3.leaveChannel Sep 7, 2021
@kriswest kriswest changed the title ~Deprecate~ Make optional fdc3.joinChannel and fdc3.leaveChannel Make optional: fdc3.joinChannel and fdc3.leaveChannel Sep 7, 2021
@kriswest kriswest self-assigned this Sep 15, 2021
@kriswest kriswest removed the needs-pr label Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api FDC3 API Working Group channels feeds & transactions Channels, Feeds & Transactions Discussion Group enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants