Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-151

Modify jbossweb metrics to use service provider spi, instead of jmx

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • 1.1.0.CR1, 1.1.3.Final
    • 1.2.0.Beta1
    • None
    • None

    Description

      Currently, the jbossweb load metrics (i.e. ActiveSessionsLoadMetric, BusyConnectorsLoadMetric, RequestCountLoadMetric, ReceiveTrafficLoadMetric, SendTrafficLoadMetric) use jmx to generate their load values.
      This is potentially fragile.
      Instead, these load metrics should use org.jboss.mod_cluster.Engine as a load context.

      This raises the issue of load value scope. Currently, load is scoped to a server. Really, this should be scoped to an engine. While server:engine is usually a 1:1 relationship, this is technically a 1:N relationship.

      Suggested API change:

      class LoadMetricSource<C extends LoadContext>
      {
        C createContext(Engine engine);
      }
      

      Where there exists:

      class EngineLoadMetricSource<EngineLoadContext>
      {
        public EngineLoadContext createContext(Engine engine)
        {
          return new EngineLoadContext(engine);
        }
      }
      
      class EngineLoadContext implements LoadContext
      {
        private final Engine engine;
        public EngineLoadContext(Engine engine)
        {
          this.engine = engine;
        }
        public Engine getEngine()
        {
          return this.engine;
        }
        public void close()
        {
          // Nothing to close
        }
      }
      

      The various jbossweb load metrics would use this source.

      Attachments

        Issue Links

          Activity

            People

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified