Management actions and config and UI in XWiki

Hi devs,

I see on http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Likes that we exposed a technical management option which is the cache capacity for Likes. I don’t recall if we do that elsewhere already but anyway this raises the question of what we want to do about JMX options.

Note: Technically, I hope that the Like cache capacity is exposed as a JMX MBean since this is what we decided to do (https://xwiki.markmail.org/search/?q=jmx#query:jmx+page:1+mid:akxlzdvlfvwxgpxb+state:results) .

I see 3 options:

  1. provide our own UI for JMX actions and configuration options

  2. bundle one of the numerous existing generic UIs for JMX

  3. don’t bundle any but document how to use existing JMX management app (such as visualJVM, jconsole, etc). Nore that this is currently what we do at https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Monitoring#HJMXConsole

  4. is the most costly by far and not complete (we’ll miss actions and features, like the ones exposed by the Servlet container or Hibernate or Infinispan, etc). It’s also the most usable probably. However it also makes our admin UI more complex to use since it may litter it with lots of quite technical management options. So if we were to do 1) we could also offer a Management category separate from the configuration category for each feature/extension.

For 2) we would need to look for it that we can integrate. I remember MX4J but it seems dead-ish now.

I would go for 3) and look at stuff like https://hawt.io/

WDYT?

@committers: any opinion?

I guess there’s also option 4:

  • Do both: provide an XWiki Admin UI for management/monitoring actions for XWiki code (but not for non XWiki code - for ex, no need to add a clear cache option everywhere use a infinispan cache) + make sure they’re implemented as JMX MBeans so that they can be viewed and set using JMX app.

I think I’d still personally prefer that technical and seldom-used mgmt options like the like cache be available in the xwiki config files only and accessible at runtime through JMX (that’s option 3). I’m also fine with option 2 which is basically option 3 + bundling a JMX tool (read/write).

FWIW, I’ve documented using Hawtio here: https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Monitoring#HHawtio

@surli More specifically, I’m also curious to know if you implemented a JMX MBean for the cache size for likes:

From what I saw with Hawtio, it doesn’t seem to be the case.

[unrelated]
Seems that the naming of this JMX MBean is weird:


[/unrelated]

Doesn’t seem to be the case.

OTOH if you’ve used an infinispan cache then you get it for free.