Improve heartbeat argument handling in the FDC3 for Web reference implementation demo
- Dominant language
- TypeScript
- Stars
- 270
- Forks
- 194
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 36
Description
To disable heartbeats in the reference implementation demo, you need to modify this line:
https://github.com/finos/FDC3/blob/9ad3c50d571d718fd96889c0901a1efaa4970034/toolbox/fdc3-for-web/demo/src/client/da/dummy-desktop-agent.ts#L144
(set the 4th argument to the `DefaultFDC3Server` constructor to `false`).
Its looks like the DefaultFDC3Server parameters for heartbeats:
https://github.com/finos/FDC3/blob/9ad3c50d571d718fd96889c0901a1efaa4970034/toolbox/fdc3-for-web/fdc3-web-impl/src/BasicFDC3Server.ts#L65-L72
could do with some work as they don't match those for the HeartbeatHandler, which you actually want to control:
https://github.com/finos/FDC3/blob/9ad3c50d571d718fd96889c0901a1efaa4970034/toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/HeartbeatHandler.ts#L41
The OpenHandlerTimeout has nothing to do with heartbeats and should not be being used to set the heartbeat times - we should have a different argument for this in the DefaultFDC3Server contructor!
_Originally posted by @kriswest in https://github.com/finos/FDC3/discussions/1675#discussioncomment-14544116_
Contributor guide
Research direction
Start with toolbox/fdc3-for-web/fdc3-web-impl/src/BasicFDC3Server.ts and compare its heartbeat-related constructor parameters with HeartbeatHandler.ts. Check the demo call in toolbox/fdc3-for-web/demo/src/client/da/dummy-desktop-agent.ts. Done means heartbeat timing is controlled by a dedicated argument rather than OpenHandlerTimeout, and the demo can disable heartbeats as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100