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

Application channel discovery #220

Closed
pgn-vole opened this issue Jun 30, 2020 · 4 comments
Closed

Application channel discovery #220

pgn-vole opened this issue Jun 30, 2020 · 4 comments

Comments

@pgn-vole
Copy link

Question Area

[ ] App Directory
[X] API
[ ] Context Data
[ ] Intents
[ ] Use Cases
[ ] Other

Question

App specific transient channels can be created using the concept of application channels (ref: https://fdc3.finos.org/docs/next/api/spec#app-channels). It is not specified however how does the Application Chanel ID is provided to potential consumers of that channel.

The use case here is about sharing contexts between a parent application and multiple child applications. Those child applications may all be consuming the same context type but they all would be provided a different context value by the parent application thanks to private application channels.
The idea to put this flow in place is to create ad-hoc individual channels for each child application. However once the child application is started either via open or raiseIntent it is not clear how to provide the channel id that those sub application should connect to.

Would you have any pointer to handle such use case?

@rikoe
Copy link
Contributor

rikoe commented Jul 6, 2020

@pgn-vole channels and intents are two separate use cases.

For intents, you are leveraging a well-known capability (e.g. "StartChat", "ViewChart") and raising the intent to invoke such a capability without knowing which target application will meet it. An application may be launched on demand to perform the action. I like to think of intents as "active" interoperability operations, e.g. triggered by a button or menu item.

For channels, you are sharing data on a well-known channel. Both parties can connect to the channel id/name and then exchange data. This is more of a "passive" interoperability action, e.g. one app my say "I am currently viewing this", and other apps may chose to listen and do something in response.

We support "system" channels, which are defined by the desktop agent, and known and shared by everyone. You can query what the available system channels are.

We also support "app" channels (which I like to call "private" channels), where the channel name both apps connect to are pre-agreed, or shared in a different manner. It falls out of the scope of FDC3 how these channel names are shared, this is by design.

@rikoe
Copy link
Contributor

rikoe commented Jul 21, 2020

@pgn-vole is the above clear? Can we close this issue?

@pgn-vole
Copy link
Author

pgn-vole commented Jul 28, 2020

@rikoe thanks for the detailed answer.
My question was regarding some specific aspects of the usage of application channel that would enable parent/child communication. As you mentioned this is outside of the scope of FDC3. However would you have any insight into achieve so?

My thinking was to either rely on a specific context type which would contain an application channel id or alternatively use proprietary app API to pass down the ad-hoc channel id.

// Parent app setup a channel
const privateChannel = await fdc3.getOrCreateChannel('private-channel-1')

// Option1:
await raiseIntent('startChart', { type:'customChannel', channelId: 'private-channel-1' })
// Option2:
const { source} = await raiseIntent('startChart')
getAPI(source).setChannelId('private-channel-1')

// Parent app broadcast to child via app channel
privateChannel.broadcast({ 
 type:'timeseries',
 data:[ ... ]
})

@rikoe
Copy link
Contributor

rikoe commented Apr 15, 2021

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants