Re: CAY-1173 Expose QueryLogger invocations as events

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Feb 11 2009 - 01:26:24 EST

  • Next message: Aristedes Maniatis: "Re: CAY-1173 Expose QueryLogger invocations as events"

    Hi Ari,

    The general idea was to expose the points where logging currently
    occurs via an event mechanism that we can continue to use for logging,
    but also for any other purpose (some yet unforeseen). The underlying
    motivation was indeed to build performance monitoring tools beyond
    simple logging. So the next step, after the right events are in place
    will be to provide a "JMX listener" to use Java JMX mechanism to
    expose basic query stats.

    It should be possible to do JDBC-level audit with this approach,
    however currently there's no link back to the objects being changed.
    On each update/insert/delete the event will expose a PreparedStatement
    SQL string and a map of parameters, with keys being column names. So
    not sure how useful this really is for audit (??) Although this whole
    thing will be tied to Cayenne thread transaction object, so
    theoretically you can store stuff in the transaction related to
    ObjectContext and tie that to the JDBC events.

    Andrus

    On Feb 11, 2009, at 1:30 AM, Aristedes Maniatis wrote:
    > On 10/02/2009, at 2:14 AM, Anatol Lutski wrote:
    >
    >> Please check the main idea. If everything is right I add the same
    >> logging for the rest of the actions.
    >
    >
    > Without yet looking at your specific code, what are the specific use
    > cases for this functionality? What is it that we'll be able to do
    > that isn't possible today? It appears the functionality is focussed
    > on performance measurement, but I wonder whether auditing should
    > also be considered. You know, tracking which values have changed in
    > each commit with some ability to associate the logging event with
    > information from the context/session (such as user name).
    >
    > If this is purely an performance monitoring tool, it looks a little
    > like the way SNMP works for networking equipment, and perhaps some
    > internal counters should be maintained, for example with min/average/
    > max query times, number of queries, etc.
    >
    > Ari
    >
    >
    >
    > -------------------------->
    > ish
    > http://www.ish.com.au
    > Level 1, 30 Wilson Street Newtown 2042 Australia
    > phone +61 2 9550 5001 fax +61 2 9550 4001
    > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Feb 11 2009 - 01:27:07 EST