Design - Resource Naming

Naming Problems

This is a documentation of some IRC conversations on improvements to the naming and list display system within RHQ. The main problem is that resources are displayed in many different lists under different scenarios that dictate different context clarification. For example, show the hostname for each of 10 JBossAS instances in a list may be necessary when viewing them in a global context where they're on different boxes, but it isn't necessary when your looking at the 10 instances on a single host.

The complexities of this problem have so far caused us to hack the discovered resource names from a plugin perspective through tricks such as prepending the hostname. This means that name is always displayed even when we don't want it. It also causes problems when the hostname changes and doesn't solve the naming issue for deeper resources like memory pools where there can be many on a box.

Proposed Changes

This is a generalized approach to displaying only the context that is necessary to distinguish resources and make consistent the naming approach of the plugins. The UI will be updated to automatically display the contextual information when appropriate and the plugin developer should stop including that in the name.

Plugin Names

  • Should not include the parent name at all
  • Should not include the type information
  • Should only try to provide uniqueness to other resources of the same type under the same parent
  • Should make an attempt to be business oriented (what does it do?)

Plugins

JBossAS
Current: Z jweiss-rhel1.usersys.redhat.com RHQ Server, JBoss AS 4.2.3.GA default (0.0.0.0:2099)
Future: RHQ

The JBossAS instances which currently include the parent hostname, version, address and port will be changed to try to detect the most important ear or war file (if there's only one... and its not the included ones like the console... or maybe the biggest, preferring ears over wars). It would take the name of the app archive as the appserver name without extension (e.g. "RHQ"). If it can't figure it out then just use the listening address "0.0.0.0:2099".

Postgres
Current: Postgres
Future: RHQ

The postgres would be discovered for database and skipping the default one would use the name of the other schema if there is only one... otherwise leave the name blank.

Apache
Current: Apache 2.2.12
Future: blank

Scenarios

Premise: There are 30 JBossAS servers, 3 Postgres Servers and 8 Apache Servers on 10 different hosts.

Listing all server resources
Showing different types of resources on different hosts. Apache is displayed as its type since the name was blank.

Resource Type Host
RHQ JBoss AS management.foo.bar.com
Banking JBoss AS bank1.foo.bar.com
Banking JBoss AS bank2.foo.bar.com
Banking Postgres bank-db.foo.bar.com
Apache Apache web1.foo.bar.com
Fulfillment JBoss AS ff-dev-1.qa.bar.com

Listing servers on one host
Host is dropped cause they're all the same

Resource Type
Banking JBoss AS
Authorization JBoss AS
Auditor JBoss AS
LocalDB Postgres

Listing Deep Resources of the same type
Type names are concatenated into resource column since they're all the same. The parent is figured out by going up the tree until we reach a level that is unique between resources.

Resource Parent
PermGen Memory Banking -> bank1.foo.bar.com
YoungGen Memory Banking -> bank1.foo.bar.com
PermGen Memory Banking -> bank2.foo.bar.com
YoungGen Memory Banking -> bank2.foo.bar.com

Listing Deep Resources of different type
Type names are concatenated into resource column since they're all the same

Resource Type Parent
PermGen Memory Banking
YoungGen Memory Banking
rhq datasource Banking
PermGen Memory Auditor
YoungGen Memory Auditor
auditing datasource Auditor
PermGen Memory Authorizor
YoungGen Memory Authorizor
authorizor datasource Authorizor

Display in a Tree

  • bank1.foo.bar.com
    • Banking JBoss AS
      • JVM
        • Memory
          • PermGen Memory
          • YoungGen Memory
      • Banking Datasource
    • LocalDB Postgres
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.