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

Push notifications #330

Merged
merged 14 commits into from
Nov 17, 2020
Merged

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Nov 13, 2020

This lays the foundation for #158 . The WebSocket connection used for the Command Channel is expanded to also serve as the Notification Channel. When the Command Channel is dropped, the Notification Channel will remain and become the only use of the WebSocket client connections. In the backend, callsites consume the Notification API by injecting the NotificationFactory, building a Notification, and calling send() on it. This writes the Notification as JSON on the WebSocket connection for clients to receive and do with as they will.

Currently the only Notifications implemented are in the MessagingServer itself, and provide notifications to clients for when a client is connected/disconnected/dropped (connection refused). Clients receive a notification about themselves being connected as well. This can be tested by running smoketest.sh and then connecting using websocat and the web-client, or simply two instances of websocat.

Some future notifications to implement include async JVM discovery (to complete #158), recording creation/deletion/archival, template upload/delete, SSL certificate upload.

@andrewazores andrewazores marked this pull request as ready for review November 16, 2020 16:36
@andrewazores andrewazores merged commit 655f03d into cryostatio:main Nov 17, 2020
@andrewazores andrewazores deleted the notification-server branch November 17, 2020 15:34
aali309 pushed a commit to aali309/cryostat-legacy that referenced this pull request Jul 22, 2024
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