powered by Jive Software

Database Audit Logger

Chaps, I am thinking about writing a database Audit logger - bouncing some ideas here:

The rationale for doing this is that we plan to keep all message audit data (for compliance/legal reasons) and we have the infrastructure around our database servers to deal with this kind of data volume (archiving, data retention, filesystem space, etc).

  1. Current Audit manager is pretty intimately tied to XML fileystem logs

  2. Doesnt seem to be a simple way to “plug” a new one in without changing XMPPServer code

  3. As am implementation, I am not so keen on batching messages up - would just an asynch write (ala SingleThreadScheduledExecutor) be enough (for xml and database Auditor)? Would reduce memory footprint. Have I missed a detail here?

-Nick

Nick,

Check out JM-149 – it would be great if you worked with Tomas on the issue. It’‘s been “in progress” for quite some time so I’‘m not sure if he’'s run into any issues.

#2 – you can use a packet interceptor to get all packets for logging purposes. I think this is how the current auditor is implemented. But, yes, it would be nice of auditing was more pluggable out of the box.

#3 – I think a size-limited queue would be a good approach. That way it performs well under light to moderate load but doesn’'t suck up an arbitrary amount of memory under heavy load.

-Matt

Cheers. (hmm didnt get email notification of your post…)

I guess the only perf advantage of batching them up is to take advantage of jdbc batched updates. Otherwise, not sure I see the perf benefit of queueing them…

The other thing to do might be to normalise some of the data.

Unless I have misinterpreted what I saw - looks like N+1 packets are logged if there were N receivers of a message…