You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Rick McGuire (JIRA)" <ji...@apache.org> on 2008/01/18 19:01:34 UTC

[jira] Created: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Add data collection and instrumentation to the AsyncHttpClient
--------------------------------------------------------------

                 Key: GERONIMO-3761
                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
             Project: Geronimo
          Issue Type: New Feature
      Security Level: public (Regular issues)
          Components: AsyncHttpClient
            Reporter: Rick McGuire


There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562459#action_12562459 ] 

Rick McGuire commented on GERONIMO-3761:
----------------------------------------

Committed revision 615192.

Thanks for the update Sangjin. 

> Add data collection and instrumentation to the AsyncHttpClient
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3761
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>         Attachments: GERONIMO-3761-v2.patch, GERONIMO-3761-v3.patch, GERONIMO-3761-v4.patch, GERONIMO-3761.patch, TimeMonitor.java
>
>
> There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sangjin Lee updated GERONIMO-3761:
----------------------------------

    Attachment: GERONIMO-3761-v3.patch

A suggestion for adding request start time and connect start time.  The main difference from the previous one is on HttpRequestMessage and AsyncHttpClient.

> Add data collection and instrumentation to the AsyncHttpClient
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3761
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>         Attachments: GERONIMO-3761-v2.patch, GERONIMO-3761-v3.patch, GERONIMO-3761.patch
>
>
> There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sangjin Lee updated GERONIMO-3761:
----------------------------------

    Attachment: GERONIMO-3761-v2.patch

a modified patch (still not complete)

> Add data collection and instrumentation to the AsyncHttpClient
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3761
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>         Attachments: GERONIMO-3761-v2.patch, GERONIMO-3761.patch
>
>
> There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick McGuire resolved GERONIMO-3761.
------------------------------------

    Resolution: Fixed

This looks like it's in good enough form to be committed now. 

Committed revision 614952.

> Add data collection and instrumentation to the AsyncHttpClient
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3761
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>         Attachments: GERONIMO-3761-v2.patch, GERONIMO-3761-v3.patch, GERONIMO-3761.patch, TimeMonitor.java
>
>
> There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick McGuire updated GERONIMO-3761:
-----------------------------------

    Attachment: GERONIMO-3761.patch

This is a proof of concept of the monitoring support.  There are some additional details that probably need to be worked out.

> Add data collection and instrumentation to the AsyncHttpClient
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3761
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>         Attachments: GERONIMO-3761.patch
>
>
> There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561481#action_12561481 ] 

Sangjin Lee commented on GERONIMO-3761:
---------------------------------------

I uploaded a modified patch.  This still needs discussions and a few details that need to be worked out.  The changes here are -- 

- I rewrote the EventQueue class to use an Executor.  Since the Executor implementation provided by the JDK is basically a thread pool associated with a task queue, it provides an identical functionality to what was in EventQueue.  I think that it is good to use the constructs from java.util.concurrent.* whenever it makes sense, and I believe this is one of them.

- This change also enables us to remove "synchronized" from notifyMonitoringListener().  The notify method will be called very often and concurrently, and reducing the lock contention will be important.  Using an Executor makes it possible to eliminate synchronization, at least at that level.

- I associated a shared thread pool (Executor) for all dispatchers.  I think it is desirable for dispatchers to share this thread pool rather than each instance of dispatchers creating and maintaining its own thread.

- Renamed EventQueue to EventDispatcher.

- I also moved the monitoring listener list to EventDispatcher.  I also used CopyOnWriteArrayList as the implementation for the list.  CopyOnWriteArrayList is an ideal choice for this as it is thread safe and lock-free.  Also, our use case is heavy read-access but very infrequent write-access, which CopyOnWriteArrayList is suitable for.

- I moved the connection_failed notification to before the getSession() call.  The getSession() call here always throws an exception (by design), and thus notification needs to be done before calling getSession().

- I rewrote the CountingMonitor to use AtomicIntegers.  This should be slightly safer.

- I changed the timestamp calls from System.currentTimeMillis() to System.nanoTime()/1000000.  The nanoTime() call is more high-res, as currentTimeMillis() may be tens of milliseconds accurate on some platforms, and thus not suitable for these measurements.

> Add data collection and instrumentation to the AsyncHttpClient
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3761
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>         Attachments: GERONIMO-3761-v2.patch, GERONIMO-3761.patch
>
>
> There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sangjin Lee updated GERONIMO-3761:
----------------------------------

    Attachment: GERONIMO-3761-v4.patch

I'm submitting a small patch that addresses the following:

- removed the extraneous notification of session close in HttpIoHandler.exceptionCaught()
- added average connect time to TimeMonitor

Thanks!

> Add data collection and instrumentation to the AsyncHttpClient
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3761
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>         Attachments: GERONIMO-3761-v2.patch, GERONIMO-3761-v3.patch, GERONIMO-3761-v4.patch, GERONIMO-3761.patch, TimeMonitor.java
>
>
> There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-3761) Add data collection and instrumentation to the AsyncHttpClient

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sangjin Lee updated GERONIMO-3761:
----------------------------------

    Attachment: TimeMonitor.java

A proof of concept for measuring average response time.  For simplicity, it provides only averages, and a single long variable accumulates response times.  But one could easily extend it to maintain a list to compute means, averages, std deviation, etc...

> Add data collection and instrumentation to the AsyncHttpClient
> --------------------------------------------------------------
>
>                 Key: GERONIMO-3761
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3761
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>         Attachments: GERONIMO-3761-v2.patch, GERONIMO-3761-v3.patch, GERONIMO-3761.patch, TimeMonitor.java
>
>
> There's been some discussion on the dev list about adding some instrumentation to the AsyncHttpClient.  This is for tracking these additions.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.