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

Async JDP #331

Merged
merged 4 commits into from
Nov 19, 2020
Merged

Async JDP #331

merged 4 commits into from
Nov 19, 2020

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Nov 17, 2020

Related to #158

This enables async JDP (cryostatio/cryostat-core#50) in the DefaultPlatformClient, sending a message on the Notification channel whenever a change in the known targets is observed. This also adds a start method to the PlatformClient interface so that other implementations can be extended with similar async discovery logic (ex. the OpenShiftPlatformClient can use "watch" functionality to observe changes to endpoints and notify based on these) or other async behaviours.

@andrewazores andrewazores marked this pull request as ready for review November 18, 2020 15:00
@andrewazores andrewazores requested a review from vic-ma November 19, 2020 17:09
@vic-ma
Copy link
Contributor

vic-ma commented Nov 19, 2020

I tested this by using run.sh and then manually running the vertx-fib-demo and stopping it with podman kill. Is it okay that the LOST notification is a few seconds delayed from when I kill the demo app?

@andrewazores
Copy link
Member Author

andrewazores commented Nov 19, 2020

That sounds like a good way to test it.

The delay in notifications when a target (dis)appears is because of what the JMC JDP client does in the backend - it's actually doing its own polling behind the scenes (iirc at a 5s interval), but it provides an abstraction for async listening to changes. That's what I wrapped around in -core and am building on top of here to send notifications. So, the API looks async, but the reality of the implementation is that it's still doing periodic polling behind the scenes, so the behaviour you see is expected.

Of course, if JMC's JDP client is improved and polls at a different period or somehow gains some true async discovery feature, then we get to benefit from that for free. Or we can implement our own async discovery in -core instead, and the application will against benefit from that for free thanks to this abstraction.

@andrewazores andrewazores merged commit d74b054 into cryostatio:main Nov 19, 2020
@andrewazores andrewazores deleted the async-jdp branch November 19, 2020 22:29
aali309 pushed a commit to aali309/cryostat-legacy that referenced this pull request Jul 22, 2024
… 3.12.1 to 3.13.0 (cryostatio#331)

build(deps): bump org.apache.maven.plugins:maven-compiler-plugin

Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](apache/maven-compiler-plugin@maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants