hawtio / hawtio-next

Next generation Hawtio UI console
https://hawt.io
Apache License 2.0
7 stars 22 forks source link

Review plugins update mechanism #214

Open tadayosi opened 1 year ago

tadayosi commented 1 year ago

With #32 #213, now we have pluginsUpdated event that can broadcast notifications for plugins update. At the same time, we already have the plugin watcher mechanism backed by the server-side plugin registry MBean in the JMX workspace. We need to review these two different plugins update mechanisms and consider consolidating them if necessary.

https://github.com/hawtio/hawtio-next/pull/213#discussion_r1153003802

In reality, probably that plugin watcher MBean is an old mechanism, where in the past we expected dynamic additions and deletions of plugins via JMX, especially on dynamic environments like OSGi/Karaf. But now, with Hawtio.next we currently only support Spring Boot and Quarkus as the runtimes and they are relatively static at runtime; all dependencies would be resolved before bootstrap. I can't think of use cases where plugins are added dynamically after application launches on Spring Boot and Quarkus. Correct me if I'm wrong.

This plugin implementation here only loads external plugins at the initial page loading time, and it might be enough for the runtimes Hawtio.next supports. If that's the case, we can consider just removing the plugin watcher from hawtio-next and the main hawtio project.

tadayosi commented 1 year ago

As far as I understand, the plugin registry MBean watcher isn't used at all for Spring Boot. The Hawtio Spring Boot implementation escapes the plugin mechanism via JMX MBean server and uses its own plugin endpoint to implement the same plugin system for Spring Boot apps. That means plugins update never happens via the plugin registry watcher right now.

This method used to be used for war-based Hawtio applications, but so far we don't have plan to actively support this kind of deployment.