What you have considered is metrics, the others are: Going by the WSDM specs, these are the ones that you could consider.
 
OPERATIONAL STATE 
    UpState
    DownState
    BusyState
    IdleState
    StoppedState
    CrashedState
    SaturatedState
 
 
OPERATIONAL STATUS
    Available
    Unavailable
 
REQUEST PROCESSING STATE 
   RequestProcessingObservations
   RequestReceived
   RequestProcessing
   RequestCompleted 
   RequestFailed
   Digest (for the request)
   
   (RequestProcessingObservationsWithAttachment   )
      RequestReceived
      RequestProcessing
      RequestCompleted - Send Mediator
      RequestFailed - Send Mediator
      Digest
 
For your second question:
1) If you are planning to instrument the data and use JMX then you are mandating that either jdk 1.5 should be used or an app server which has a JMX implementation.
2) If you are planning to have a Webservice to instrument the management information you need to deal with the storage and you might have to comply with a spec such as WSDM, in which case a WSDM capable browser/app could send a request using WSDM request format to get WSDM compliant data...
 
For your third question:
1) If you are planning to use a Webservice or an MBean to instrument then you don't need a separate container to hold the data ...
 
Hope it helps
 
Soumadeep
 
-----Original Message-----
From: Chathura Ekanayake [mailto:[EMAIL PROTECTED]
Sent: Friday, February 24, 2006 12:52 PM
To: [email protected]
Subject: Re: [Axis2] Management Interface - Counting requests



On 2/23/06, Soumadeep <[EMAIL PROTECTED]> wrote:
Hi Chathura
 
Great stuff, though had a question - don't you think it would be important to capture the following stats:
1) ServiceTime
2) MaxResponseTime 
3) LastResponseTime
 
Thanks for points. I will work on them once I finished previous ones. And please state other things which you think it is necessary to monitor.

 
Apart from this have you thought about sending JMX notifications? as it's synchronized the request will not be sent back to the requester till the notification is sent, this could prove a deterrent to the performance!
 
I am not thinking of using JMX notifications for monitoring above things. We can do it by using attributes of MBeans or getX() methods of web services.
 
Is there a problem of using singleton objects as I mentioned in the design? Will it fail if we deploy two Axis2 engines in the same servlet engine?

 
Best regards
Soumadeep
 
 -----Original Message-----
From: Chathura Ekanayake [mailto: [EMAIL PROTECTED]]
Sent: Thursday, February 23, 2006 8:30 PM
To: [email protected]
Subject: [Axis2] Management Interface - Counting requests

 
Hi,
 
I am developing the management interface for Axis2. I am currently implementing code to monitor dynamic statistics of remote Axis2 engines.
 
These statistics include,
 
- Total number of requests
- Total number of failed requests
- Number of requests for specified services
- Number of requests for given operations in specified services
- Operations to reset each of these counts
 
For this, I need to count the number of requests. I think, a handler of a globally engaged module is the best place to do it.
I think of having a singleton object, which is invoked by a handler with the msg context as a parameter.
Then this object can extract necessary information from the msg context and store them internally.
 
Management interfaces (e.g. WS or MBean) can call methods of this singleton object to get various statistics.
 
Below is a brief code sample:
 
// Globally engaged handler
public class DynamicStatsHandler extends AbstractHandler implements Handler {
 
       public void invoke(MessageContext msgContext) throws AxisFault {
                   DynamicStatsManager.getDynamicStatsManager().notify(msgContext);
       }
}
 
 
// Singleton object
public class DynamicStatsManager {

    private int totalRequests = 0;
 
    public DynamicStatsManager getDynamicStatsManager() { // singleton }

    public void notify(MessageContext msgContext) {
            // extract necessary information and store in private variables
    }

    public int getTotalRequests() { return totalRequests; }

    public void resetTotalRequests() { totalRequests = 0; }
}
 
 
// Management interfaces (WS)
public class AxisDynamicStats {

   public OMElement getTotalRequests() {
         DynamicStatsManager dsManager = DynamicStatsManager.getDynamicStatsManager();
         int totalRequests = dsManager.getTotalRequests();

         // create OMElement and return
   }

   public void getTotalRequests() {
          DynamicStatsManager dsManager = DynamicStatsManager.getDynamicStatsManager();
          int totalRequests = dsManager.resetTotalRequests();
   }
}
 
 
Is this design ok? Will it slow down the process of directing msgs to services?
Please give suggestions about this and ways to improve.
 
Thanks,
 
Chathura.
 

Reply via email to