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

FDC3 for Web specification #1191

Open
wants to merge 191 commits into
base: main
Choose a base branch
from
Open

FDC3 for Web specification #1191

wants to merge 191 commits into from

Conversation

kriswest
Copy link
Contributor

@kriswest kriswest commented Apr 15, 2024

resolves #896
resolves #1385
resolves #1402

This PR adds specifications and documentation related to enabling FDC3 for the web. This was based off of the committee's working doc and an initial PR (#1167) with the draft by @thorsent.

This assumes that "@finos/fdc3" will implement getAgent() and communication mechanisms to work with a Desktop Agent running in a different browser window.

The protocols were codified as "Web Connection Protocol (WCP)" for negotiating the handshake between the library and desktop agents, and "Browser Communication Protocol (BCP)" which encompasses the complete "wire protocol". The former is entirely specific to working in a Web Browser, however the latter might be reused in other implementations and hence may change name (e.g. 'The FDC3 Wire Protocol' or similar).

This documentation followed three streams:

  • Modifications for users of FDC3 - primarily related to using getAgent() for connectivity instead of relying on the global fdc object
  • Instructions for desktop agent implementers - provides a specification for "browser-resident desktop agents" as well as "preload desktop agents", along with typescript definitions.
  • A specification for getAgent() - to be used by implementers of the "@finos/fdc3" library, and for reference by desktop agent implementers.

Some changes and additions were made from the original working document:

  • The optional initialization fields for channel selector and intent resolver were eliminated. The DA knows whether it can provide these UI elements and so therefore it should be the DA that decides how to accomplish this. However, there are cases where a DA cannot reasonably provide these UI elements in a browser, therefore this spec mandates that "@finos/fdc3" provide built-in UI capabilities that a DA can optionally enable them.
  • This spec also covers window disconnects by suggesting use of a well known polling mechanism.
  • A new folder called "specs" was created to house many of the specifications involved. Previously, there was no true distinction between implementation specs and user specs in the FDC3 overview.

Deep links to docs for review:

Copy link

netlify bot commented Apr 15, 2024

Deploy Preview for fdc3 failed. Why did it fail? →

Name Link
🔨 Latest commit f71010e
🔍 Latest deploy log https://app.netlify.com/sites/fdc3/deploys/67290dbf039a420008dde20f

@kriswest kriswest marked this pull request as draft April 17, 2024 09:47
@robmoffat

This comment was marked as outdated.

@kriswest

This comment was marked as outdated.

kriswest and others added 2 commits October 21, 2024 12:55
Co-authored-by: Brian Ingenito <28159742+bingenito@users.noreply.github.com>
@kriswest kriswest requested a review from novavi October 25, 2024 15:05
…-fns

Deprecating functions in Methods.ts
Copy link
Contributor

@kemerava kemerava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing all this work! This would be such an amazing addition to the standard!

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
docs/agent-bridging/spec.md Outdated Show resolved Hide resolved
docs/api/ref/Errors.md Outdated Show resolved Hide resolved
docs/api/ref/Errors.md Outdated Show resolved Hide resolved
src/bridging/BridgingTypes.ts Outdated Show resolved Hide resolved
src/bridging/BridgingTypes.ts Outdated Show resolved Hide resolved
src/bridging/BridgingTypes.ts Outdated Show resolved Hide resolved
src/bridging/BridgingTypes.ts Outdated Show resolved Hide resolved
src/bridging/BridgingTypes.ts Outdated Show resolved Hide resolved
@kriswest
Copy link
Contributor Author

kriswest commented Nov 4, 2024

@kemerava many thanks for the detailed review. I've resolved most of the comments for things fixed. I've left a few open for you to look at, please resolve those as well. Our branch protection will require you to post another review/confirm requested changes have been made.


```js
const desktopAgent = await getAgent({
timeoutMs: 250,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeouts are usually counted in milliseconds. Isn’t it overkill to name it timeoutMs rather than just timeout?

@@ -603,7 +613,7 @@ To find a User channel, one calls:
```ts
// returns an array of channels
const allChannels = await fdc3.getUserChannels();
const redChannel = allChannels.find(c => c.id === 'red');
const redChannel = allChannels.find(c => c.id === "red");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be the correct example.

const redChannel = allChannels.find(c => c.id === "fdc3.channel.1");

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