3 ms·
You're right, it is a huge pain to do this manually, but depending on what languages and platforms you're developing for, there are libraries to handle this aut
by profquail 17y ago
You're right, it is a huge pain to do this manually, but depending on what languages and platforms you're developing for, there are libraries to handle this automatically.
I've done something similar with NHibernate, where you only need to add a couple of event handlers (maybe 30-40 lines of code + a bit of configuration XML) to set this feature up. I wish I'd heard of it earlier though, since it's really quite useful (though as you said, horrendous to implement manually).
There's a wiki on NHForge about it, though I don't know that it's really the best way to do it:
http://nhforge.org/wikis/howtonh/creating-an-audit-log-using-nhibernate-events.aspx http://nhforge.org/wikis/howtonh/creating-an-audit-log-using...
- Maro 17y agoThanks. I've checked out your link, but I'm not sure this would solve my core problem(s). The problem is that even without versioning, a lot of the system is made up of long SQL commands containing subtables and JOINs and such. In several instances I had to optimize the queries. So I wouldn't want to use some ActiveRecord thing or generators. And this is now further complicated by versioning. Technical issues aside, the fact that everything is versioned makes it hard to reason about the data. Eg. the people in charge of "controling" are always asking me for help. Many times it turns out that there's no problem, the data is consistent, they just got confused by the versions.
- siculars 17y agofamiliarize yourself with time series data, as mentioned earlier in the thread, and read the amazon dynamo paper specifically the parts dealing with vector clocks.
- Maro 17y agoAs my startup is developing a distributed key-value store, I'm quite familiar with Amazon's Dynamo, and what I was talking about previously has nothing to do with vector clocks.