Envers for auditing is great, but I think, there can be a better solution for auditing. In Envers is a few
shortcomings:
- Two db tables for every table. But second table is used rarely. For our large enterprise project where is 600+ tables it is problem.
- Envers is solution only for db changes. When I need solve auditing for other application components, I need different auditing solution.
- Auditing of collections is not ideal.
- When is changed database schema I must change audit tables too. I can lost some auditing informations or I have a lot of work with update old auditing informations to the new schema.
- Save auditing informations to the same database is time and space consuming.
I am start working on small auditing library where, informations are stored in MongoDB database:
- Is used one collection for all hibernate objects. Is stored every value of object.
- Auditing is done in different thread.
- Collections (list of ids) are stored too.
- The same MongoDB database is used for other application logs.
Has somebody some experience with this or similar solution ?