Hi,
Like I said in the IRC, I don't like either approach and both sort of piss on the well
known EIP pattern. Since this problem has been solved ages ago, why are we going to
reinvent it? Use a bus, and I mean - a real bus. Created by us, or someone else.
onMessage(msg) {
if(subscriptionMap.contains(msg.getTarget())) {
subscriptionMap.get(msg.getTarget()).forEach(sub -> sub.writeMsg()));
}
}
addSubscriber(Subscriber sub, String target) { subscriptionMap.add(target, sub); }
Millions of msgs per second should be quite normal performance per node. Add thread notify
& waits and have fun with dispatcher/multiplexer nirvana . VertX/Guava/Hazelcast/etc
have event busses also, but in the end this is very simple process and should be part of
the bus - not part of the metrics.
Components should not create the event bus, that should have been the whole point of
hawkular-bus. If it can't do that, then it needs to be replaced.
- Micke
----- Original Message -----
From: "Jay Shaughnessy" <jshaughn(a)redhat.com>
To: "Discussions around Hawkular development"
<hawkular-dev(a)lists.jboss.org>
Sent: Tuesday, August 9, 2016 12:00:24 AM
Subject: [Hawkular-dev] metrics on the bus
Lucas and I were talking over jira [1] which has to do with metrics/alerting scale. This
was discussed a bit on IRC recently as well. Today, metrics publishes all datapoints to
the bus (metrics and avail go to different topics). The only consumer of that data is
alerting, and it consumes a small fraction of the total data (actually it consumes none of
it OOB at the moment, but that will hopefully change as Lucas's alerting work comes on
line in MIQ).
Although in its purest form this publish-it-all is the essence of bus publishing, we both
feel it's an unnecessary waste of resources, as metrics can reach very high volume.
There are a few approaches to reducing the publishing/filtering that we're currently
doing. The options we discussed boil down to:
* No Publishing
* Just query metrics for the data needed for alerting (or whatever other external
use we may have for the data)
* This is essentially a polling approach with frequent polling
* Demand Publishing
* The "just tell me what movie you want to see" approach
* Let clients request the metric ids it wants published to the bus
I'm purposefully not going into much detail at this point. I'd rather we talk out
a preferred approach between these two, or something not presented. But we'd like to
move away from the current publish-it-all approach.
[1]
https://issues.jboss.org/browse/HWKALERTS-118 .
_______________________________________________
hawkular-dev mailing list
hawkular-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev