Creating a new document type that maintains revision history

25 views
Skip to first unread message

Barnaby Court

unread,
Aug 28, 2014, 5:38:11 PM8/28/14
to mongoen...@googlegroups.com
Hi, 

I'm interested in working on creating a subclass of Document that that maintains the history of changes made along the way.  The base idea is that someone could easily work with the current document and have the ability to view the history.  Something along the lines of what is described at http://software.danielwatrous.com/representing-revision-data-in-mongodb/ except that to start with I really just care about the time that each revision was made.
As someone who is new to the development side of MongoEngine has something like this been tried before?  If not does anyone here have any pointers on where I should start or what pitfalls I should look out for?  Thanks!

-Barnaby

Alexander Morano

unread,
Nov 9, 2014, 3:26:47 PM11/9/14
to mongoen...@googlegroups.com
We do something like this.

However, we do not embed the history @ the document, but in a separate collection (history) with the record ID and the affected fields, plus metadata on the editor, date of edit, etc..

It is simply the new logging of the 21st century. 

Although we've never had to rollback anything, it is great metrics for producer's schedules and helps feed some other networks for "best" artist selection for specific job types, time spent on certain tasks, etc...

It is also neat to feed data into a good visualizer so executives can puff up and present something that looks "neat" watching all the dots or graphs grow and shrink over time.

Fun stuff.
Reply all
Reply to author
Forward
0 new messages