RFR: 7198: Add websocket server that pushes data on selection updates [v13]
Alex Ciminian
duke at openjdk.java.net
Mon Nov 29 12:36:37 UTC 2021
> This PR adds a websocket server that pushes event data as JSON to all connected clients whenever the user updates their current selection in JMC. The server is disabled by default and can be enabled and disabled from JMC preferences. This is a rework of the proof-of-concept code in https://github.com/openjdk/jmc/pull/225 and uses the JSON serialiser introduced in #279.
>
> <img width="714" alt="Screenshot 2021-11-27 at 21 13 54" src="https://user-images.githubusercontent.com/348973/143722590-949ad362-6486-4f96-bae0-0fc9afcd7002.png">
>
> The three endpoints available on the server are:
>
> * `/events/` - raw serialised events
> * `/tree/` - `StacktraceTreeModel`, data used in the flame graph view
> * `/graph/` - `StacktraceGraphModel`, data used in the graph view
>
> Please see [this Observable collection](https://observablehq.com/collection/@cimi/java-mission-control) for examples on how to connect.
>
> This PR adds several new dependencies:
> * **org.eclipse.jetty.websocket:websocket-jetty-server:10.0.5**
> * **org.eclipse.jetty.websocket:websocket-javax-server:10.0.5**
> * **org.eclipse.jetty.websocket:websocket-jetty-api:10.0.5**
> * **org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle:1.34**
>
> After adding the new dependencies, I had issues with resolving transitive dependency conflicts (when I was trying to use Jetty 9.x) then with fixing the eclipse launcher - please see the comments for details.
Alex Ciminian has updated the pull request incrementally with one additional commit since the last revision:
Update full name
-------------
Changes:
- all: https://git.openjdk.java.net/jmc/pull/306/files
- new: https://git.openjdk.java.net/jmc/pull/306/files/5f544a36..63817ca8
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jmc&pr=306&range=12
- incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=306&range=11-12
Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jmc/pull/306.diff
Fetch: git fetch https://git.openjdk.java.net/jmc pull/306/head:pull/306
PR: https://git.openjdk.java.net/jmc/pull/306
More information about the jmc-dev
mailing list