First I must preface this with the information that I do not know how this is
going to be implemented on Hawkular-Inventory side, and am explaining with the
perspective of the consumer of that data on ManageIQ. The idea is to explain
how the Dynamic/Generic UI PoC might model Karaf servers when Hawkular starts
reporting on it, for that reason I'm also going to follow through my thought
process instead of just presenting the final solution.
This is more about how we could model the data internally than how to fetch and
process that data before presenting it to the API. Because of this, I'm not
going to tackle Views, because they are only supposed to be representation for
the Entities. With the entities defined, we can make any kind of
representations we want, and that depends more on what the UI requires than any
internal presentation of the data in objects.
Currently, at the Proof of Concept, we have this structure representing all the
reported entities:
* Entity (base class, never matched)
* MiddlewareResource
* MiddlewareServer
* WildFlyServer
* OperatingSystem
* JavaRuntime
Without implementing anything, the structure presented will match Karaf Servers
by default, by matching it to MiddlewareServer, and the resources it exposes
are matched to MiddlewareResources. OperatingSystem and JavaRuntime should be
the same.
Going forward, we need to map the servers, which we do by subclassing
MiddlewareServer, and we have KarafServer. Next step is going to the resources,
which we can implement like this:
* CamelContext < MiddlewareResource
* Routes (CamelRoute)
* Consumers (CamelConsumer)
* State
* CamelRoute < MiddlewareResource
* URI
* State
* CamelConsumer < MiddlewareResource
* URI
* Route
* State
* CamelProcessor < MiddlewareResource
* No Data?
Questions:
1. How is this supposed to be shown on the UI?
3. How is the relationship between context and routes/consumers is going to be
presented by Hawkular?
4. How is the relationship between consumers and routes going to be presented
by Hawkular?
5. For JVM memory collection, Mazz said that the information could be get
through JMX directly, how would that be presented on the inventory API?
Currently, for WildFly, this appears in the "JavaRuntime" resource, is this
going to be the same for Karaf servers?
6. Are the metrics for CamelRoutes, CamelConsumers, CamelProcessors and
CamelRoutes be presented directly onto themselves, or should their data be
aggregated in any way on the KarafServer?